1
0
mirror of https://github.com/SAP/jenkins-library.git synced 2025-09-16 09:26:22 +02:00

Enhance step documentation (#4490)

This commit is contained in:
Ashly Mathew
2023-07-31 11:15:39 +02:00
committed by GitHub
parent 08d22a62e2
commit cc080c8ce6
3 changed files with 8 additions and 2 deletions

View File

@@ -7,6 +7,7 @@
## Kubernetes support
If the Jenkins is setup on a Kubernetes cluster, then you can execute the closure inside a container of a pod by setting an environment variable `ON_K8S` to `true`. However, it will ignore `containerPortMappings`, `dockerOptions` and `dockerVolumeBind` values.
`dockerExecute` step will internally invoke [dockerExecuteOnKubernetes](dockerExecuteOnKubernetes.md) step and execute the closure inside a pod.
## ${docGenConfiguration}
@@ -56,7 +57,7 @@ dockerExecute(script: this, dockerImage: 'maven:3.5-jdk-7'){
}
```
In the above example, the `dockerEcecute` step will internally invoke [dockerExecuteOnKubernetes](dockerExecuteOnKubernetes.md) step and execute the closure inside a pod.
In the above example, the `dockerExecute` step will internally invoke [dockerExecuteOnKubernetes](dockerExecuteOnKubernetes.md) step and execute the closure inside a pod.
## Example 3: Run closure inside a container which is attached to a sidecar container (as for example used in [seleniumExecuteTests](seleniumExecuteTests.md)

View File

@@ -58,7 +58,9 @@ import groovy.transform.Field
*/
'dockerRegistryUrl',
/**
* Non Kubernetes only:
* The credentials for the docker registry of type username/password as we rely on docker jenkins plugin. If left empty, images are pulled anonymously.
* For Kubernetes cases, pass secret name of type `kubernetes.io/dockerconfigjson` via `additionalPodProperties` parameter (The secret should already be created and present in the environment)
*/
'dockerRegistryCredentialsId',
/**

View File

@@ -59,7 +59,10 @@ import hudson.AbortException
* as key and the corresponding value as value. The value can also be
* a nested structure.
* The properties will be added to the pod spec inside node `spec` at the
* same level like e.g. `containers`.
* same level like e.g. `containers`
* for eg., additionalPodProperties: [
* imagePullSecrets: ['secret-name']
* ]
* This property provides some kind of an expert mode. Any property
* which is not handled otherwise by the step can be set. It is not
* possible to overwrite e.g. the `containers` property or to