Skip to content

Commit

Permalink
Ensure correct bom version when jenkins version updated
Browse files Browse the repository at this point in the history
  • Loading branch information
jonesbusy committed Nov 14, 2023
1 parent 66cd89d commit c9bfeb9
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 1 deletion.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
<dependencies>
<dependency>
<groupId>io.jenkins.tools.bom</groupId>
<artifactId>bom-2.401.x</artifactId>
<artifactId>bom-2.414.x</artifactId>
<version>2543.vfb_1a_5fb_9496d</version>
<type>pom</type>
<scope>import</scope>
Expand Down
26 changes: 26 additions & 0 deletions updatecli/updatecli.d/update-jenkins-version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,21 @@ sources:
github:
token: '{{ requiredEnv .github.token }}'
username: '{{ .github.username }}'
bom:
name: Get latest BOM line
kind: jenkins
spec:
release: stable
transformers:
- trimsuffix: ".(.*)$"
- trimsuffix: ".2"
- trimsuffix: ".3"
- trimsuffix: ".4"
- addprefix: "bom-"
- addsuffix: ".x"
github:
token: '{{ requiredEnv .github.token }}'
username: '{{ .github.username }}'
targets:
jenkins:
name: Update Jenkins Version
Expand All @@ -28,13 +43,24 @@ targets:
file: pom.xml
matchpattern: '<jenkins.version>(.*)</jenkins.version>'
replacepattern: '<jenkins.version>{{ source `jenkins` }}</jenkins.version>'
bom:
name: Ensure Jenkins BOM version
sourceid: jenkins
scmid: github
kind: file
spec:
file: pom.xml
matchpattern: '<artifactId>bom-(.*).x</artifactId>'
replacepattern: '<artifactId>{{ source `bom` }}</artifactId>'
actions:
jenkins:
title: Bump Jenkins version {{ source "jenkins" }}
disablepipelineurl: true
kind: github/pullrequest
scmid: github
targets:
- jenkins
- bom
spec:
labels:
- dependencies
Expand Down

0 comments on commit c9bfeb9

Please sign in to comment.