You've already forked sap-jenkins-library
mirror of
https://github.com/SAP/jenkins-library.git
synced 2025-12-03 23:10:20 +02:00
1.4 KiB
1.4 KiB
dockerExecute
Description
Executes a closure inside a docker container with the specified docker image. The workspace is mounted into the docker image. Proxy environment variables defined on the Jenkins machine are also available in the Docker container.
Parameters
| parameter | mandatory | default | possible values |
|---|---|---|---|
dockerImage |
no | '' | |
dockerEnvVars |
no | [:] | |
dockerOptions |
no | '' | |
dockerVolumeBind |
no | [:] |
dockerImageName of the docker image that should be used. If empty, Docker is not used.dockerEnvVarsEnvironment variables to set in the container, e.g. [http_proxy:'proxy:8080']dockerOptionsDocker options to be set when starting the container. It can be a list or a string.dockerVolumeBindVolumes that should be mounted into the container.
Step configuration
None
Exceptions
None
Example
dockerExecute(dockerImage: 'maven:3.5-jdk-7'){
sh "mvn clean install"
}