-
Notifications
You must be signed in to change notification settings - Fork 871
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
204 additions
and
113 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,125 +1,86 @@ | ||
#!groovy | ||
node("master") { | ||
milestone() | ||
def mvnHome = tool 'mvn' | ||
def mvnJdk8Image = "orientdb/mvn-gradle-zulu-jdk-8" | ||
def mvnIBMJdkImage = "orientdb/jenkins-slave-ibm-jdk-8" | ||
|
||
stage('Source checkout') { | ||
milestone | ||
lock(resource: "${env.BRANCH_NAME}", inversePrecedence: true) { | ||
milestone() | ||
def mvnHome = tool 'mvn' | ||
def mvnJdk8Image = "orientdb/mvn-gradle-zulu-jdk-8" | ||
def mvnIBMJdkImage = "orientdb/jenkins-slave-ibm-jdk-8" | ||
milestone | ||
|
||
stage('Source checkout') { | ||
node { | ||
checkout scm | ||
} | ||
} | ||
} | ||
|
||
try { | ||
|
||
try { | ||
|
||
stage('Run tests on Java8') { | ||
docker.image("${mvnJdk8Image}") | ||
.inside("${env.VOLUMES}") { | ||
try { | ||
sh "${mvnHome}/bin/mvn --batch-mode -V clean install -Dmaven.test.failure.ignore=true -Dsurefire.useFile=false" | ||
sh "${mvnHome}/bin/mvn --batch-mode -V deploy -DskipTests" | ||
} finally { | ||
junit allowEmptyResults: true, testResults: '**/target/surefire-reports/TEST-*.xml' | ||
stage('Run tests on Java8') { | ||
docker.image("${mvnJdk8Image}") | ||
.inside("${env.VOLUMES}") { | ||
try { | ||
sh "${mvnHome}/bin/mvn --batch-mode -V clean install -Dmaven.test.failure.ignore=true -Dsurefire.useFile=false" | ||
sh "${mvnHome}/bin/mvn --batch-mode -V deploy -DskipTests" | ||
} finally { | ||
junit allowEmptyResults: true, testResults: '**/target/surefire-reports/TEST-*.xml' | ||
|
||
} | ||
} | ||
} | ||
} | ||
} | ||
|
||
|
||
stage('Run tests on IBM Java8') { | ||
docker.image("${mvnIBMJdkImage}") | ||
.inside("${env.VOLUMES}") { | ||
try { | ||
sh "${mvnHome}/bin/mvn --batch-mode -V test -Dmaven.test.failure.ignore=true -Dsurefire.useFile=false" | ||
} finally { | ||
junit allowEmptyResults: true, testResults: '**/target/surefire-reports/TEST-*.xml' | ||
stage('Run tests on IBM Java8') { | ||
docker.image("${mvnIBMJdkImage}") | ||
.inside("${env.VOLUMES}") { | ||
try { | ||
sh "${mvnHome}/bin/mvn --batch-mode -V test -Dmaven.test.failure.ignore=true -Dsurefire.useFile=false" | ||
} finally { | ||
junit allowEmptyResults: true, testResults: '**/target/surefire-reports/TEST-*.xml' | ||
|
||
} | ||
} | ||
} | ||
} | ||
} | ||
|
||
stage("Run downstream projects") { | ||
stage("Run downstream projects") { | ||
|
||
build job: "orientdb-spatial-multibranch/${env.BRANCH_NAME}", wait: false | ||
build job: "orientdb-enterprise-multibranch/${env.BRANCH_NAME}", wait: false | ||
build job: "orientdb-security-multibranch/${env.BRANCH_NAME}", wait: false | ||
build job: "orientdb-neo4j-importer-multibranch/${env.BRANCH_NAME}", wait: false | ||
build job: "orientdb-teleporter-multibranch/${env.BRANCH_NAME}", wait: false | ||
build job: "spring-data-orientdb-multibranch/${env.BRANCH_NAME}", wait: false | ||
} | ||
build job: "orientdb-spatial-multibranch/${env.BRANCH_NAME}", wait: false | ||
build job: "orientdb-enterprise-multibranch/${env.BRANCH_NAME}", wait: false | ||
build job: "orientdb-security-multibranch/${env.BRANCH_NAME}", wait: false | ||
build job: "orientdb-neo4j-importer-multibranch/${env.BRANCH_NAME}", wait: false | ||
build job: "orientdb-teleporter-multibranch/${env.BRANCH_NAME}", wait: false | ||
build job: "spring-data-orientdb-multibranch/${env.BRANCH_NAME}", wait: false | ||
} | ||
|
||
stage('Run CI tests on java8') { | ||
timeout(time: 300, unit: 'MINUTES') { | ||
docker.image("${mvnJdk8Image}") | ||
.inside("${env.VOLUMES}") { | ||
sh "${mvnHome}/bin/mvn --batch-mode -V -U -e -Dmaven.test.failure.ignore=true -Dstorage.diskCache.bufferSize=4096 -Dorientdb.test.env=ci clean package -Dsurefire.useFile=false" | ||
junit allowEmptyResults: true, testResults: '**/target/surefire-reports/TEST-*.xml' | ||
} | ||
} | ||
stage('Run CI tests on java8') { | ||
timeout(time: 300, unit: 'MINUTES') { | ||
docker.image("${mvnJdk8Image}") | ||
.inside("${env.VOLUMES}") { | ||
sh "${mvnHome}/bin/mvn --batch-mode -V -U -e -Dmaven.test.failure.ignore=true -Dstorage.diskCache.bufferSize=4096 -Dorientdb.test.env=ci clean package -Dsurefire.useFile=false" | ||
junit allowEmptyResults: true, testResults: '**/target/surefire-reports/TEST-*.xml' | ||
} | ||
} | ||
} | ||
|
||
stage('Publish Javadoc') { | ||
docker.image("${mvnJdk8Image}") | ||
.inside("${env.VOLUMES}") { | ||
sh "${mvnHome}/bin/mvn javadoc:aggregate" | ||
sh "rsync -ra --stats ${WORKSPACE}/target/site/apidocs/ -e ${env.RSYNC_JAVADOC}/${env.BRANCH_NAME}/" | ||
} | ||
} | ||
stage('Publish Javadoc') { | ||
docker.image("${mvnJdk8Image}") | ||
.inside("${env.VOLUMES}") { | ||
sh "${mvnHome}/bin/mvn javadoc:aggregate" | ||
sh "rsync -ra --stats ${WORKSPACE}/target/site/apidocs/ -e ${env.RSYNC_JAVADOC}/${env.BRANCH_NAME}/" | ||
} | ||
} | ||
|
||
// stage('Run crash tests on java8') { | ||
// | ||
// try { | ||
// timeout(time: 240, unit: 'MINUTES') { | ||
// docker.image("${mvnJdk8Image}") | ||
// .inside("${env.VOLUMES}") { | ||
// sh "${mvnHome}/bin/mvn -f ./server/pom.xml --batch-mode -V -U -e -Dmaven.test.failure.ignore=true clean test-compile failsafe:integration-test -Dsurefire.useFile=false" | ||
// } | ||
// } | ||
// | ||
// } catch (e) { | ||
// currentBuild.result = 'FAILURE' | ||
// | ||
// slackSend(color: 'bad', message: "FAILED crash tests: Job '${env.JOB_NAME} [${env.BUILD_NUMBER}]' (${env.BUILD_URL})") | ||
// } finally { | ||
// junit allowEmptyResults: true, testResults: '**/target/surefire-reports/TEST-*.xml' | ||
// | ||
// } | ||
// } | ||
// | ||
// stage('Run distributed test on Java8') { | ||
// | ||
// try { | ||
// timeout(time: 180, unit: 'MINUTES') { | ||
// docker.image("${mvnJdk8Image}") | ||
// .inside("${env.VOLUMES}") { | ||
// sh "${mvnHome}/bin/mvn -f ./distributed/pom.xml --batch-mode -V -U -e -Dmaven.test.failure.ignore=true clean package -Dsurefire.useFile=false -DskipTests=false" | ||
// | ||
// } | ||
// } | ||
// } catch (e) { | ||
// currentBuild.result = 'FAILURE' | ||
// | ||
// slackSend(color: 'bad', message: "FAILED distributed tests: Job '${env.JOB_NAME} [${env.BUILD_NUMBER}]' (${env.BUILD_URL})") | ||
// } finally { | ||
// junit allowEmptyResults: true, testResults: '**/target/surefire-reports/TEST-*.xml' | ||
// | ||
// } | ||
// | ||
// } | ||
|
||
if (currentBuild.previousBuild == null || currentBuild.previousBuild.result != currentBuild.result) { | ||
slackSend(color: '#00FF00', message: "SUCCESS: Job '${env.JOB_NAME} [${env.BUILD_NUMBER}]' (${env.BUILD_URL})") | ||
} | ||
|
||
} catch (e) { | ||
currentBuild.result = 'FAILURE' | ||
if (currentBuild.previousBuild == null || currentBuild.previousBuild.result != currentBuild.result) { | ||
slackSend(color: '#FF0000', message: "FAILED: Job '${env.JOB_NAME} [${env.BUILD_NUMBER}]' (${env.BUILD_URL})") | ||
} | ||
throw e; | ||
} | ||
if (currentBuild.previousBuild == null || currentBuild.previousBuild.result != currentBuild.result) { | ||
slackSend(color: '#00FF00', message: "SUCCESS: Job '${env.JOB_NAME} [${env.BUILD_NUMBER}]' (${env.BUILD_URL})") | ||
} | ||
|
||
} catch (e) { | ||
currentBuild.result = 'FAILURE' | ||
if (currentBuild.previousBuild == null || currentBuild.previousBuild.result != currentBuild.result) { | ||
slackSend(color: '#FF0000', message: "FAILED: Job '${env.JOB_NAME} [${env.BUILD_NUMBER}]' (${env.BUILD_URL})") | ||
} | ||
throw e; | ||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,125 @@ | ||
#!groovy | ||
node("master") { | ||
milestone() | ||
lock(resource: "${env.BRANCH_NAME}", inversePrecedence: true) { | ||
milestone() | ||
def mvnHome = tool 'mvn' | ||
def mvnJdk8Image = "orientdb/mvn-gradle-zulu-jdk-8" | ||
def mvnIBMJdkImage = "orientdb/jenkins-slave-ibm-jdk-8" | ||
|
||
stage('Source checkout') { | ||
checkout scm | ||
} | ||
|
||
|
||
try { | ||
|
||
stage('Run tests on Java8') { | ||
docker.image("${mvnJdk8Image}") | ||
.inside("${env.VOLUMES}") { | ||
try { | ||
sh "${mvnHome}/bin/mvn --batch-mode -V clean install -Dmaven.test.failure.ignore=true -Dsurefire.useFile=false" | ||
sh "${mvnHome}/bin/mvn --batch-mode -V deploy -DskipTests" | ||
} finally { | ||
junit allowEmptyResults: true, testResults: '**/target/surefire-reports/TEST-*.xml' | ||
|
||
} | ||
} | ||
} | ||
|
||
|
||
stage('Run tests on IBM Java8') { | ||
docker.image("${mvnIBMJdkImage}") | ||
.inside("${env.VOLUMES}") { | ||
try { | ||
sh "${mvnHome}/bin/mvn --batch-mode -V test -Dmaven.test.failure.ignore=true -Dsurefire.useFile=false" | ||
} finally { | ||
junit allowEmptyResults: true, testResults: '**/target/surefire-reports/TEST-*.xml' | ||
|
||
} | ||
} | ||
} | ||
|
||
stage("Run downstream projects") { | ||
|
||
build job: "orientdb-spatial-multibranch/${env.BRANCH_NAME}", wait: false | ||
build job: "orientdb-enterprise-multibranch/${env.BRANCH_NAME}", wait: false | ||
build job: "orientdb-security-multibranch/${env.BRANCH_NAME}", wait: false | ||
build job: "orientdb-neo4j-importer-multibranch/${env.BRANCH_NAME}", wait: false | ||
build job: "orientdb-teleporter-multibranch/${env.BRANCH_NAME}", wait: false | ||
build job: "spring-data-orientdb-multibranch/${env.BRANCH_NAME}", wait: false | ||
} | ||
|
||
stage('Run CI tests on java8') { | ||
timeout(time: 300, unit: 'MINUTES') { | ||
docker.image("${mvnJdk8Image}") | ||
.inside("${env.VOLUMES}") { | ||
sh "${mvnHome}/bin/mvn --batch-mode -V -U -e -Dmaven.test.failure.ignore=true -Dstorage.diskCache.bufferSize=4096 -Dorientdb.test.env=ci clean package -Dsurefire.useFile=false" | ||
junit allowEmptyResults: true, testResults: '**/target/surefire-reports/TEST-*.xml' | ||
} | ||
} | ||
} | ||
|
||
stage('Publish Javadoc') { | ||
docker.image("${mvnJdk8Image}") | ||
.inside("${env.VOLUMES}") { | ||
sh "${mvnHome}/bin/mvn javadoc:aggregate" | ||
sh "rsync -ra --stats ${WORKSPACE}/target/site/apidocs/ -e ${env.RSYNC_JAVADOC}/${env.BRANCH_NAME}/" | ||
} | ||
} | ||
|
||
// stage('Run crash tests on java8') { | ||
// | ||
// try { | ||
// timeout(time: 240, unit: 'MINUTES') { | ||
// docker.image("${mvnJdk8Image}") | ||
// .inside("${env.VOLUMES}") { | ||
// sh "${mvnHome}/bin/mvn -f ./server/pom.xml --batch-mode -V -U -e -Dmaven.test.failure.ignore=true clean test-compile failsafe:integration-test -Dsurefire.useFile=false" | ||
// } | ||
// } | ||
// | ||
// } catch (e) { | ||
// currentBuild.result = 'FAILURE' | ||
// | ||
// slackSend(color: 'bad', message: "FAILED crash tests: Job '${env.JOB_NAME} [${env.BUILD_NUMBER}]' (${env.BUILD_URL})") | ||
// } finally { | ||
// junit allowEmptyResults: true, testResults: '**/target/surefire-reports/TEST-*.xml' | ||
// | ||
// } | ||
// } | ||
// | ||
// stage('Run distributed test on Java8') { | ||
// | ||
// try { | ||
// timeout(time: 180, unit: 'MINUTES') { | ||
// docker.image("${mvnJdk8Image}") | ||
// .inside("${env.VOLUMES}") { | ||
// sh "${mvnHome}/bin/mvn -f ./distributed/pom.xml --batch-mode -V -U -e -Dmaven.test.failure.ignore=true clean package -Dsurefire.useFile=false -DskipTests=false" | ||
// | ||
// } | ||
// } | ||
// } catch (e) { | ||
// currentBuild.result = 'FAILURE' | ||
// | ||
// slackSend(color: 'bad', message: "FAILED distributed tests: Job '${env.JOB_NAME} [${env.BUILD_NUMBER}]' (${env.BUILD_URL})") | ||
// } finally { | ||
// junit allowEmptyResults: true, testResults: '**/target/surefire-reports/TEST-*.xml' | ||
// | ||
// } | ||
// | ||
// } | ||
|
||
if (currentBuild.previousBuild == null || currentBuild.previousBuild.result != currentBuild.result) { | ||
slackSend(color: '#00FF00', message: "SUCCESS: Job '${env.JOB_NAME} [${env.BUILD_NUMBER}]' (${env.BUILD_URL})") | ||
} | ||
|
||
} catch (e) { | ||
currentBuild.result = 'FAILURE' | ||
if (currentBuild.previousBuild == null || currentBuild.previousBuild.result != currentBuild.result) { | ||
slackSend(color: '#FF0000', message: "FAILED: Job '${env.JOB_NAME} [${env.BUILD_NUMBER}]' (${env.BUILD_URL})") | ||
} | ||
throw e; | ||
} | ||
} | ||
|
||
} |