From e58b9bf9848e34fde6b58dd2ba109488fb6c42c4 Mon Sep 17 00:00:00 2001 From: Jonah Graham Date: Fri, 9 Apr 2021 16:23:10 -0400 Subject: [PATCH] Bug 572250: Build and test CDT with Java 16 (not for release) --- .../pipelines/cdt/cdt-10.2-java16.Jenkinsfile | 69 +++++++++++++++++++ .../cdt/cdt-master-java16.Jenkinsfile | 69 +++++++++++++++++++ 2 files changed, 138 insertions(+) create mode 100644 jenkins/pipelines/cdt/cdt-10.2-java16.Jenkinsfile create mode 100644 jenkins/pipelines/cdt/cdt-master-java16.Jenkinsfile diff --git a/jenkins/pipelines/cdt/cdt-10.2-java16.Jenkinsfile b/jenkins/pipelines/cdt/cdt-10.2-java16.Jenkinsfile new file mode 100644 index 0000000..44475d3 --- /dev/null +++ b/jenkins/pipelines/cdt/cdt-10.2-java16.Jenkinsfile @@ -0,0 +1,69 @@ +pipeline { + agent { + kubernetes { + yamlFile 'jenkins/pod-templates/cdt-full-pod-standard.yaml' + } + } + options { + timestamps() + disableConcurrentBuilds() + } + stages { + stage('Process info') { + steps { + container('cdt') { + timeout(activity: true, time: 20) { + withEnv(['MAVEN_OPTS=-Xmx768m -Xms768m']) { + sh "ps -AHf" + sh "cat /etc/passwd | tail -1" + } + } + } + } + } + stage('Git Clone') { + steps { + container('cdt') { + timeout(activity: true, time: 20) { + /* Running the git fetch command manually is a workaround. See https://bugs.eclipse.org/bugs/show_bug.cgi?id=560283#c16 */ + sh 'git config remote.origin.url https://git.eclipse.org/r/cdt/org.eclipse.cdt.git' + /* Workaround for Bug 568904 */ + sh 'git config protocol.version 1' + sh 'git fetch --no-tags --force --progress -- https://git.eclipse.org/r/cdt/org.eclipse.cdt.git +refs/heads/*:refs/remotes/origin/*' + } + checkout([$class: 'GitSCM', branches: [[name: '*/cdt_10_2']], doGenerateSubmoduleConfigurations: false, extensions: [[$class: 'CheckoutOption', timeout: 20], [$class: 'CloneOption', depth: 0, noTags: true, reference: '', shallow: false, timeout: 20]], submoduleCfg: [], userRemoteConfigs: [[url: 'https://git.eclipse.org/r/cdt/org.eclipse.cdt.git']]]) + } + } + } + stage('Run build') { + steps { + container('cdt') { + timeout(activity: true, time: 20) { + withEnv(['MAVEN_OPTS=-Xmx768m -Xms768m']) { + sh "wget https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16%2B36/OpenJDK16-jdk_x64_linux_hotspot_16_36.tar.gz" + sh 'tar xf OpenJDK16-jdk_x64_linux_hotspot_16_36.tar.gz && JAVA_HOME=$PWD/jdk-16+36 PATH=$JAVA_HOME/bin:$PATH /usr/share/maven/bin/mvn \ + clean verify -B -V \ + -Dmaven.test.failure.ignore=true \ + -DexcludedGroups=flakyTest,slowTest \ + -P baseline-compare-and-replace \ + -Ddsf.gdb.tests.timeout.multiplier=50 \ + -Dindexer.timeout=300 \ + -P production \ + -Dmaven.repo.local=/home/jenkins/.m2/repository \ + --settings /home/jenkins/.m2/settings.xml \ + ' + } + } + } + } + } + } + post { + always { + container('cdt') { + junit '*/*/target/surefire-reports/*.xml,terminal/plugins/org.eclipse.tm.terminal.test/target/surefire-reports/*.xml' + archiveArtifacts '*/*/target/surefire-reports/**,terminal/plugins/org.eclipse.tm.terminal.test/target/surefire-reports/**,**/target/work/data/.metadata/.log,releng/org.eclipse.cdt.repo/target/org.eclipse.cdt.repo.zip,releng/org.eclipse.cdt.repo/target/repository/**,releng/org.eclipse.cdt.testing.repo/target/org.eclipse.cdt.testing.repo.zip,releng/org.eclipse.cdt.testing.repo/target/repository/**,debug/org.eclipse.cdt.debug.application.product/target/product/*.tar.gz,debug/org.eclipse.cdt.debug.application.product/target/products/*.zip,debug/org.eclipse.cdt.debug.application.product/target/products/*.tar.gz,debug/org.eclipse.cdt.debug.application.product/target/repository/**,lsp4e-cpp/org.eclipse.lsp4e.cpp.site/target/repository/**,lsp4e-cpp/org.eclipse.lsp4e.cpp.site/target/org.eclipse.lsp4e.cpp.repo.zip' + } + } + } +} diff --git a/jenkins/pipelines/cdt/cdt-master-java16.Jenkinsfile b/jenkins/pipelines/cdt/cdt-master-java16.Jenkinsfile new file mode 100644 index 0000000..445fda6 --- /dev/null +++ b/jenkins/pipelines/cdt/cdt-master-java16.Jenkinsfile @@ -0,0 +1,69 @@ +pipeline { + agent { + kubernetes { + yamlFile 'jenkins/pod-templates/cdt-full-pod-standard.yaml' + } + } + options { + timestamps() + disableConcurrentBuilds() + } + stages { + stage('Process info') { + steps { + container('cdt') { + timeout(activity: true, time: 20) { + withEnv(['MAVEN_OPTS=-Xmx768m -Xms768m']) { + sh "ps -AHf" + sh "cat /etc/passwd | tail -1" + } + } + } + } + } + stage('Git Clone') { + steps { + container('cdt') { + timeout(activity: true, time: 20) { + /* Running the git fetch command manually is a workaround. See https://bugs.eclipse.org/bugs/show_bug.cgi?id=560283#c16 */ + sh 'git config remote.origin.url https://git.eclipse.org/r/cdt/org.eclipse.cdt.git' + /* Workaround for Bug 568904 */ + sh 'git config protocol.version 1' + sh 'git fetch --no-tags --force --progress -- https://git.eclipse.org/r/cdt/org.eclipse.cdt.git +refs/heads/*:refs/remotes/origin/*' + } + checkout([$class: 'GitSCM', branches: [[name: '*/master']], doGenerateSubmoduleConfigurations: false, extensions: [[$class: 'CheckoutOption', timeout: 20], [$class: 'CloneOption', depth: 0, noTags: true, reference: '', shallow: false, timeout: 20]], submoduleCfg: [], userRemoteConfigs: [[url: 'https://git.eclipse.org/r/cdt/org.eclipse.cdt.git']]]) + } + } + } + stage('Run build') { + steps { + container('cdt') { + timeout(activity: true, time: 20) { + withEnv(['MAVEN_OPTS=-Xmx768m -Xms768m']) { + sh "wget https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16%2B36/OpenJDK16-jdk_x64_linux_hotspot_16_36.tar.gz" + sh 'tar xf OpenJDK16-jdk_x64_linux_hotspot_16_36.tar.gz && JAVA_HOME=$PWD/jdk-16+36 PATH=$JAVA_HOME/bin:$PATH /usr/share/maven/bin/mvn \ + clean verify -B -V \ + -Dmaven.test.failure.ignore=true \ + -DexcludedGroups=flakyTest,slowTest \ + -P baseline-compare-and-replace \ + -Ddsf.gdb.tests.timeout.multiplier=50 \ + -Dindexer.timeout=300 \ + -P production \ + -Dmaven.repo.local=/home/jenkins/.m2/repository \ + --settings /home/jenkins/.m2/settings.xml \ + ' + } + } + } + } + } + } + post { + always { + container('cdt') { + junit '*/*/target/surefire-reports/*.xml,terminal/plugins/org.eclipse.tm.terminal.test/target/surefire-reports/*.xml' + archiveArtifacts '*/*/target/surefire-reports/**,terminal/plugins/org.eclipse.tm.terminal.test/target/surefire-reports/**,**/target/work/data/.metadata/.log,releng/org.eclipse.cdt.repo/target/org.eclipse.cdt.repo.zip,releng/org.eclipse.cdt.repo/target/repository/**,releng/org.eclipse.cdt.testing.repo/target/org.eclipse.cdt.testing.repo.zip,releng/org.eclipse.cdt.testing.repo/target/repository/**,debug/org.eclipse.cdt.debug.application.product/target/product/*.tar.gz,debug/org.eclipse.cdt.debug.application.product/target/products/*.zip,debug/org.eclipse.cdt.debug.application.product/target/products/*.tar.gz,debug/org.eclipse.cdt.debug.application.product/target/repository/**,lsp4e-cpp/org.eclipse.lsp4e.cpp.site/target/repository/**,lsp4e-cpp/org.eclipse.lsp4e.cpp.site/target/org.eclipse.lsp4e.cpp.repo.zip' + } + } + } +}