-
Improvement
-
Resolution: Fixed
-
Minor
-
None
e.g. something like this
pipeline { agent { kubernetes { label 'mypod' podTemplate { containerTemplate { name 'maven' image 'maven:3.3.9-jdk-8-alpine' ttyEnabled true command 'cat' } containerTemplate { name 'node' image 'node:9.2' ttyEnabled true command 'cat' } } } } environment { CONTAINER_ENV_VAR = 'container-env-var-value' } stages { stage('Run maven') { steps { container('maven') { sh 'echo INSIDE_CONTAINER_ENV_VAR = ${CONTAINER_ENV_VAR}' sh 'mvn -version' } } } stage('Run npm') { steps { container('node') { sh 'echo INSIDE_CONTAINER_ENV_VAR = ${CONTAINER_ENV_VAR}' sh 'npm -version' } } } } }
- is duplicated by
-
JENKINS-46658 declarative syntax only allows one container?
- Closed
- is related to
-
JENKINS-48050 Replace Declarative Docker agent directive with new implementation
- In Progress
-
JENKINS-46336 Sidecar docker containers for declarative
- Open