Commit e061f6d0 authored by Yuri Blankenstein's avatar Yuri Blankenstein
Browse files

Merge branch 'feature/6-build-on-eclipse-foundation-infrastructure' into 'develop'

Resolve "Build on Eclipse Foundation infrastructure"

Closes #6

See merge request !4
parents 6a220021 5e7776aa
Pipeline #2491 passed with stage
in 0 seconds
......@@ -42,14 +42,5 @@
<arguments>1.0-name-matches-false-false-releng</arguments>
</matcher>
</filter>
<filter>
<id>1647267860916</id>
<name>releng</name>
<type>9</type>
<matcher>
<id>org.eclipse.ui.ide.multiFilter</id>
<arguments>1.0-name-matches-false-false-legal-defaults</arguments>
</matcher>
</filter>
</filteredResources>
</projectDescription>
//////////////////////////////////////////////////////////////////////////////
//
// Copyright (c) 2021 Contributors to the Eclipse Foundation
//
// This program and the accompanying materials are made
// available under the terms of the Eclipse Public License 2.0
// which is available at https://www.eclipse.org/legal/epl-2.0/
//
// SPDX-License-Identifier: EPL-2.0
//
//////////////////////////////////////////////////////////////////////////////
pipeline {
agent {
// The 'centos-7' pod template allows UI tests.
kubernetes {
inheritFrom 'centos-7'
}
}
tools {
jdk 'temurin-jdk8-latest'
maven 'apache-maven-3.8.3'
}
options {
buildDiscarder(logRotator(
// Number of builds to keep.
numToKeepStr: '5',
// Number of builds for which to keep the artifacts.
artifactNumToKeepStr: '5',
// Number of days to keep builds.
daysToKeepStr: env.BRANCH_NAME ==~ /master/ ? '7' : // master
env.BRANCH_NAME ==~ /develop/ ? '1000' : // develop
env.TAG_NAME ==~ /v[0-9]+\\.[0-9]+.*/ ? '120' : // release tags
'30', // other branches and merge requests
// Number of days to keep artifacts of builds.
artifactDaysToKeepStr: env.BRANCH_NAME ==~ /master/ ? '7' : // master
env.BRANCH_NAME ==~ /develop/ ? '1000' : // develop
env.TAG_NAME ==~ /v[0-9]+\\.[0-9]+.*/ ? '30' : // release tags
'30', // other branches and merge requests
))
timeout(time: 1, unit: 'HOURS')
timestamps()
}
stages {
stage('Build & Test') {
steps {
wrap([$class: 'Xvnc', takeScreenshot: false, useXauthority: true]) {
sh '''
# Print versions.
java -version
mvn -version
git --version
# Print environment.
printenv
# Get Git last commit date.
GIT_DATE_EPOCH=$(git log -1 --format=%cd --date=raw | cut -d ' ' -f 1)
GIT_DATE=$(date -d @$GIT_DATE_EPOCH -u +%Y%m%d-%H%M%S)
# Configure 'jenkins' profile for build.
BUILD_ARGS="-Pjenkins"
# Override the 'trace4cps.version.enduser' property for releases. Remains 'dev' otherwise.
if [[ "$TAG_NAME" =~ ^v[0-9]+\\.[0-9]+.*$ ]]; then
BUILD_ARGS="$BUILD_ARGS -Dtrace4cps.version.enduser=$TAG_NAME"
fi
# Override the 'trace4cps.version.qualifier' property for Jenkins builds.
# It starts with 'v' and the Git date, followed by a qualifier postfix.
# For releases, the qualifier postfix is the postfix of the version tag (if any).
# For non-releases, the qualifier postfix is 'dev'.
if [[ "$TAG_NAME" =~ ^v[0-9]+\\.[0-9]+.*$ ]]; then
QUALIFIER_POSTFIX=$(echo "$TAG_NAME" | sed -e 's/^[^-]*//g')
else
QUALIFIER_POSTFIX=-dev
fi
BUILD_ARGS="$BUILD_ARGS -Dtrace4cps.version.qualifier=v$GIT_DATE$QUALIFIER_POSTFIX"
# Perform build.
./build.sh $BUILD_ARGS
'''
}
}
post {
success {
// Update site.
archiveArtifacts 'releng/org.eclipse.trace4cps.repository/target/*-updatesite.zip'
}
}
}
}
post {
// Send an e-mail on unsuccessful builds (unstable, failure, aborted).
unsuccessful {
emailext subject: 'Build $BUILD_STATUS $PROJECT_NAME #$BUILD_NUMBER!',
body: '''Check console output at $BUILD_URL to view the results.''',
recipientProviders: [culprits(), requestor()]
}
// Send an e-mail on fixed builds (back to normal).
fixed {
emailext subject: 'Build $BUILD_STATUS $PROJECT_NAME #$BUILD_NUMBER!',
body: '''Check console output at $BUILD_URL to view the results.''',
recipientProviders: [culprits(), requestor()]
}
}
}
......@@ -584,12 +584,16 @@
name="net.sf.eclipsecs.feature.group"/>
<requirement
name="de.jcup.asciidoctoreditor.feature.group"/>
<requirement
name="de.jcup.jenkinseditor.feature.feature.group"/>
<repository
url="https://repo1.maven.org/maven2/.m2e/connectors/m2eclipse-tycho/${m2eclipse-tycho.version}/N/LATEST/"/>
<repository
url="http://checkstyle.org/eclipse-cs-update-site/updates/${eclipse-checkstyle.version.major}.x/${eclipse-checkstyle.version.major}.${eclipse-checkstyle.version.minor}.x"/>
<repository
url="https://de-jcup.github.io/update-site-eclipse-asciidoctor-editor/update-site/"/>
<repository
url="https://de-jcup.github.io/update-site-eclipse-jenkins-editor/update-site/"/>
<repository
url="http://download.itemis.com/updates/releases/2.1.1/"/>
<description>Install the tools needed in the IDE to work with the source code for ${scope.project.label}.</description>
......
File mode changed from 100644 to 100755
......@@ -19,6 +19,16 @@
<packaging>pom</packaging>
<properties>
<!-- The end-user readable version number. -->
<!-- The default is 'dev'. Jenkinsfile overrides this for releases only, to e.g. v0.1, v0.1-M1, v0.1-RC1. -->
<trace4cps.version.enduser>dev</trace4cps.version.enduser>
<!-- The version qualifier to use for all plugins/features/etc. -->
<!-- Remains 'dev' for non-Jenkins builds. Jenkinsfile overrides the qualifier to e.g., -->
<!-- 'v20210609-141908-dev' for development builds, 'v20210609-141908-M1' for milestone releases, -->
<!-- 'v20210609-141908-RC1' for release candidates, and 'v20210609-141908' for final releases. -->
<trace4cps.version.qualifier>dev</trace4cps.version.qualifier>
<!-- Building Java8 compliant code -->
<java.source>1.8</java.source>
<maven.compiler.source>${java.source}</maven.compiler.source>
......@@ -88,6 +98,9 @@
<version>${tycho.version}</version>
<configuration>
<!-- Use property-based fixed qualifier for all plugins/features/etc. -->
<forceContextQualifier>${trace4cps.version.qualifier}</forceContextQualifier>
<!-- Disable Maven descriptors in JAR bundles. -->
<archive>
<addMavenDescriptor>false</addMavenDescriptor>
......@@ -316,7 +329,7 @@
<id>checkstyle-check</id>
<activation>
<file>
<exists>${basedir}/.checkstyle</exists>
<exists>${project.basedir}/.checkstyle</exists>
</file>
</activation>
<build>
......@@ -342,7 +355,7 @@
<failOnViolation>true</failOnViolation>
<violationSeverity>info</violationSeverity>
<sourceDirectories>
<sourceDirectory>${basedir}/src</sourceDirectory>
<sourceDirectory>${project.basedir}/src</sourceDirectory>
</sourceDirectories>
</configuration>
<goals>
......@@ -360,7 +373,7 @@
<id>add-plugin-default-abouts</id>
<activation>
<file>
<missing>${basedir}/about.html</missing>
<missing>${project.basedir}/about.html</missing>
</file>
</activation>
<build>
......@@ -404,7 +417,7 @@
<id>create-plugin-source</id>
<activation>
<file>
<exists>${basedir}/META-INF/MANIFEST.MF</exists>
<exists>${project.basedir}/META-INF/MANIFEST.MF</exists>
</file>
</activation>
<build>
......@@ -430,7 +443,7 @@
<id>create-feature-source</id>
<activation>
<file>
<exists>${basedir}/feature.xml</exists>
<exists>${project.basedir}/feature.xml</exists>
</file>
</activation>
<build>
......
......@@ -35,6 +35,9 @@
<configuration>
<!-- Custom update site name. -->
<repositoryName>Eclipse TRACE4CPS Update Site (Incubation)</repositoryName>
<!-- Custom archive file name (excluding file extension). -->
<finalName>eclipse-trace4cps-incubation-${trace4cps.version.enduser}-updatesite</finalName>
</configuration>
</plugin>
</plugins>
......
......@@ -20,7 +20,7 @@
<relativePath>../../</relativePath>
</parent>
<name> TRACE4CPS Runtime Verification CLI</name>
<name>TRACE4CPS Runtime Verification CLI</name>
<artifactId>org.eclipse.trace4cps.tl.cmd</artifactId>
<packaging>jar</packaging>
......
......@@ -83,7 +83,7 @@
<configuration>
<mainClass>org.eclipse.emf.mwe2.launch.runtime.Mwe2Launcher</mainClass>
<arguments>
<argument>/${project.basedir}/src/org/eclipse/trace4cps/tl/GenerateETL.mwe2</argument>
<argument>/${project.basedir}/src/org/eclipse/trace4cps/tl/GenerateEtl.mwe2</argument>
<argument>-p</argument>
<argument>rootPath=/${project.basedir}/..</argument>
</arguments>
......@@ -141,37 +141,37 @@
<configuration>
<filesets combine.children="append">
<fileset>
<directory>${basedir}/../org.eclipse.trace4cps.tl/src-gen/</directory>
<directory>${project.basedir}/../org.eclipse.trace4cps.tl/src-gen/</directory>
<includes>
<include>**/*</include>
</includes>
</fileset>
<fileset>
<directory>${basedir}/../org.eclipse.trace4cps.tl.tests/src-gen/</directory>
<directory>${project.basedir}/../org.eclipse.trace4cps.tl.tests/src-gen/</directory>
<includes>
<include>**/*</include>
</includes>
</fileset>
<fileset>
<directory>${basedir}/../org.eclipse.trace4cps.tl.ide/src-gen/</directory>
<directory>${project.basedir}/../org.eclipse.trace4cps.tl.ide/src-gen/</directory>
<includes>
<include>**/*</include>
</includes>
</fileset>
<fileset>
<directory>${basedir}/../org.eclipse.trace4cps.tl.ui/src-gen/</directory>
<directory>${project.basedir}/../org.eclipse.trace4cps.tl.ui/src-gen/</directory>
<includes>
<include>**/*</include>
</includes>
</fileset>
<fileset>
<directory>${basedir}/../org.eclipse.trace4cps.tl.ui.tests/src-gen/</directory>
<directory>${project.basedir}/../org.eclipse.trace4cps.tl.ui.tests/src-gen/</directory>
<includes>
<include>**/*</include>
</includes>
</fileset>
<fileset>
<directory>${basedir}/model/generated/</directory>
<directory>${project.basedir}/model/generated/</directory>
</fileset>
</filesets>
</configuration>
......
......@@ -37,7 +37,7 @@ Workflow {
}
}
language = StandardLanguage {
name = "org.eclipse.trace4cps.tl.etl"
name = "org.eclipse.trace4cps.tl.Etl"
fileExtensions = "etl"
serializer = {
generateStub = false
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment