Wiki source code of Jenkins Shared Library

Last modified by Boris Folgmann on 2025/11/03 09:41

Hide last authors
DOaaS Operator 1.1 1 {{toc/}}
2
3 = DevOps-as-a-Service Open Source Pipeline Library =
4
5 DevOps-as-a-Service provides a standardized Jenkins Shared Library to be used for all your builds. See [[https:~~/~~/prd.sdc.t-systems.net/bitbucket/projects/DEVOPSAAS/repos/sdcloud-caas-jenkins-libs/browse>>url:https://prd.sdc.t-systems.net/bitbucket/projects/DEVOPSAAS/repos/sdcloud-caas-jenkins-libs/browse||shape="rect"]] for the source code and additional documentation like e.g. release notes.
6
7 == Getting Started ==
8
Boris Folgmann 7.2 9 Since the Shared Library is globally configured on all Jenkins instances managed by DevOps-as-a-Service you just need to place the following very short Jenkinsfile in the root folder of your git repository to automatically build your maven, node or go project or simply build a container using a Dockerfile.
DOaaS Operator 1.1 10
11 {{code}}
12 @Library('sdcloud') _
13
14 sdcPipeline()
15 {{/code}}
16
17 Calling sdcPipeline() starts an automatically configured, standardized build and deployment pipeline.
18 The pipeline requires a node labeled with 'docker' to execute successfully. To run on other types of Jenkins agents set the //useNode //argument as described below.
19
20 == Pipeline features ==
21
22 What the pipeline currently does is visualised in the following image which shows an example for a maven-based Java project.
23
Boris Folgmann 9.2 24 [[image:1762161531690-966.png||data-xwiki-image-style-border="true" height="247" width="1654"]]
DOaaS Operator 1.1 25
Boris Folgmann 10.1 26 1. **sdcPipeline **prints some valuable information about this shared Jenkinslib. Allocates a node (Jenkins Agent) to start executing the pipeline.
27 1. **Checkout**: checking out the source code from git.
28 1. **JDK**: If a pom.xml is found, your favorite JDK or the current default is selected .
29 1. **Maven Build**: If a pom.xml is found, a maven build is done.
30 1. If there's no pom.xml, but a package.json is found a nodejs build is done.
Achim Mahnke 3.3 31 1. If there is no pom.xml or package.json but a go.mod file, a go build is done.
DOaaS Operator 1.1 32 1. Then the following stages are executed in parallel
Boris Folgmann 10.1 33 11. **Analysis**: For maven projects the Java source code is checked by checkstyle, pmd and spotbugs. Furthermore the job output will be checked for any warnings generated by maven, javac or javadoc.
34 If Python modules (.py files) exist in the git repository they will be analyzed using pylint and flake8. If pylint or flake8 are not available on the Jenkins agent the steps will be skipped. Python files that are generated or downloaded into the workspace will not be checked. The results will be displayed on the classical Jenkins build page after the build. For Go projects, the Go test tool is used to run all tests and produce a coverage output file for SonarQube. Additionally, the gotestsum tool is used to produce a report which is picked up by Jenkins.
35 If SonarQube is configured fore this Jenkins instance, a **Sonar Scan** is performed on the agent and the result is pushed to SonarQube for further processing.
36 11. **Security**:
37 111. If it's not a feature or bugfix branch, a dependency check is done which checks if e.g. libraries are used which have known vulnerabilities. The results will be displayed in Jenkins after the build.
38 111. If Dependency Track is enabled for the current project, an SBOM file is created and archived in the build. In addition it's pushed to Dependency Track. Jenkins will wait for DepTrack to process the SBOM and display information about found potential vulnerabilities in the build.
39 11. **Docker**: this will also work for projects which are neither maven, nodejs or go. A Dockerfile is enough to trigger this part of the pipeline.
40 111. **Build Container Image**: If a Dockerfile is found a docker image is built.
41 111. **Test Container Image**: The image is started as an isolated container on the Jenkins agent. Any loglines written to stdout or stderr by the container will be displayed.A smoke test is performed which is a simple query for a valid answer on the exposed port of the container.
Boris Folgmann 11.1 42 111. **Push Container Image**: If the smoke test was successful the container image will be pushed to the image registry.
Boris Folgmann 10.1 43 For easy identification of the image 3 image tags are defined:
DOaaS Operator 1.1 44 1111. BRANCH_NAME-BUILD_NUMBER (e.g. 'production-1014')
45 1111. BRANCH_NAME-GIT_HASH (e.g. 'develop-8a7c4f2')
46 1111. BRANCH_NAME-latest (e.g. 'feature-PKEY-42-latest')
47 1111. (If BRANCH_NAME is defaultBranch the prefix 'BRANCH_NAME-' will not be included.)
Boris Folgmann 10.1 48 111. **Create Helm Chart**: When a chart/Chart.yaml is found and it's not a pull-request, a Helm Chart will be created and pushed to the Helm Chart repository.
49 1. **Yamllint **will check all YAML files in the workspace for errors and warnings. This is done at this place since the Create Helm Chart stage modifies or creates YAML files which should be also checked before the pipeline proceeds.
50 1. **Deploy application**: when depolyHelmChart is set to true the Helm chart will be deployed to the Kubernestes cluster and namespace of your choice. Not done in the example diagram.
51 1. **Trivy Results**: if a container image was pushed to Harbor as the container registry, the results of the Trivy security scan are fetched from Harbor
52 1. **Sonar Results**: finally the pipeline waits for the result of the Sonar Quality Gate to decide on the success of the build.
DOaaS Operator 1.1 53
54 == {{id name="pipeline_customization"/}}Pipeline Customization ==
55
56 By passing named arguments to sdcPipline() e.g. sdcPipeline(imageName: 'nginx-demo', imageTag: 'v1.4') you can change the default configuration of the pipeline.
57
58 (% class="table-bordered" style="width:100.0%" %)
59 (% class="active" %)|=(((
60 Category
61 )))|=(((
62 Argument
63 )))|=(((
64 Default
65 )))|=(((
66 Description
67 )))
68 |=(% rowspan="4" %)(((
69 Job execution
70 )))|(((
71 decorateOutput
72 )))|(((
73 true
74 )))|(((
75 Enables timestamps and colorization for the console output when set to true.
76 )))
77 |allocateNode|true|(((
78 Specifies if a node should be allocated for executing the sdcPipeline code.
79
80 If you set this to false you will need to put your sdcPipeline() call into a node {} block.
81 )))
82 |(((
83 useNode
84 )))|(((
85 'docker'
86 )))|(((
87 Specifies which node should be allocated and used by the pipeline if allocateNode is true.
88
89 Pass a label or name of a configured Jenkins agent.
90 )))
91 |(((
92 defaultBranch
93 )))|(((
94 'master'
95 )))|(((
96 This branch will be the integration branch for work. At some points the pipeline will behave differently, if the default branch or another branch ist currently being built.
97 )))
98 |=(% rowspan="5" %)(((
99 Programming language and build tool
100 )))|(((
101 jdk
102 )))|(((
103 'jdk11'
104 )))|(((
105 JDK to use for all Java operations. Refers to a symbolic name of a Java tool configuration in Jenkins.
106 )))
107 |(((
108 mvnCommand
109 )))|(((
110 'mvn clean verify'
111 )))|(((
112 maven command to execute for building maven projects.
113 )))
114 |(((
115 mavenSettingsConfig
116 )))|(((
117 ''
118 )))|(((
119 Select a maven settings element from File Config Provider. The settings element in the settings.xml file contains elements used to define values which configure Maven execution in various ways, like the pom.xml, but should not be bundled to any specific project, or distributed to an audience. These include values such as the local repository location, alternate remote repository servers, and authentication information.
120
121 See also [[doc:Jenkins.Using Maven Artifact Repositories in Jenkins.WebHome]].
122 )))
123 |(((
124 nodejs
125 )))|(((
126 'nodejs'
127 )))|(((
128 Node.js to use for all node operations like e.g. calling npm. Refers to a symbolic name of a nodejs tool configuration in Jenkins.
129 )))
130 |(((
131 npmCommand
132 )))|(((
133 'npm install && npm run build ~-~-prod'
134 )))|(((
Achim Mahnke 3.4 135 npm command to execute for building Node.JS projects.
DOaaS Operator 1.1 136 )))
Boris Folgmann 6.2 137 |= |go|'go'|Golang version to use.
138 Refers to a symbolic name of a go tool configuration in Jenkins.
Achim Mahnke 3.4 139 |= |goBuildCommand|(((
140 'go build -o app cmd/server/main.go'
Achim Mahnke 4.1 141 )))|go build run. Should be overridden for your project.
142 |= |goTestCommand|'gotestsum ~-~-format pkgname ~-~-junitfile report.xml ~-~- -failfast -race -coverprofile=coverage.out -tags=test ./...'|Runs gotestsum tool which in turn calls 'go test' for all packages in the project. Should be overridden for your project. The gotestsum tool is available out-of-the-box and produces a report file which is picked up by Jenkins automatically.
DOaaS Operator 1.1 143 |=(% rowspan="10" %)(((
Boris Folgmann 10.1 144 Container build
DOaaS Operator 1.1 145 )))|(((
146 dockerBuildPath
147 )))|(((
148 '.' (current directory)
149 )))|(((
150 Path to use for building the Docker container.
151 )))
152 |(((
153 dockerBuildArgs
154 )))|(((
155 '' (empty string)
156 )))|(((
157 Any additional arguments for Docker build.
158 )))
159 |(((
160 dockerfile
161 )))|(((
162 dockerBuildPath/Dockerfile
163 )))|(((
164 Dockerfile to use for building the Docker container.
165 )))
166 |(((
167 imageName
168 )))|(((
169 artifactId from pom.xml for maven projects
170
171 name of the build job for all other project types
172 )))|(((
173 Name to be used for the built Docker image.
174 )))
175 |(((
176 imagePath
177 )))|(((
178 Name of the project folder in Jenkins. That's the PROJECTKEY from the self-service portal
179 )))|(((
180 Path to prepend before the imageName.
181 )))
182 |(((
183 imageTag
184 )))|(((
185 nothing
186 )))|(((
187 Additional tag to set on the container. It will be automatically prefixed with the branch name, except for the defaultBranch.
188 )))
189 |(((
190 gitHashLength
191 )))|(((
192 7
193 )))|(((
194 Number of digits from the git hash that will be used as an image tag on the container image to label the build.
195 )))
196 |(((
197 gitCredentialsId
198 )))|(((
199 'PROJECTKEY-git' (credential which was added to your project folder in Jenkins when the project was set up by the self-service portal)
200 )))|(((
201 Name of credentials used to connect to Bitbucket API. May be used to connect to alternative SCM tools in the future.
202 )))
203 |(((
204 pullDockerRegistry
205 )))|(((
206 '[[https:~~/~~/registry-CUSTOMER.devops.t-systems.net>>url:https://registry-CUSTOMER.devops.t-systems.net||shape="rect"]]' (docker registry of your DOaaS instance)
207 )))|(((
208 If you need to pull base images during the Docker build from a docker registry that requires authentication you have to use this to specify it.
209 )))
210 |(((
211 pullDockerRegistryCredentialsId
212 )))|(((
213 'doaas-PROJECTKEY+jenkins-push-harbor' or 'PROJECTKEY-jenkins' (which were added to the credentials of your project folder in Jenkins when the project was set up by the DevOps Portal. While the first is added for Harbor, the second is added for Nexus OSS. That means that the library will automatically choose the best default for you. Please note that Harbor will be prefered, if both tools are used in the project.)
214 )))|(((
215 Id of the Jenkins Credentials which have to be used to authenticate to the //pullDockerRegistry//.
216 )))
217 |=(% rowspan="7" %)(((
Boris Folgmann 10.1 218 Container test
DOaaS Operator 1.1 219 )))|(((
220 skipSmokeTest
221 )))|(((
222 false
223 )))|(((
224 Set to true to skip the container smoke test after the build.
225 )))
226 |(((
227 containerArgs
228 )))|(((
229 '' (empty string)
230 )))|(((
231 Arguments to pass to the container for the smoke test.
232 )))
233 |(((
234 containerPort
235 )))|(((
236 80
237 )))|(((
238 Exposed port of the container that is used to check for an answer during the smoke test.
239 )))
240 |(((
241 containerProtocol
242 )))|(((
243 'http'
244 )))|(((
245 Protocol to use when trying to connect to the port of the container. Possible values: 'http', 'tcp', 'udp'. 'http' will be tested with curl, 'tcp' and 'udp' will be tested with ncat.
246 )))
247 |(((
248 containerContextPath
249 )))|(((
250 '' (empty string)
251 )))|(((
252 contextPath to query for the smoke test if the container protocol is 'http'
253 )))
254 |(((
255 containerMaxLoglineTime
256 )))|(((
257 15
258 )))|(((
259 After starting the container the smoke tests monitors stdout of the container for loglines. After containerMaxLoglineTime which is specified in seconds have passed without a new logline found, the container is expected to be up and running and the test query is performed. Increase if your container doesn't write loglines that often and seems to be not ready when the test query is performed.
260 )))
261 |(((
262 containerMaxStartupTime
263 )))|(((
264 180 (3 minutes)
265 )))|(((
266 Total time in seconds after which the container is expected to be up and running even if it's still writing loglines to stdout. After this time has passed the container will be queried for an answer.
267 )))
268 |=(% rowspan="2" %)(((
Boris Folgmann 10.1 269 Image push
DOaaS Operator 1.1 270 )))|(((
271 pushDockerRegistry
272 )))|(((
273 '[[https:~~/~~/registry-CUSTOMER.devops.t-systems.net>>url:https://registry-CUSTOMER.devops.t-systems.net||shape="rect"]]' (docker registry of your DOaaS instance)
274 )))|(((
275 Docker registry to which the built image will be pushed after a successful smoke test.
276 )))
277 |(((
278 pushDockerRegistryCredentialsId
279 )))|(((
280 'doaas-PROJECTKEY+jenkins-push-harbor' or 'PROJECTKEY-jenkins' (which were added to the credentials of your project folder in Jenkins when the project was set up by the DevOps Portal. While the first is added for Harbor, the second is added for Nexus OSS. That means that the library will automatically choose the best default for you. Please note that Harbor will be prefered, if both tools are used in the project.)
281 )))|(((
282 Id of the Jenkins Credentials which have to be used to authenticate to the //pullDockerRegistry//.
283 )))
284 |=(% rowspan="6" %)(((
Boris Folgmann 10.1 285 Helm Chart
DOaaS Operator 1.1 286 )))|(((
287 helmChartPath
288 )))|(((
289 './chart'
290 )))|(((
291 Specifies the path to the YAML files for the helm command.
292 )))
293 |(((
294 appName
295 )))|(((
296 artifactId from pom.xml for maven projects
297
298 name of the build job for all other project types
299 )))|(((
300 Name of the application. Used to build the name of the Helm chart.
301 )))
302 |(((
303 appVersion
304 )))|(((
305 version from pom.xml for maven projects
306
307 '1.0.0' for all other project types
308 )))|(((
309 Version of the application. Used to set the app version of the Helm chart.
310 )))
311 |(((
312 chartVersion
313 )))|(((
314 appVersion with '00' appended
315 )))|(((
316 Version of the Helm chart. Used to set the chart version of the Helm chart.
317 )))
318 |(((
319 helmRegistry
320 )))|(((
Boris Folgmann 6.3 321 Helm registry of your DOaaS instance, which is usally 'https:~/~/registry-CUSTOMER.devops.t-systems.net/chartrepo/PROJECTKEY'
DOaaS Operator 1.1 322 )))|(((
Boris Folgmann 6.3 323 Helm registry to which the packaged Helm chart is uploaded.
324
325
DOaaS Operator 1.1 326 )))
327 |(((
328 helmRegistryCredentialsId
329 )))|(((
330 'doaas-PROJECTKEY+jenkins-push-harbor' or 'PROJECTKEY-jenkins' (which were added to the credentials of your project folder in Jenkins when the project was set up by the DevOps Portal. While the first is added for Harbor, the second is added for Nexus OSS. That means that the library will automatically choose the best default for you. Please note that Harbor will be prefered, if both tools are used in the project.)
331 )))|(((
332 Id of the Jenkins Credentials which have to be used to authenticate to the Helm registry for acccessing Helm charts.
333 )))
334 |=(% rowspan="4" %)(((
335 Container image signature
336 )))|(((
337 signImages
338 )))|(((
339 false
340 )))|(((
341 When set to true, it activates signing of generated Docker images.
342 )))
343 |(((
344 signingNotaryServer
345 )))|(((
346 '[[https:~~/~~/notary.external.otc.telekomcloud.com>>url:https://notary.external.otc.telekomcloud.com||shape="rect"]]' (Magenta Trusted Registry)
347 )))|(((
348 Specifies the Notary service to be used for signing.
349 )))
350 |(((
351 signingPassphraseCredentialsId
352 )))|(((
353 'docker-trust-PROJECTKEY-passphrase'
354 )))|(((
355 Id of the Jenkins Credentials for passphrase of signers keyfile.
356 )))
357 |(((
358 signingKeyfileCredentialsId
359 )))|(((
360 'docker-trust-PROJECTKEY-keyfile'
361 )))|(((
362 Id of the Jenkins Credentials for signers private keyfile.
363 )))
Boris Folgmann 7.1 364 |=(% colspan="1" rowspan="8" %)(((
DOaaS Operator 1.1 365 Static Source Code Analysis
Boris Folgmann 6.7 366 )))|(((
DOaaS Operator 1.1 367 checkstyleConfig
368 )))|(((
369 best-practice releaxed configuration
370 )))|(((
371 Name of a config file to use for checkstyle. If not set a best-practice[[ relaxed configuration >>url:https://prd.sdc.t-systems.net/bitbucket/projects/DEVOPSAAS/repos/sdcloud-caas-jenkins-libs/browse/resources/com/tsystems/sdc/jenkinslib/checkstyle.xml||shape="rect"]]is used which is different from the original  Sun[[ Java Style>>url:https://checkstyle.org/sun_style.html||shape="rect"]].
372 To get the old behavior simply specify 'sun_checks.xml' to get the original Sun Checks. As an alternative 'google_checks.xml' can be used for the Google Checks which is another ruleset predefined in the checkstyle scanner tool.
373 For a custom configuration specify a filesystem path, a URL, or a classpath resource. This parameter expects that the contents of the location conforms to the xml format (Checkstyle Checker module) configuration of rulesets.
374 )))
375 |(((
376 skipBlames
377 )))|(((
378 false
379 )))|(((
380 If set to true all recordIssues steps will skip creating the SCM blames. This speeds up the processing of the results of static source code analyis. As a consequence you will not be able to see who introduced a problem into the code.
381 )))
382 |(((
383 yamlConfig
384 )))|(((
385 best-practice releaxed configuration
386 )))|(((
387 Name of a config file to use for yamllint. If not set a best-practice[[ relaxed configuration >>url:https://prd.sdc.t-systems.net/bitbucket/projects/DEVOPSAAS/repos/sdcloud-caas-jenkins-libs/browse/resources/com/tsystems/sdc/jenkinslib/yamllint.yml||shape="rect"]]is used which is different from the original yamllint[[ config>>url:https://yamllint.readthedocs.io/en/stable/configuration.html#default-configuration||shape="rect"]].
388 )))
389 |(((
390 sonarQube
391 )))|(((
Boris Folgmann 3.1 392 true for the defaultBranch and for pull-requests, if a SonarQube version is detected which supports scanning multiple branches
DOaaS Operator 1.1 393
Boris Folgmann 2.4 394 false for all other branches
DOaaS Operator 1.1 395 )))|(((
Boris Folgmann 3.1 396 Set this to true to force a SonarQube scan for the current branch. Usually this makes only sense if you explicitly want to scan feature and bugfix branches.
397
398 If not set or set to false, the default branch will be scanned automatically as well as pull-requests, if a SonarQube version is detected which supports scanning multiple branches. This is currently the case for SonarQube Developer and Enterprise editions. The free SonarQube Community edition supports just one branch.
DOaaS Operator 1.1 399 )))
400 |(((
401 sonarScanMavenOpts
402 )))|(((
403 ''
404 )))|(((
405 For huge source codes it can happen that the sonar scanner aborts with java.lang.OutOfMemoryError. In this case the memory that is availalbe for the sonar scanner needs to be increased. Try something like '-Xmx512m' to set a larger heap space for the JVM that is executing the maven-based sonar scan. '-Xmx3g' should be enough for most source codes, but make sure that your Jenkins agent has enough memory to cope with that.
406 )))
407 |sonarScanOpts|''|For huge source codes it can happen that the sonar scanner aborts with java.lang.OutOfMemoryError. In this case the memory that is availalbe for the sonar scanner needs to be increased. Try something like '-Xmx512m' to set a larger heap space for the JVM that is executing the
408 sonar scan. '-Xmx3g' should be enough for most source codes, but make sure that your Jenkins agent has enough memory to cope with that.
409 |(((
410 sonarSources
411 )))|(((
412 'src/main' for maven projects
413
414 null for non-maven projects
415 )))|(((
416 (% class="content-wrapper" %)
417 (((
418 Comma-separated paths to directories containing main source files to scan with SonarQube. Defaults to 'src/main' and therefore will automatically discover folders like src/main/java, src/main/webapp or src/main/resources. This makes sure to not only scan Java sources, but also for example JSP, CSS and HTML files.
419
420 Sonar scanning will fail if the configured directory itself is not found at all. This can happen if you have defined an alternative <sourceDirectory> in your pom.xml. If this is the case, you can disable sonar scanning by adding
421
422 {{code language="xml"}}
423 <properties>
424 <sonar.skip>true</sonar.skip>
425 </properties>
426 {{/code}}
427
428 to the pom.xml. If this is not what you want, set sonarSources to {{code language="none"}}null{{/code}}. This will make sure that sonar.sources are not explicitly passed to the sonar scanner. This will allow you to specify sonar.sources in the pom.xml like in the following example:
429
430 {{code language="xml"}}
431 <properties>
432 <sonar.source>src/main/java,src/main/webapp</sonar.sources>
433 </properties>
434 {{/code}}
435 )))
436 )))
Boris Folgmann 2.2 437 |sonarQualityGate| |Sets the desired quality gate to use for the scan result in SonarQube.
Boris Folgmann 2.1 438 If not specified, the quality gate is not changed.
439 As a default, SonarQube will use the quality gate "Sonar way" for new scan results.
Boris Folgmann 7.1 440 |=(% colspan="1" rowspan="5" %)Dependency Check|skipDependencyCheck|false|Set to true to skip the dependency-check.
441 |dependencyCheckTool|'dependency-check'|Defines which named dependency-check tool should be used.
442 |dependencyCheckMvnArgs|'-DassemblyAnalyzerEnabled=false'|Additional arguments which are be passed to dependency-check for maven projects.(((
Boris Folgmann 6.10 443 See [[Dependency Check Maven Configuration>>https://jeremylong.github.io/DependencyCheck/dependency-check-maven/configuration.html]] for more information.
444 )))
Boris Folgmann 7.1 445 |dependencyCheckArgs|'~-~-disableAssembly'|Addtional arguments which are be passed to dependency-check. See [[Dependency>>url:https://jeremylong.github.io/DependencyCheck/dependency-check-cli/arguments.html||shape="rect"]][[ Check CLI Arguments>>url:https://jeremylong.github.io/DependencyCheck/dependency-check-cli/arguments.html||shape="rect"]] for more information.
446 |dependencyCheckNvdApiKeyCredentialsId|'dependency-check-nvdapikey'|If you have your own NVD API Key, set it as a credential of type text in Jenkins. Then specify the credential id using this argument. It will be automatically passed to dependency-check. There will be no error if no credential is found. Just the NVD download will be slower. Please note, on DevOps-as-a-Service a shared NVD API Key is automatically supplied for the default credential id.
Boris Folgmann 5.1 447 |=(% colspan="1" rowspan="2" %)Dependency Track|depTrackCredentialsId|'PROJECTKEY-deptrack-projectcreator'|(((
448 Id of the Jenkins Credential which has to be used to authenticate to Dependency Track for publishing the SBOM.
449 )))
450 |depTrackClassifier|'application'|The component type (e.g. application, library, firmware, ...) that should be set in the SBOM file.
451 Will be later shown as classifier for the project in Dependency Track.
452 See [[CycloneDX Metadata Component Type>>https://cyclonedx.org/docs/1.6/json/#metadata_component_type]] for supported values.
Boris Folgmann 6.1 453 |=(% colspan="1" rowspan="2" %)Trivy|trivySeverity|'High'|String which sets the minimum severity of Trivy findings that has to be reached to mark the Trivy Results stage as unstable.
Boris Folgmann 5.2 454 Possible values are: "None", "Unknown", "Negligible", "Low", "Medium", "High", "Critical".
Boris Folgmann 6.1 455 |trivyBuildResult|'SUCCESS'|String which sets the overall build result when the result of the Trivy scan reaches trivyServerity.
456 Possible values are: "SUCCESS", "UNSTABLE" or "FAILURE"
DOaaS Operator 1.1 457 |=(% rowspan="7" %)(((
458 Deployment
459 )))|(((
460 deployHelmChart
461 )))|(((
462 false
463 )))|(((
464 Boolean that activates or deactivates the automatic deployment of the Helm-Chart.
465 )))
466 |(((
467 kubeconfigCredentialsId
468 )))|(((
469 'kubeconfig-deployer-PROJECTKEY'
470 )))|(((
471 Id of the Jenkins credential which contains the kubeconfig file that should be used for deployment. The file is required to authorize access to the Kubernetes cluster.
472 )))
473 |(((
474 kubernetesNamespace
475 )))|(((
476 'default'
477 )))|(((
478 Name of the namespace in Kubernetes, to which the Chart will be deployed.
479 )))
480 |(((
481 helmValuesOverrideFile
482 )))|(((
483 'chart/values.yaml'
484 )))|(((
485 Name of the YAML file which contains specific values that should be overridden for the automatic deployment. The location needs to be specified relative to the Jenkinsfile.
486 )))
487 |(((
488 helmSetValues
489 )))|(((
490 ''
491 )))|(((
492 Set values using the format "key1=val1,key2=val2,..." for the automatic deployment.
493
494 While helmValuesOverrideFile is usally something static you can use this to specify different values depending on e.g. conditions in your Jenkinsfile.
495
496 Will be ignored if set to null, empty string or just white space.
497 )))
498 |(((
499 helmReleaseName
500 )))|(((
501 artifactId from pom.xml for maven projects
502
503 name of the build job for all other project types
504 )))|(((
505 Name of the Helm Release which will be installed or upgraded in your cluster.
506 )))
507 |(((
508 helmLockResource
509 )))|(((
510 null
511 )))|(((
512 Using [[lock>>url:https://www.jenkins.io/doc/pipeline/steps/lockable-resources/#lock-lock-shared-resource||shape="rect"]] the specified resource will be locked for the execution of any
513
514 (% class="code" %)
515 (((
516 helm upgrade
517 )))
518
519 or
520
521 (% class="code" %)
522 (((
523 helm uninstall
524 )))
525
526 command. This makes sense if deployHelmChart is used to upgrade an deployment in an environment which is currently used, e.g. for automated testing. In this case wrap your test in a lock statement with the same resource name. Defaults to null, which will not lock any resource.
527 )))