11---
2- name : Bumps the node docker images versions
2+ name : Bump NodeJS version ( docker image) to follow packer-image infra version
33
44scms :
55 default :
@@ -14,163 +14,62 @@ scms:
1414 branch : " {{ .github.branch }}"
1515
1616sources :
17- nodeLatestLTSVersionFromJson :
18- name : Get value from json
19- kind : json
17+ getDeployedPackerImageVersion :
18+ kind : file
19+ name : Retrieve the current version of the Packer images used in production
2020 spec :
21- file : https://nodejs.org/dist/index.json
22- key : .(lts!=false).version
21+ file : https://raw.githubusercontent.com/jenkins-infra/kubernetes-management/refs/heads/main/config/jenkins_infra.ci.jenkins.io.yaml
22+ matchpattern : ' galleryImageVersion:\s"(.*)" '
2323 transformers :
24- - trimprefix : " v"
25-
26- # Using the githubrelease allows us to retrieve the changelog information
27- # It will fail if the version mentioned by appVersion does not have an equivalent published
28- # GitHub release
29- nodeLatestVersion :
30- kind : githubrelease
31- name : Get latest nodejs version
24+ - findsubmatch :
25+ pattern : ' galleryImageVersion:\s"(.*)"'
26+ captureindex : 1
27+ getNodeVersionFromPackerImages :
28+ kind : file
29+ name : Get the NodeJS version set in packer-images
3230 dependson :
33- - nodeLatestLTSVersionFromJson
34- spec :
35- owner : " nodejs"
36- repository : " node"
37- token : " {{ requiredEnv .github.token }}"
38- username : " {{ .github.username }}"
39- versionfilter :
40- kind : semver
41- pattern : ' {{ source "nodeLatestLTSVersionFromJson" }}'
42- transformers :
43- - trimprefix : " v"
44- alpineLatestVersion :
45- kind : githubrelease
46- name : " Get the latest Alpine Linux version"
31+ - getDeployedPackerImageVersion
4732 spec :
48- owner : " alpinelinux"
49- repository : " aports" # Its release process follows Alpine's
50- token : " {{ requiredEnv .github.token }}"
51- username : " {{ .github.username }}"
52- versionfilter :
53- kind : semver
54- pattern : " ~3"
33+ file : https://raw.githubusercontent.com/jenkins-infra/packer-images/{{ source "getDeployedPackerImageVersion" }}/provisioning/tools-versions.yml
34+ matchpattern : ' node.*_version:\s(.*)'
5535 transformers :
5636 - findsubmatch :
57- pattern : >-
58- v(.*)(\.\d+)
37+ pattern : ' node.*_version:\s(.*)'
5938 captureindex : 1
6039
6140conditions :
62- testNodeArg :
63- name : " Does the 'Hello World!' tutorial have a reference to the Node alpine image?"
64- kind : file
65- disablesourceinput : true
66- spec :
67- file : content/doc/pipeline/tour/hello-world.adoc
68- matchpattern : >-
69- .*agent.*docker.*image.*node:.*
70- testNodeInAgentsDocumentation :
71- name : " Does the 'Defining execution environments' documentation have a reference to the Node alpine image?"
72- kind : file
73- disablesourceinput : true
74- spec :
75- file : content/doc/pipeline/tour/agents.adoc
76- matchpattern : >-
77- .*docker.*image.*node:.*
78- testNodeInStyleGuideDocumentation :
79- name : " Does the 'Jenkins Documentation Style Guide' documentation have a reference to the Node alpine image?"
80- kind : file
81- disablesourceinput : true
82- spec :
83- file : STYLEGUIDE.adoc
84- matchpattern : >-
85- .*docker.*image.*node:.*
86- testNodeInUsingDockerWithPipelineDocumentation :
87- name : " Does the 'Using Docker with Pipeline' documentation have a reference to the Node alpine image?"
88- kind : file
89- disablesourceinput : true
90- spec :
91- file : content/doc/book/pipeline/docker.adoc
92- matchpattern : >-
93- .*image.*node:.*
94- testNodeAlpineImagePublished :
95- name : " Test node:<latest_version>-alpine<latest-version> docker image tag"
41+ checkDockerImagePublished :
42+ name : Test node:{{ source "getNodeVersionFromPackerImages" }} docker image tag
43+ sourceid : getNodeVersionFromPackerImages
9644 kind : dockerimage
97- disablesourceinput : true
9845 spec :
9946 image : " node"
100- tag : ' {{ source "nodeLatestVersion" }}-alpine{{ source "alpineLatestVersion" }} '
47+ # # Tag from source
10148
10249targets :
103- updateHelloWorldTutorialNodePipeline :
104- name : " Update the value of the node docker image for pipelines in the 'Hello World!' tutorial"
105- kind : file
106- sourceid : nodeLatestVersion
107- spec :
108- file : content/doc/pipeline/tour/hello-world.adoc
109- matchpattern : >-
110- (.*agent.*docker.*image.*\')node:(.*)(\'.*)
111- replacepattern : >-
112- ${1}node:{{ source "nodeLatestVersion" }}-alpine{{ source "alpineLatestVersion" }}${3}
113- scmid : default
114- updateHelloWorldTutorialNodeScripted :
115- name : " Update the value of the node docker image for scripts in the 'Hello World!' tutorial"
116- kind : file
117- sourceid : nodeLatestVersion
118- spec :
119- file : content/doc/pipeline/tour/hello-world.adoc
120- matchpattern : >-
121- (.*docker.*image.*\')node:(.*)(\'.*)
122- replacepattern : >-
123- ${1}node:{{ source "nodeLatestVersion" }}-alpine{{ source "alpineLatestVersion" }}${3}
124- scmid : default
125- updateAgentsDocumentation :
126- name : " Update the value of the node docker image in the 'Defining execution environments' documentation"
127- kind : file
128- sourceid : nodeLatestVersion
129- spec :
130- file : content/doc/pipeline/tour/agents.adoc
131- matchpattern : >-
132- (.*docker.*image.*\')node:(.*)(\'.*)
133- replacepattern : >-
134- ${1}node:{{ source "nodeLatestVersion" }}-alpine{{ source "alpineLatestVersion" }}${3}
135- scmid : default
136- updateStyleGuideDocumentation :
137- name : " Update the value of the node docker image in the 'Jenkins Documentation Style Guide' documentation"
50+ setNodeImageVersion :
51+ name : " Bump Node Image version in scripts/node"
13852 kind : file
139- sourceid : nodeLatestVersion
53+ sourceid : getNodeVersionFromPackerImages
14054 spec :
141- file : STYLEGUIDE.adoc
142- matchpattern : >-
143- (.*docker.*image.*\')node:(.*)(\'.*)
144- replacepattern : >-
145- ${1}node:{{ source "nodeLatestVersion" }}-alpine{{ source "alpineLatestVersion" }}${3}
55+ file : scripts/node
56+ matchpattern : ' CONTAINER_NAME=node:.*'
57+ replacepattern : ' CONTAINER_NAME=node:{{ source "getNodeVersionFromPackerImages" }}'
14658 scmid : default
147- updateUsingDockerWithPipelineDocumentation :
148- name : " Update the value of the node docker image in the 'Using Docker with Pipeline' documentation "
59+ setNodeVersionFile :
60+ name : " Bump Node version in .node-version "
14961 kind : file
150- sourceid : nodeLatestVersion
62+ sourceid : getNodeVersionFromPackerImages
15163 spec :
152- file : content/doc/book/pipeline/docker.adoc
153- matchpattern : >-
154- (.*image.*\')node:(.*)(\'.*)
155- replacepattern : >-
156- ${1}node:{{ source "nodeLatestVersion" }}-alpine{{ source "alpineLatestVersion" }}${3}
157- scmid : default
158- updateUsingDockerWithPipelineDocumentationDockerExample :
159- name : " Update the value of the node docker image in the 'Using Docker with Pipeline' documentation"
160- kind : file
161- sourceid : nodeLatestVersion
162- spec :
163- file : content/doc/book/pipeline/docker.adoc
164- matchpattern : >-
165- (FROM )node:(.*)(.*)
166- replacepattern : >-
167- ${1}node:{{ source "nodeLatestVersion" }}-alpine{{ source "alpineLatestVersion" }}${3}
64+ file : .node-version
16865 scmid : default
66+
16967actions :
17068 default :
17169 kind : github/pullrequest
17270 scmid : default
173- title : ' [Tutorials and Agents Docs] Bump node LTS alpine docker image version to {{ source "nodeLatestVersion " }}-alpine{{ source "alpineLatestVersion" }} '
71+ title : Bump Node version to {{ source "getNodeVersionFromPackerImages " }} to match packer-images in production
17472 spec :
17573 labels :
17674 - dependencies
75+ - nodejs
0 commit comments