Changes for page Jenkinsfile

Last modified by Gábor Mándity on 2025/09/18 08:09

From version 2.1
edited by Gábor Mándity
on 2025/09/18 08:09
Change comment: There is no comment for this version
To version 1.2
edited by Gábor Mándity
on 2025/09/18 08:07
Change comment: There is no comment for this version

Summary

Details

Page properties
Content
... ... @@ -138,13 +138,13 @@
138 138  
139 139  The supported symbolic names are listed at the start page of your Jenkins (e.g. [[https:~~/~~/CUSTOMER.devops.t-systems.net/jenkins/>>url:https://CUSTOMER.devops.t-systems.net/jenkins/||shape="rect"]]) and start with 'go'. As an example 'go1.25' would be referring to the latest release of Golang v1.25. The short name 'go' is usually set to the recommended LTS version of Golang.
140 140  
141 -The following examples use 'go1.25'.
141 +The following examples use 'go'.
142 142  
143 143  {{code language="groovy" title="**ℹ Scripted Pipeline**"}}
144 -def root = tool type: 'go', name: go1.25
145 -withEnv(["GOROOT=${root}", "PATH+GO=${root}/bin"]) {
146 - sh 'go version'
147 -}
144 +env.NODEJS_HOME = "${tool 'nodejs18'}"
145 +env.PATH="${env.NODEJS_HOME}/bin:${env.PATH}"
146 +sh 'node --version'
147 +sh 'npm --version'
148 148  {{/code}}
149 149  
150 150  When you use the [[doc:Jenkins.Jenkins Shared Library.WebHome]] you simply do
... ... @@ -152,7 +152,7 @@
152 152  {{code language="groovy" title="**ℹ Scripted Pipeline**"}}
153 153  @Library('sdcloud') _
154 154  
155 -sdcPipeline(go: 'go1.25')
155 +sdcPipeline(nodejs: 'nodejs18')
156 156  {{/code}}
157 157  
158 -to use the go version of your choice. See [[doc:Jenkins.Jenkins Shared Library.WebHome||anchor="PipelineCustomization"]] for more information.
158 +to use the nodejs version of your choice. See [[doc:Jenkins.Jenkins Shared Library.WebHome||anchor="PipelineCustomization"]] for more information.