Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMickael Istria2021-07-06 10:01:43 -0400
committerMickael Istria2021-07-07 11:16:38 -0400
commitc7257d4b97e98e6d48624d1b30f96f9a26e20424 (patch)
treeafc901138fb4a12a6e02cc4cd2040ea1c3031048
parent07e84408ae1c78131843db52f5a12d1cdad1e73b (diff)
downloadeclipse.platform.team-I20210716-1800.tar.gz
eclipse.platform.team-I20210716-1800.tar.xz
eclipse.platform.team-I20210716-1800.zip
Jenkinsfile+Gerrit Change-Id: I66228222984a8b11ccc0bb8beddcb36b8561073d Reviewed-on: https://git.eclipse.org/r/c/platform/eclipse.platform.team/+/182802 Tested-by: Mickael Istria <mistria@redhat.com> Reviewed-by: Mickael Istria <mistria@redhat.com>
-rw-r--r--Jenkinsfile69
1 files changed, 69 insertions, 0 deletions
diff --git a/Jenkinsfile b/Jenkinsfile
new file mode 100644
index 000000000..58362a62c
--- /dev/null
+++ b/Jenkinsfile
@@ -0,0 +1,69 @@
+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 \
+ -Dcompare-version-with-baselines.skip=false \
+ -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"
+ }
+ }
+}

Back to the top