diff --git a/Dockerfile b/Dockerfile index 1bbad317a52..16e3726b496 100644 --- a/Dockerfile +++ b/Dockerfile @@ -6,7 +6,7 @@ # Should be kept in sync with jenkins.properties of pom.xml # Patch version is not to be considered, we prefer to base the image off the latest LTS of the line # and keep the dependency on the baseline in pom.xml -FROM jenkins:2.7.4 +FROM jenkins:2.73.2 USER root diff --git a/Dockerfile.build b/Dockerfile.build index 984c6fb878a..3b79117e7e8 100644 --- a/Dockerfile.build +++ b/Dockerfile.build @@ -24,9 +24,15 @@ RUN apt-get update -qqy \ build-essential \ python \ iputils-ping \ + locales \ && rm -rf /var/lib/apt/lists/* \ && sed -i 's/securerandom\.source=file:\/dev\/random/securerandom\.source=file:\/dev\/urandom/' ./usr/lib/jvm/java-8-openjdk-amd64/jre/lib/security/java.security +# Set utf-8 locale +RUN locale-gen en_US.UTF-8 +ENV LANG en_US.UTF-8 +ENV LC_ALL en_US.UTF-8 + #========== # Maven #========== diff --git a/Jenkinsfile b/Jenkinsfile index 03cbea841d4..fe17c9e2254 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -45,15 +45,15 @@ node() { sh "node ./bin/checkshrinkwrap.js" } - stage('ATH - Jenkins 2.46.3') { - sh "cd acceptance-tests && ./run.sh -v=2.46.3 --no-selenium --settings='-s ${env.WORKSPACE}/settings.xml'" + stage('ATH - Jenkins 2.73.2') { + sh "cd acceptance-tests && ./run.sh -v=2.73.2 --no-selenium --settings='-s ${env.WORKSPACE}/settings.xml'" junit 'acceptance-tests/target/surefire-reports/*.xml' - archive 'acceptance-tests/target/screenshots/*' + archive 'acceptance-tests/target/screenshots/**/*' } if (env.JOB_NAME =~ 'blueocean-weekly-ath') { - stage('ATH - Jenkins 2.60.1') { - sh "cd acceptance-tests && ./run.sh -v=2.60.1 --no-selenium --settings='-s ${env.WORKSPACE}/settings.xml'" + stage('ATH - Jenkins 2.73.2') { + sh "cd acceptance-tests && ./run.sh -v=2.73.2 --no-selenium --settings='-s ${env.WORKSPACE}/settings.xml'" junit 'acceptance-tests/target/surefire-reports/*.xml' } } diff --git a/acceptance-tests/runner/runtime-plugins/fake-securitly-realm-plugin/pom.xml b/acceptance-tests/runner/runtime-plugins/fake-securitly-realm-plugin/pom.xml index b6585b6cb9e..d6653225b12 100644 --- a/acceptance-tests/runner/runtime-plugins/fake-securitly-realm-plugin/pom.xml +++ b/acceptance-tests/runner/runtime-plugins/fake-securitly-realm-plugin/pom.xml @@ -6,7 +6,7 @@ org.jenkins-ci.plugins plugin - 2.11 + 2.35 org.jenkins-ci.plugins @@ -16,13 +16,14 @@ - 2.46.3 + 2.73.2 + 8 Fake realm plugin @@ -66,12 +67,12 @@ https://repo.jenkins-ci.org/public/ - - - org.jenkins-ci.main - jenkins-test-harness - 2.15 - - + + + org.jenkins-ci.main + jenkins-test-harness + 2.30 + + diff --git a/acceptance-tests/runner/runtime-plugins/runtime-deps/pom.xml b/acceptance-tests/runner/runtime-plugins/runtime-deps/pom.xml index fb6301e262a..a7b67fe5c03 100644 --- a/acceptance-tests/runner/runtime-plugins/runtime-deps/pom.xml +++ b/acceptance-tests/runner/runtime-plugins/runtime-deps/pom.xml @@ -28,7 +28,7 @@ org.jenkins-ci.plugins plugin - 2.10 + 2.35 org.jenkins-ci.plugins.blueocean @@ -56,7 +56,9 @@ - 2.46.3 + 2.73.2 + 2.30 + 8 diff --git a/acceptance-tests/runner/scripts/args.sh b/acceptance-tests/runner/scripts/args.sh index e45a1fdf2ed..3c0a7826eb9 100644 --- a/acceptance-tests/runner/scripts/args.sh +++ b/acceptance-tests/runner/scripts/args.sh @@ -1,4 +1,4 @@ -JENKINS_VERSION=2.46.3 +JENKINS_VERSION=2.73.2 SELENIUM_VERSION=2.53 MAVEN_SETTINGS="" diff --git a/acceptance-tests/src/main/java/io/blueocean/ath/CustomJenkinsServer.java b/acceptance-tests/src/main/java/io/blueocean/ath/CustomJenkinsServer.java index 41d1b3e8510..9ce575ad115 100644 --- a/acceptance-tests/src/main/java/io/blueocean/ath/CustomJenkinsServer.java +++ b/acceptance-tests/src/main/java/io/blueocean/ath/CustomJenkinsServer.java @@ -42,6 +42,7 @@ public void deleteUserDomainCredential(String userName, String domainName, Strin logger.info("found credential at " + path); } catch (HttpResponseException e) { if (e.getStatusCode() != 404) { + logger.error("error getting credential at " + path); throw e; } // credential doesn't exist; nothing to do diff --git a/acceptance-tests/src/main/nightwatch.json b/acceptance-tests/src/main/nightwatch.json index 37f5cb542c0..695c61ba478 100644 --- a/acceptance-tests/src/main/nightwatch.json +++ b/acceptance-tests/src/main/nightwatch.json @@ -11,12 +11,6 @@ "src/main/js/page_objects/classic_jenkins", "src/main/js/page_objects/blueocean" ], - "screenshots": { - "enabled": true, - "on_failure": true, - "on_error": true, - "path": "target/screenshots" - }, "selenium": { "start_process": false, "server_path": "bin/selenium-server-standalone-2.53.1.jar", @@ -33,6 +27,12 @@ "browserName": "chrome", "javascriptEnabled": true, "acceptSslCerts": true + }, + "screenshots": { + "enabled": true, + "on_failure": true, + "on_error": false, + "path": "target/screenshots" } } } diff --git a/blueocean-events/pom.xml b/blueocean-events/pom.xml index 10286e98c9a..9e30392940a 100644 --- a/blueocean-events/pom.xml +++ b/blueocean-events/pom.xml @@ -51,6 +51,11 @@ com.jcraft jsch + + + org.jenkins-ci + annotation-indexer + diff --git a/blueocean-git-pipeline/pom.xml b/blueocean-git-pipeline/pom.xml index 1ee312e9dad..4c54fce286a 100644 --- a/blueocean-git-pipeline/pom.xml +++ b/blueocean-git-pipeline/pom.xml @@ -49,6 +49,13 @@ git tests test + + + + org.jenkins-ci + annotation-indexer + + org.jenkins-ci.plugins diff --git a/blueocean-pipeline-api-impl/pom.xml b/blueocean-pipeline-api-impl/pom.xml index a2160d448ab..4ba3943675d 100644 --- a/blueocean-pipeline-api-impl/pom.xml +++ b/blueocean-pipeline-api-impl/pom.xml @@ -147,6 +147,13 @@ git tests test + + + + org.jenkins-ci + annotation-indexer + + diff --git a/blueocean-pipeline-api-impl/src/main/java/io/jenkins/blueocean/rest/impl/pipeline/PipelineNodeUtil.java b/blueocean-pipeline-api-impl/src/main/java/io/jenkins/blueocean/rest/impl/pipeline/PipelineNodeUtil.java index 99190a4e376..c31058dd955 100644 --- a/blueocean-pipeline-api-impl/src/main/java/io/jenkins/blueocean/rest/impl/pipeline/PipelineNodeUtil.java +++ b/blueocean-pipeline-api-impl/src/main/java/io/jenkins/blueocean/rest/impl/pipeline/PipelineNodeUtil.java @@ -3,6 +3,7 @@ import com.google.common.base.Predicate; import hudson.model.Action; import hudson.model.Queue; +import hudson.model.queue.CauseOfBlockage; import io.jenkins.blueocean.rest.model.BlueRun; import org.jenkinsci.plugins.pipeline.StageStatus; import org.jenkinsci.plugins.pipeline.SyntheticStage; @@ -153,7 +154,10 @@ public static boolean isParallelBranch(@Nullable FlowNode node){ if (item != null) { String cause = item.getCauseOfBlockage().getShortDescription(); if (cause == null) { - cause = item.task.getCauseOfBlockage().getShortDescription(); + CauseOfBlockage causeOfBlockage = item.task.getCauseOfBlockage(); + if(causeOfBlockage != null) { + return causeOfBlockage.getShortDescription(); + } } return cause; } diff --git a/blueocean-pipeline-api-impl/src/main/java/io/jenkins/blueocean/rest/impl/pipeline/PipelineRunImpl.java b/blueocean-pipeline-api-impl/src/main/java/io/jenkins/blueocean/rest/impl/pipeline/PipelineRunImpl.java index 1aeb35191da..f00bd553284 100644 --- a/blueocean-pipeline-api-impl/src/main/java/io/jenkins/blueocean/rest/impl/pipeline/PipelineRunImpl.java +++ b/blueocean-pipeline-api-impl/src/main/java/io/jenkins/blueocean/rest/impl/pipeline/PipelineRunImpl.java @@ -3,6 +3,7 @@ import hudson.Extension; import hudson.model.Queue; import hudson.model.Run; +import hudson.model.queue.CauseOfBlockage; import hudson.scm.ChangeLogSet; import hudson.scm.ChangeLogSet.Entry; import io.jenkins.blueocean.commons.ServiceException; @@ -39,7 +40,6 @@ import org.slf4j.LoggerFactory; import javax.annotation.Nonnull; -import java.io.IOException; import java.util.Comparator; import java.util.LinkedHashMap; import java.util.Map; @@ -245,8 +245,9 @@ public String getCauseOfBlockage() { Run r = task.runForDisplay(); if (r != null && r.equals(run)) { String cause = i.getCauseOfBlockage().getShortDescription(); - if (task.getCauseOfBlockage() != null) { - cause = task.getCauseOfBlockage().getShortDescription(); + CauseOfBlockage causeOfBlockage = task.getCauseOfBlockage(); + if ( causeOfBlockage != null) { + return causeOfBlockage.getShortDescription(); } return cause; } diff --git a/blueocean-pipeline-api-impl/src/test/java/io/jenkins/blueocean/rest/impl/pipeline/PipelineApiTest.java b/blueocean-pipeline-api-impl/src/test/java/io/jenkins/blueocean/rest/impl/pipeline/PipelineApiTest.java index 889b6785dd3..2fd22738e0f 100644 --- a/blueocean-pipeline-api-impl/src/test/java/io/jenkins/blueocean/rest/impl/pipeline/PipelineApiTest.java +++ b/blueocean-pipeline-api-impl/src/test/java/io/jenkins/blueocean/rest/impl/pipeline/PipelineApiTest.java @@ -13,6 +13,7 @@ import org.jenkinsci.plugins.workflow.cps.CpsFlowDefinition; import org.jenkinsci.plugins.workflow.job.WorkflowJob; import org.jenkinsci.plugins.workflow.job.WorkflowRun; +import org.jenkinsci.plugins.workflow.test.steps.SemaphoreStep; import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; @@ -36,20 +37,20 @@ public void getPipelineRunStopTest() throws Exception { job1.setDefinition(new CpsFlowDefinition("" + "node {" + - " stage ('Build1'); " + - " sh('sleep 60') " + - " stage ('Test1'); " + + " stage ('Build'); " + + " semaphore 's' " + + " stage ('Test'); " + " echo ('Testing'); " + - "}")); + "}", false)); WorkflowRun b1 = job1.scheduleBuild2(0).waitForStart(); - Map r=null; - + SemaphoreStep.waitForStart("s/1", b1); + Map r = null; for (int i = 0; i < 10; i++) { r = request().put("/organizations/jenkins/pipelines/pipeline1/runs/1/stop") .build(Map.class); - if(((String) r.get("state")).equalsIgnoreCase("FINISHED")) - continue; + if(((String) r.get("state")).equals("FINISHED")) + break; Thread.sleep(1000); } Assert.assertEquals(r.get("state"), "FINISHED"); @@ -63,8 +64,8 @@ public void getPipelineRunStopTest() throws Exception { for (int i = 0; i < 10; i++) { r = put("/organizations/jenkins/pipelines/pipeline5/runs/1/stop",null); - if(((String) r.get("state")).equalsIgnoreCase("finished")) - continue; + if(((String) r.get("state")).equals("FINISHED")) + break; Thread.sleep(1000); } Assert.assertEquals(r.get("state"), "FINISHED"); diff --git a/pom.xml b/pom.xml index e46d3938c17..6ac83cb14d6 100644 --- a/pom.xml +++ b/pom.xml @@ -16,9 +16,9 @@ Blue Ocean Parent - 7 + 8 2.8.9 - 2.46.3 + 2.73.2 javadoc-no-fork 1.6 6.4.0 @@ -32,7 +32,7 @@ 0.70 0.00 runtime - 2.27 + 2.30 2.2.2 3.5.1 @@ -347,17 +347,11 @@ workflow-api 2.20 - - org.jenkins-ci.plugins.workflow workflow-job - 2.11.1 + 2.14.1 - org.jenkins-ci.plugins pipeline-graph-analysis @@ -405,17 +399,11 @@ workflow-basic-steps 2.6 - - org.jenkins-ci.plugins.workflow workflow-scm-step - 2.5 + 2.6 - org.jenkins-ci.plugins pipeline-stage-step @@ -490,6 +478,13 @@ org.jenkins-ci.plugins git ${git.version} + + + + org.jenkins-ci + annotation-indexer + + org.jenkins-ci.plugins @@ -695,6 +690,13 @@ ua_parser ua-parser 1.3.0 + + + + commons-collections + commons-collections + + @@ -951,42 +953,42 @@ true - - - org.jenkins-ci.tools - maven-hpi-plugin - - true - ${hpi.dependencyResolution} - - + + + org.jenkins-ci.tools + maven-hpi-plugin + + true + ${hpi.dependencyResolution} + + - - - maven-surefire-plugin - 2.19.1 - - - - hudson.udp - 33849 - - - true - ${concurrency} - - -Djava.awt.headless=true ${argLine} - 0 - - ${project.build.directory}/code-coverage/jacoco.exec - - - + + + maven-surefire-plugin + 2.19.1 + + + + hudson.udp + 33849 + + + true + ${concurrency} + + -Djava.awt.headless=true ${argLine} + 0 + + ${project.build.directory}/code-coverage/jacoco.exec + + +