1
0
mirror of https://github.com/SAP/jenkins-library.git synced 2024-12-14 11:03:09 +02:00
sap-jenkins-library/documentation/docs/steps/dockerExecute.md
Daniel Kurzynski 22ee06dc17 Enable configuration via yaml file + mavenExecute as example (#18)
* Enable configuration via yaml file
* Add documentation 
* Add tests
2017-12-06 12:03:06 +01:00

1.3 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 [:]
  • dockerImage Name of the docker image that should be used. If empty, Docker is not used.
  • dockerEnvVars Environment variables to set in the container, e.g. [http_proxy:'proxy:8080']
  • dockerOptions Docker options to be set when starting the container.
  • dockerVolumeBind Volumes that should be mounted into the container.

Exceptions

None

Example

dockerExecute(dockerImage: 'maven:3.5-jdk-7'){
    sh "mvn clean install"
}