-
Bug
-
Resolution: Fixed
-
Blocker
-
-
PCT 0.1.0
batmat has worked on adding integration tests to PCT. This is done in this PR: https://github.com/jenkinsci/plugin-compat-tester/pull/140
With this PR, the Jenkinsfile of PCT runs a test well known to be successful on Java 8 and Java 11.
But when testing this PR and a previous one (https://github.com/jenkinsci/plugin-compat-tester/pull/133) we found out that PCT fails because it hasn't run any test.
In the PR #133 Baptiste reverted the changes on https://github.com/jenkinsci/plugin-compat-tester/pull/115 and the integration test for PCT ran successfully. So it seems that there is something wrong with this PR (#133).
This task is to look into it and fix the problem.
Acceptance criteria:
- Create a PR with a fix that makes the Integration Tests introduced on PR #140 run successfully
Reproducer
Currently, the following command exits immediately without running any test at all:
$ curl -sL http://mirrors.jenkins.io/war-stable/2.164.2/jenkins.war --output jenkins.war $ docker run --rm -ti \ -v maven-repo:/root/.m2 -v $(pwd)/jenkins.war:/pct/jenkins.war:ro \ -v $(pwd)/out:/pct/out -e JDK_VERSION=11 \ -e ARTIFACT_ID=buildtriggerbadge -e VERSION=buildtriggerbadge-2.10 \ jenkins/pct@sha256:caafc379935bae50f77aad8df680b74f79f0f73bec77ae95740e73fa2a22f476 + '[' 0 -eq 1 ']' + '[' -n buildtriggerbadge ']' + echo 'Running PCT for plugin buildtriggerbadge' Running PCT for plugin buildtriggerbadge + CUSTOM_MAVEN_SETTINGS=/pct/m2-settings.xml + FAIL_ON_ERROR_ARG= + '[' -n '' ']' + FAIL_ON_ERROR_ARG=-failOnError + '[' -f /pct/m2-settings.xml ']' + MVN_SETTINGS_FILE=/pct/default-m2-settings.xml + '[' -n '' ']' + '[' -z buildtriggerbadge ']' + CHECKOUT_SRC=https://github.com/jenkinsci/buildtriggerbadge-plugin.git + '[' -f /pct/jenkins.war ']' + mkdir -p /pct/tmp + cp /pct/jenkins.war /pct/tmp/jenkins.war + JENKINS_WAR_PATH=/pct/tmp/jenkins.war + WAR_PATH_OPT='-war /pct/tmp/jenkins.war ' ++ groovy /pct/scripts/readJenkinsVersion.groovy /pct/tmp/jenkins.war + JENKINS_VERSION=2.164.2 + echo 'Using custom Jenkins WAR v. 2.164.2 from /pct/tmp/jenkins.war' Using custom Jenkins WAR v. 2.164.2 from /pct/tmp/jenkins.war + [[ 2.164.2 =~ .*SNAPSHOT.* ]] + SHOULD_CHECKOUT=1 + '[' -z buildtriggerbadge-2.10 ']' + echo 'Will be testing with buildtriggerbadge:buildtriggerbadge-2.10, shouldCheckout=1' Will be testing with buildtriggerbadge:buildtriggerbadge-2.10, shouldCheckout=1 + extra_java_opts=() + [[ -n '' ]] + LOCAL_CHECKOUT_ARG= + '[' 1 -eq 1 ']' + '[' -z '' ']' + mkdir -p /pct/tmp/localCheckoutDir + cd /pct/tmp/localCheckoutDir + TMP_CHECKOUT_DIR=/pct/tmp/localCheckoutDir/undefined + '[' -e /pct/plugin-src/pom.xml ']' + echo 'Checking out from https://github.com/jenkinsci/buildtriggerbadge-plugin.git:buildtriggerbadge-2.10' Checking out from https://github.com/jenkinsci/buildtriggerbadge-plugin.git:buildtriggerbadge-2.10 + git clone https://github.com/jenkinsci/buildtriggerbadge-plugin.git Cloning into 'buildtriggerbadge-plugin'... remote: Enumerating objects: 59, done. remote: Counting objects: 100% (59/59), done. remote: Compressing objects: 100% (45/45), done. remote: Total 1379 (delta 23), reused 39 (delta 9), pack-reused 1320 Receiving objects: 100% (1379/1379), 220.04 KiB | 0 bytes/s, done. Resolving deltas: 100% (416/416), done. ++ ls . + mv buildtriggerbadge-plugin /pct/tmp/localCheckoutDir/undefined + cd /pct/tmp/localCheckoutDir/undefined + git checkout buildtriggerbadge-2.10 Note: checking out 'buildtriggerbadge-2.10'. You are in 'detached HEAD' state. You can look around, make experimental changes and commit them, and you can discard any commits you make in this state without impacting any branches by performing another checkout. If you want to create a new branch to retain commits you create, you may do so (now or later) by using -b with the checkout command again. Example: git checkout -b <new-branch-name> HEAD is now at cebb6b7... [maven-release-plugin] prepare release buildtriggerbadge-2.10 + cd /pct/tmp/localCheckoutDir/undefined + '[' -z buildtriggerbadge ']' + mv /pct/tmp/localCheckoutDir/undefined /pct/tmp/localCheckoutDir/buildtriggerbadge + LOCAL_CHECKOUT_ARG='-localCheckoutDir /pct/tmp/localCheckoutDir/buildtriggerbadge' + mkdir -p /pct/tmp/work + mkdir -p /pct/out + TEST_JDK_HOME=/usr/lib/jvm/java-11-openjdk-amd64 + TEST_JAVA_ARGS=''\'' -Xmx768M -Djava.awt.headless=true -Djdk.net.URLClassPath.disableClassPathURLCheck=true'\''' + pctExitCode=0 + echo java -jar /pct/pct-cli.jar -reportFile /pct/out/pct-report.xml -workDirectory /pct/tmp/work -war /pct/tmp/jenkins.war -skipTestCache true -failOnError -localCheckoutDir /pct/tmp/localCheckoutDir/buildtriggerbadge -includePlugins buildtriggerbadge -mvn /usr/bin/mvn -m2SettingsFile /pct/default-m2-settings.xml -testJDKHome /usr/lib/jvm/java-11-openjdk-amd64 -testJavaArgs \' -Xmx768M -Djava.awt.headless=true '-Djdk.net.URLClassPath.disableClassPathURLCheck=true'\''' '|| echo $? > /pct/tmp/pct_exit_code' + chmod +x /pct/tmp/pct_command + cat /pct/tmp/pct_command java -jar /pct/pct-cli.jar -reportFile /pct/out/pct-report.xml -workDirectory /pct/tmp/work -war /pct/tmp/jenkins.war -skipTestCache true -failOnError -localCheckoutDir /pct/tmp/localCheckoutDir/buildtriggerbadge -includePlugins buildtriggerbadge -mvn /usr/bin/mvn -m2SettingsFile /pct/default-m2-settings.xml -testJDKHome /usr/lib/jvm/java-11-openjdk-amd64 -testJavaArgs ' -Xmx768M -Djava.awt.headless=true -Djdk.net.URLClassPath.disableClassPathURLCheck=true' || echo $? > /pct/tmp/pct_exit_code + sh -ex /pct/tmp/pct_command + java -jar /pct/pct-cli.jar -reportFile /pct/out/pct-report.xml -workDirectory /pct/tmp/work -war /pct/tmp/jenkins.war -skipTestCache true -failOnError -localCheckoutDir /pct/tmp/localCheckoutDir/buildtriggerbadge -includePlugins buildtriggerbadge -mvn /usr/bin/mvn -m2SettingsFile /pct/default-m2-settings.xml -testJDKHome /usr/lib/jvm/java-11-openjdk-amd64 -testJavaArgs -Xmx768M -Djava.awt.headless=true -Djdk.net.URLClassPath.disableClassPathURLCheck=true Checking /pct/tmp/jenkins.war for plugin split metadata… Checking jdk version as splits may depend on a jdk version Not adding jaxb 2.163 2.3.0 11 as split because jdk specified 11 is newer than running jdk 11 found splits: [maven-plugin 1.296 1.296, subversion 1.310 1.0, cvs 1.340 0.1, ant 1.430 1.0, javadoc 1.430 1.0, external-monitor-job 1.467 1.0, ldap 1.467 1.0, pam-auth 1.467 1.0, mailer 1.493 1.2, matrix-auth 1.535 1.0.2, windows-slaves 1.547 1.0, antisamy-markup-formatter 1.553 1.0, matrix-project 1.561 1.0, junit 1.577 1.0, bouncycastle-api 2.16 2.16.0, command-launcher 2.86 1.0, jdk-tool 2.112 1.0] found split cycles: [script-security jaxb, cvs jaxb, script-security windows-slaves, javadoc jaxb, mailer jaxb, credentials matrix-auth, jdk-tool jaxb, bouncycastle-api jaxb, script-security bouncycastle-api, matrix-project jaxb, junit jaxb, subversion jaxb, ant jaxb, ldap jaxb, antisamy-markup-formatter jaxb, script-security matrix-auth, maven-plugin jaxb, external-monitor-job jaxb, script-security matrix-project, pam-auth jaxb, matrix-auth jaxb, script-security command-launcher, credentials windows-slaves, windows-slaves jaxb, command-launcher jaxb, script-security antisamy-markup-formatter] 12:53:23.581 [main] DEBUG org.reflections.Reflections - going to scan these urls: jar:file:/pct/pct-cli.jar!/ 12:53:23.721 [main] INFO org.reflections.Reflections - Reflections took 136 ms to scan 1 urls, producing 40 keys and 78 values Hook: org.jenkins.tools.test.hook.BlueOceanHook Hook: org.jenkins.tools.test.hook.DeclarativePipelineHook Hook: org.jenkins.tools.test.hook.StructsHook Hook: org.jenkins.tools.test.hook.SkipUIHelperPlugins 12:53:23.740 [main] DEBUG org.reflections.Reflections - going to scan these urls: jar:file:/pct/pct-cli.jar!/ 12:53:23.807 [main] INFO org.reflections.Reflections - Reflections took 67 ms to scan 1 urls, producing 40 keys and 78 values Hook: org.jenkins.tools.test.hook.TransformPom Loaded TransformPom 12:53:23.809 [main] DEBUG org.reflections.Reflections - going to scan these urls: jar:file:/pct/pct-cli.jar!/ 12:53:23.861 [main] INFO org.reflections.Reflections - Reflections took 52 ms to scan 1 urls, producing 40 keys and 78 values Hook: org.jenkins.tools.test.hook.MultiParentCompileHook Loaded multi-parent compile hook Scanned contents of /pct/tmp/jenkins.war: {"id":"default","core":{"name":"core","version":"2.164.2","url":"https://foobar"},"plugins":{}} Scanned contents of /pct/tmp/jenkins.war: {"id":"default","core":{"name":"core","version":"2.164.2","url":"https://foobar"},"plugins":{"antisamy-markup-formatter":{"url":"jar:file:/pct/tmp/jenkins.war!/WEB-INF/detached-plugins/antisamy-markup-formatter.hpi","name":"antisamy-markup-formatter","version":"1.1","dependencies":[]},"ssh-credentials":{"url":"jar:file:/pct/tmp/jenkins.war!/WEB-INF/detached-plugins/ssh-credentials.hpi","name":"ssh-credentials","version":"1.10","dependencies":[{"name":"credentials","version":"1.16.1","optional":"false"}]},"cvs":{"url":"jar:file:/pct/tmp/jenkins.war!/WEB-INF/detached-plugins/cvs.hpi","name":"cvs","version":"2.11","dependencies":[]},"jdk-tool":{"url":"jar:file:/pct/tmp/jenkins.war!/WEB-INF/detached-plugins/jdk-tool.hpi","name":"jdk-tool","version":"1.0","dependencies":[]},"matrix-auth":{"url":"jar:file:/pct/tmp/jenkins.war!/WEB-INF/detached-plugins/matrix-auth.hpi","name":"matrix-auth","version":"1.1","dependencies":[]},"credentials":{"url":"jar:file:/pct/tmp/jenkins.war!/WEB-INF/detached-plugins/credentials.hpi","name":"credentials","version":"2.1.2","dependencies":[]},"jaxb":{"url":"jar:file:/pct/tmp/jenkins.war!/WEB-INF/detached-plugins/jaxb.hpi","name":"jaxb","version":"2.3.0","dependencies":[]},"windows-slaves":{"url":"jar:file:/pct/tmp/jenkins.war!/WEB-INF/detached-plugins/windows-slaves.hpi","name":"windows-slaves","version":"1.0","dependencies":[]},"ssh-slaves":{"url":"jar:file:/pct/tmp/jenkins.war!/WEB-INF/detached-plugins/ssh-slaves.hpi","name":"ssh-slaves","version":"1.15","dependencies":[{"name":"credentials","version":"2.1.2","optional":"false"},{"name":"ssh-credentials","version":"1.6.1","optional":"false"}]},"ldap":{"url":"jar:file:/pct/tmp/jenkins.war!/WEB-INF/detached-plugins/ldap.hpi","name":"ldap","version":"1.11","dependencies":[{"name":"mailer","version":"1.8","optional":"false"}]},"subversion":{"url":"jar:file:/pct/tmp/jenkins.war!/WEB-INF/detached-plugins/subversion.hpi","name":"subversion","version":"1.54","dependencies":[]},"pam-auth":{"url":"jar:file:/pct/tmp/jenkins.war!/WEB-INF/detached-plugins/pam-auth.hpi","name":"pam-auth","version":"1.1","dependencies":[]},"javadoc":{"url":"jar:file:/pct/tmp/jenkins.war!/WEB-INF/detached-plugins/javadoc.hpi","name":"javadoc","version":"1.1","dependencies":[]},"external-monitor-job":{"url":"jar:file:/pct/tmp/jenkins.war!/WEB-INF/detached-plugins/external-monitor-job.hpi","name":"external-monitor-job","version":"1.4","dependencies":[]},"translation":{"url":"jar:file:/pct/tmp/jenkins.war!/WEB-INF/detached-plugins/translation.hpi","name":"translation","version":"1.10","dependencies":[]},"command-launcher":{"url":"jar:file:/pct/tmp/jenkins.war!/WEB-INF/detached-plugins/command-launcher.hpi","name":"command-launcher","version":"1.0","dependencies":[{"name":"script-security","version":"1.18.1","optional":"false"}]},"ant":{"url":"jar:file:/pct/tmp/jenkins.war!/WEB-INF/detached-plugins/ant.hpi","name":"ant","version":"1.2","dependencies":[]},"display-url-api":{"url":"jar:file:/pct/tmp/jenkins.war!/WEB-INF/detached-plugins/display-url-api.hpi","name":"display-url-api","version":"2.0","dependencies":[]},"matrix-project":{"url":"jar:file:/pct/tmp/jenkins.war!/WEB-INF/detached-plugins/matrix-project.hpi","name":"matrix-project","version":"1.4.1","dependencies":[{"name":"script-security","version":"1.13","optional":"false"}]},"bouncycastle-api":{"url":"jar:file:/pct/tmp/jenkins.war!/WEB-INF/detached-plugins/bouncycastle-api.hpi","name":"bouncycastle-api","version":"2.16.0","dependencies":[]},"script-security":{"url":"jar:file:/pct/tmp/jenkins.war!/WEB-INF/detached-plugins/script-security.hpi","name":"script-security","version":"1.18.1","dependencies":[]},"mailer":{"url":"jar:file:/pct/tmp/jenkins.war!/WEB-INF/detached-plugins/mailer.hpi","name":"mailer","version":"1.20","dependencies":[{"name":"display-url-api","version":"1.0","optional":"false"}]},"junit":{"url":"jar:file:/pct/tmp/jenkins.war!/WEB-INF/detached-plugins/junit.hpi","name":"junit","version":"1.6","dependencies":[]},"maven-plugin":{"url":"jar:file:/pct/tmp/jenkins.war!/WEB-INF/detached-plugins/maven-plugin.hpi","name":"maven-plugin","version":"2.14","dependencies":[{"name":"javadoc","version":"1.0","optional":"false"},{"name":"junit","version":"1.6","optional":"false"},{"name":"mailer","version":"1.7","optional":"false"},{"name":"token-macro","version":"1.1","optional":"true"}]}}} Using custom Test JDK home: /usr/lib/jvm/java-11-openjdk-amd64 Starting plugin tests on core coordinates : MavenCoordinates[groupId=org.jenkins-ci.plugins, artifactId=plugin, version=2.164.2] Plugin ant not in included plugins => test skipped ! Plugin antisamy-markup-formatter not in included plugins => test skipped ! Plugin bouncycastle-api not in included plugins => test skipped ! Plugin command-launcher not in included plugins => test skipped ! Plugin credentials not in included plugins => test skipped ! Plugin cvs not in included plugins => test skipped ! Plugin display-url-api not in included plugins => test skipped ! Plugin external-monitor-job not in included plugins => test skipped ! Plugin javadoc not in included plugins => test skipped ! Plugin jaxb not in included plugins => test skipped ! Plugin jdk-tool not in included plugins => test skipped ! Plugin junit not in included plugins => test skipped ! Plugin ldap not in included plugins => test skipped ! Plugin mailer not in included plugins => test skipped ! Plugin matrix-auth not in included plugins => test skipped ! Plugin matrix-project not in included plugins => test skipped ! Plugin maven-plugin not in included plugins => test skipped ! Plugin pam-auth not in included plugins => test skipped ! Plugin script-security not in included plugins => test skipped ! Plugin ssh-credentials not in included plugins => test skipped ! Plugin ssh-slaves not in included plugins => test skipped ! Plugin subversion not in included plugins => test skipped ! Plugin translation not in included plugins => test skipped ! Plugin windows-slaves not in included plugins => test skipped ! No HTML report is generated, because it has been disabled or no tests have been executed + '[' -f /pct/tmp/pct_exit_code ']' + [[ 0 != \0 ]]
- is caused by
-
JENKINS-56312 PCT not taking into account jdk version for detached plugins
- Resolved
- links to