diff options
author | Mickael Istria | 2021-07-06 13:51:57 +0000 |
---|---|---|
committer | Mickael Istria | 2021-07-06 21:30:20 +0000 |
commit | c98a11a5c10db6ca7f16da8d4df45172790bd22d (patch) | |
tree | 453f364bfcba67745e2fecb51fa15424c6d3873e | |
parent | 2c64b24fb96174418510ad2f803e331861d49b07 (diff) | |
download | rt.equinox.p2-I20210721-0530.tar.gz rt.equinox.p2-I20210721-0530.tar.xz rt.equinox.p2-I20210721-0530.zip |
Bug 574667 - Use Jenkins multibranch pipeline based onY20210722-0800Y20210720-0800Y20210719-0550Y20210715-1150Y20210715-1000Y20210715-0820Y20210713-0800Y20210708-0800S4_21_0_M1I20210722-1800I20210721-1800I20210721-0530I20210720-1800I20210719-1800I20210718-1800I20210717-1800I20210716-1800I20210716-0020I20210715-2200I20210715-1800I20210714-1800I20210713-1800I20210712-1800I20210712-0340I20210712-0240I20210711-1800I20210710-1800I20210710-0000I20210709-0030I20210707-1800I20210707-0600I20210706-1800
Jenkinsfile+Gerrit
Change-Id: I7809ab093b79d5c029606d2261af97a28ef3ec5c
Reviewed-on: https://git.eclipse.org/r/c/equinox/rt.equinox.p2/+/182795
Tested-by: Mickael Istria <mistria@redhat.com>
Reviewed-by: Mickael Istria <mistria@redhat.com>
-rw-r--r-- | Jenkinsfile | 70 |
1 files changed, 70 insertions, 0 deletions
diff --git a/Jenkinsfile b/Jenkinsfile new file mode 100644 index 000000000..180fdac75 --- /dev/null +++ b/Jenkinsfile @@ -0,0 +1,70 @@ +pipeline { + options { + timeout(time: 40, unit: 'MINUTES') + buildDiscarder(logRotator(numToKeepStr:'5')) + } + agent { + label "centos-latest" + } + tools { + maven 'apache-maven-latest' + jdk 'openjdk-jdk11-latest' + } + stages { + stage('initialize Gerrit review') { + steps { + gerritReview labels: [Verified: 0], message: "Build started $BUILD_URL" + } + } + stage('Build') { + steps { + wrap([$class: 'Xvnc', useXauthority: true]) { + sh """ + mvn clean verify --batch-mode --fail-at-end -Dmaven.repo.local=$WORKSPACE/.m2/repository \ + -Pbuild-individual-bundles -Pbree-libs -Papi-check \ + -DskipTests=false -Dcompare-version-with-baselines.skip=false \ + -Dmaven.test.error.ignore=true -Dmaven.test.failure.ignore=true \ + -Dproject.build.sourceEncoding=UTF-8 + """ + } + } + post { + always { + archiveArtifacts artifacts: '*.log,*/target/work/data/.metadata/*.log,*/tests/target/work/data/.metadata/*.log,apiAnalyzer-workspace/.metadata/*.log', allowEmptyArchive: true + junit '**/target/surefire-reports/TEST-*.xml' + publishIssues issues:[scanForIssues(tool: java()), scanForIssues(tool: mavenConsole())] + } + unstable { + gerritReview labels: [Verified: -1], message: "Build UNSTABLE (test failures) $BUILD_URL" + } + failure { + gerritReview labels: [Verified: -1], message: "Build FAILED $BUILD_URL" + } + } + } + stage('Check freeze period') { + when { + not { + branch 'master' + } + } + steps { + sh "wget https://git.eclipse.org/c/platform/eclipse.platform.releng.aggregator.git/plain/scripts/verifyFreezePeriod.sh" + sh "chmod +x verifyFreezePeriod.sh" + withCredentials([string(credentialsId: 'google-api-key', variable: 'GOOGLE_API_KEY')]) { + sh './verifyFreezePeriod.sh' + } + } + post { + failure { + gerritReview labels: [Verified: -1], message: "Build and test are OK, but Eclipse project is currently in a code freeze period.\nPlease wait for end of code freeze period before merging.\n $BUILD_URL" + } + } + } + } + post { + success { + gerritReview labels: [Verified: 1], message: "Build Succcess $BUILD_URL" + } + } +} |