Install core artifacts during build so they are resolvable by workbench.base
Change-Id: Ic55eaa28660fade5e989c34596b078d40adb6659
diff --git a/Jenkinsfile b/Jenkinsfile
index 9611dbd..67b8da6 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -1,68 +1,56 @@
#!groovy
// Jenkins Settings
-// Only keep the 20 most recent builds.
properties([
[$class: 'jenkins.model.BuildDiscarderProperty',
strategy: [$class: 'LogRotator', numToKeepStr: '20', artifactNumToKeepStr: '20']
]
])
-// Start Build
timestamps {
- // Claim a Linux build slave to work in
- node() {
- currentBuild.result = 'SUCCESS'
- try {
- currentBuild.displayName=env.BRANCH_NAME + ' #' + env.BUILD_NUMBER
+ timeout(time: 45, unit: 'MINUTES') {
+ node() {
+ try {
+ currentBuild.displayName=env.BRANCH_NAME + ' #' + env.BUILD_NUMBER
- // Gain access to installed tools in Jenkins
- def JAVA_TOOL=tool 'jdk1.8.0-latest'
- def MAVEN_TOOL=tool 'apache-maven-latest'
- def MEM_ARGS="-Xms512m -Xmx4096m -XX:MaxPermSize=2048m"
+ // Gain access to installed tools in Jenkins
+ def JAVA_TOOL=tool 'jdk1.8.0-latest'
+ def MAVEN_TOOL=tool 'apache-maven-latest'
+ def MEM_ARGS="-Xms512m -Xmx4096m -XX:MaxPermSize=2048m"
- stage('Preparation') {
- timeout(time: 15, unit: 'MINUTES') {
+ stage('Preparation') {
checkout scm
}
- }
- // Now we can run the Maven build
- stage('Build') {
-
- // Setup the Environment with Java and Maven on the classpath
- withEnv(["JAVA_HOME=${JAVA_TOOL}", "PATH+MAVEN=${MAVEN_TOOL}/bin:${env.JAVA_HOME}/bin",
- "JAVA_OPTS=${MEM_ARGS}", "MAVEN_OPTS=${MEM_ARGS}"]) {
- timeout(time: 90, unit: 'MINUTES') {
+ stage('Build') {
+ withEnv(["JAVA_HOME=${JAVA_TOOL}", "PATH+MAVEN=${MAVEN_TOOL}/bin:${env.JAVA_HOME}/bin",
+ "JAVA_OPTS=${MEM_ARGS}", "MAVEN_OPTS=${MEM_ARGS}"]) {
try {
- echo "Building branch: ${env.BRANCH_NAME}"
wrap([$class:'Xvnc', useXauthority: true]) {
- sh "mvn -T 8 -B -fae clean verify -DskipRCP"
+ sh "mvn -V -B -e -fae -T 4 clean install -DskipRCP"
}
} finally {
step([$class: 'JUnitResultArchiver', testResults: '**/target/surefire-reports/TEST-*.xml'])
}
}
}
- }
- // Archive the created update site so that we can use it in the future - but only
- // for our release branches and master branch.
- if (env.BRANCH_NAME.equals("master")) {
- timeout(time: 15, unit: 'MINUTES') {
+ // Archive the update site so that we can use it in the future - but only for the master branch.
+ if (env.BRANCH_NAME.equals("master")) {
stage('Archive Artifacts') {
- // Fingerprints will allow this artifact to be traceable if a downstream job
- // references it in the future.
+ // Fingerprints will allow this artifact to be traceable if a downstream job references it in the future.
archiveArtifacts artifacts: 'releng/org.eclipse.tigerstripe.update-site/target/*.zip', fingerprint: true
}
}
+
+ currentBuild.result = 'SUCCESS'
+ } catch (any) {
+ currentBuild.result = 'FAILURE'
+ throw any
+ } finally {
+ if (currentBuild.result != 'ABORTED') {
+ step([$class: 'Mailer', notifyEveryUnstableBuild: true, recipients: 'danijoh2@cisco.com,rcraddoc@cisco.com', sendToIndividuals: true])
+ }
}
- } catch (any) {
- currentBuild.result = 'FAILURE'
- throw any
- } finally {
- if (currentBuild.result != 'ABORTED') {
- step([$class: 'Mailer', notifyEveryUnstableBuild: true, recipients: 'danijoh2@cisco.com', sendToIndividuals: true])
- }
- }
- }
+ }
+ }
}
\ No newline at end of file