From c9bfeb93c5c136991ff1d2241492c42ebb09b338 Mon Sep 17 00:00:00 2001 From: Valentin Delaye Date: Tue, 14 Nov 2023 07:44:19 +0100 Subject: [PATCH] Ensure correct bom version when jenkins version updated --- pom.xml | 2 +- .../updatecli.d/update-jenkins-version.yml | 26 +++++++++++++++++++ 2 files changed, 27 insertions(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 0feec80..42ee133 100644 --- a/pom.xml +++ b/pom.xml @@ -48,7 +48,7 @@ io.jenkins.tools.bom - bom-2.401.x + bom-2.414.x 2543.vfb_1a_5fb_9496d pom import diff --git a/updatecli/updatecli.d/update-jenkins-version.yml b/updatecli/updatecli.d/update-jenkins-version.yml index ca10241..8243218 100644 --- a/updatecli/updatecli.d/update-jenkins-version.yml +++ b/updatecli/updatecli.d/update-jenkins-version.yml @@ -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 @@ -28,13 +43,24 @@ targets: file: pom.xml matchpattern: '(.*)' replacepattern: '{{ source `jenkins` }}' + bom: + name: Ensure Jenkins BOM version + sourceid: jenkins + scmid: github + kind: file + spec: + file: pom.xml + matchpattern: 'bom-(.*).x' + replacepattern: '{{ source `bom` }}' actions: jenkins: title: Bump Jenkins version {{ source "jenkins" }} + disablepipelineurl: true kind: github/pullrequest scmid: github targets: - jenkins + - bom spec: labels: - dependencies