Skip to content

Commit

Permalink
Merge branch 'master' into stable-1.5.x
Browse files Browse the repository at this point in the history
  • Loading branch information
gounthar authored Oct 19, 2022
2 parents 7762980 + f6ff8aa commit a52a546
Show file tree
Hide file tree
Showing 5 changed files with 40 additions and 16 deletions.
12 changes: 12 additions & 0 deletions .gitpod.yml
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion .mvn/extensions.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
<extension>
<groupId>io.jenkins.tools.incrementals</groupId>
<artifactId>git-changelist-maven-extension</artifactId>
<version>1.3</version>
<version>1.4</version>
</extension>
</extensions>
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 <your-scm-config> }
Expand Down Expand Up @@ -393,6 +393,9 @@ pipeline {
success {
updateGitlabCommitStatus name: 'build', state: 'success'
}
aborted {
updateGitlabCommitStatus name: 'build', state: 'canceled'
}
}
options {
gitLabConnection('your-gitlab-connection-name')
Expand All @@ -403,6 +406,7 @@ pipeline {
stages {
stage("build") {
steps {
updateGitlabCommitStatus name: 'build', state: 'running'
echo "hello world"
}
}
Expand Down
32 changes: 19 additions & 13 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>plugin</artifactId>
<version>4.40</version>
<version>4.48</version>
<relativePath />
</parent>
<artifactId>gitlab-plugin</artifactId>
Expand All @@ -16,11 +16,11 @@
<properties>
<revision>1.5.37</revision>
<changelist>-SNAPSHOT</changelist>
<jenkins.version>2.289.3</jenkins.version>
<jenkins.version>2.346.3</jenkins.version>
<spotbugs.threshold>High</spotbugs.threshold> <!-- TODO fix violations -->
<gitHubRepo>jenkinsci/${project.artifactId}</gitHubRepo>
<hpi.compatibleSinceVersion>1.4.0</hpi.compatibleSinceVersion>
<mockserver.version>5.13.0</mockserver.version>
<mockserver.version>5.14.0</mockserver.version>
</properties>


Expand Down Expand Up @@ -242,6 +242,10 @@
<groupId>org.jetbrains</groupId>
<artifactId>annotations</artifactId>
</exclusion>
<exclusion>
<groupId>org.jenkins-ci.main</groupId>
<artifactId>jenkins-test-harness</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
Expand Down Expand Up @@ -276,8 +280,15 @@
<dependency>
<groupId>org.postgresql</groupId>
<artifactId>postgresql</artifactId>
<version>42.4.0</version>
<version>42.5.0</version>
<scope>test</scope>
<exclusions>
<!-- Upper bounds with Guava -->
<exclusion>
<groupId>org.checkerframework</groupId>
<artifactId>checker-qual</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.jenkins-ci.plugins</groupId>
Expand All @@ -304,11 +315,6 @@

<dependencyManagement>
<dependencies>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>18.0</version>
</dependency>
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
Expand All @@ -317,8 +323,8 @@
<dependency>
<!-- Pick up common dependencies for the selected LTS line: https://github.com/jenkinsci/bom#usage -->
<groupId>io.jenkins.tools.bom</groupId>
<artifactId>bom-2.289.x</artifactId>
<version>1438.v6a_2c29d73f82</version>
<artifactId>bom-2.346.x</artifactId>
<version>1643.v1cffef51df73</version>
<scope>import</scope>
<type>pom</type>
</dependency>
Expand All @@ -330,7 +336,7 @@
<dependency>
<groupId>joda-time</groupId>
<artifactId>joda-time</artifactId>
<version>2.10.14</version>
<version>2.12.0</version>
</dependency>
<dependency>
<groupId>net.sf.jopt-simple</groupId>
Expand Down Expand Up @@ -445,7 +451,7 @@
<plugin>
<groupId>io.fabric8</groupId>
<artifactId>docker-maven-plugin</artifactId>
<version>0.40.1</version>
<version>0.40.2</version>
<configuration>
<verbose>true</verbose>
<images>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit a52a546

Please sign in to comment.