diff --git a/.gitpod.yml b/.gitpod.yml new file mode 100644 index 000000000..a096e0dbd --- /dev/null +++ b/.gitpod.yml @@ -0,0 +1,12 @@ +tasks: + - init: mvn clean verify + +vscode: + extensions: + - bierner.markdown-preview-github-styles + - vscjava.vscode-java-pack + - redhat.java + - vscjava.vscode-java-debug + - vscjava.vscode-java-dependency + - vscjava.vscode-java-test + - vscjava.vscode-maven diff --git a/.mvn/extensions.xml b/.mvn/extensions.xml index a65d82e1b..9ac2968bc 100644 --- a/.mvn/extensions.xml +++ b/.mvn/extensions.xml @@ -2,6 +2,6 @@ io.jenkins.tools.incrementals git-changelist-maven-extension - 1.3 + 1.4 diff --git a/README.md b/README.md index be8bc3a81..41fad51ab 100644 --- a/README.md +++ b/README.md @@ -345,7 +345,7 @@ Also make sure you have chosen the appropriate GitLab instance from the 'GitLab } } ``` -* Or use the `updateGitlabCommitStatus` step to use a custom value for updating the commit status. You could use try/catch blocks or other logic to send fine-grained status of the build to GitLab. Valid statuses are defined by GitLab and documented here: https://docs.gitlab.com/ce/api/pipelines.html +* Or use the `updateGitlabCommitStatus` step to use a custom value for updating the commit status. You could use try/catch blocks or other logic to send fine-grained status of the build to GitLab. Valid statuses are defined by GitLab and documented here: https://docs.gitlab.com/ee/api/commits.html#post-the-build-status-to-a-commit ```groovy node() { stage('Checkout') { checkout } @@ -393,6 +393,9 @@ pipeline { success { updateGitlabCommitStatus name: 'build', state: 'success' } + aborted { + updateGitlabCommitStatus name: 'build', state: 'canceled' + } } options { gitLabConnection('your-gitlab-connection-name') @@ -403,6 +406,7 @@ pipeline { stages { stage("build") { steps { + updateGitlabCommitStatus name: 'build', state: 'running' echo "hello world" } } diff --git a/pom.xml b/pom.xml index 84bdfa95c..13bcf4108 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ org.jenkins-ci.plugins plugin - 4.40 + 4.48 gitlab-plugin @@ -16,11 +16,11 @@ 1.5.37 -SNAPSHOT - 2.289.3 + 2.346.3 High jenkinsci/${project.artifactId} 1.4.0 - 5.13.0 + 5.14.0 @@ -242,6 +242,10 @@ org.jetbrains annotations + + org.jenkins-ci.main + jenkins-test-harness + @@ -276,8 +280,15 @@ org.postgresql postgresql - 42.4.0 + 42.5.0 test + + + + org.checkerframework + checker-qual + + org.jenkins-ci.plugins @@ -304,11 +315,6 @@ - - com.google.guava - guava - 18.0 - commons-io commons-io @@ -317,8 +323,8 @@ io.jenkins.tools.bom - bom-2.289.x - 1438.v6a_2c29d73f82 + bom-2.346.x + 1643.v1cffef51df73 import pom @@ -330,7 +336,7 @@ joda-time joda-time - 2.10.14 + 2.12.0 net.sf.jopt-simple @@ -445,7 +451,7 @@ io.fabric8 docker-maven-plugin - 0.40.1 + 0.40.2 true diff --git a/src/test/java/com/dabsquared/gitlabjenkins/workflow/UpdateGitLabCommitStatusStepTest.java b/src/test/java/com/dabsquared/gitlabjenkins/workflow/UpdateGitLabCommitStatusStepTest.java index 7f74149fe..699bab346 100644 --- a/src/test/java/com/dabsquared/gitlabjenkins/workflow/UpdateGitLabCommitStatusStepTest.java +++ b/src/test/java/com/dabsquared/gitlabjenkins/workflow/UpdateGitLabCommitStatusStepTest.java @@ -48,7 +48,9 @@ public void updateGitlabCommitStatus() throws Throwable { String pipelineText = IOUtils.toString( getClass().getResourceAsStream("pipeline/updateGitlabCommitStatus.groovy")); - rr.then(j -> _updateGitlabCommitStatus(j, port, pipelineText)); + rr.then(j -> { + _updateGitlabCommitStatus(j, port, pipelineText); + }); } private static void _updateGitlabCommitStatus(JenkinsRule j, int port, String pipelineText)