Change-Id: I47fc730d27ff852d94b024be4e11adf3817aa011
Signed-off-by: Mike Marchetti <mmarchetti@sandvine.com>
container_name = "${project}-${branch}".toLowerCase()
stage('Docker-Build') {
+ sh '''
+ echo RUN groupadd -o -g $(id -g) -r jenkins >> Dockerfile
+ echo RUN useradd -o -u $(id -u) --create-home -r -g jenkins jenkins >> Dockerfile
+ '''
sh "docker build -t ${container_name} ."
}
withDockerContainer("${container_name}") {
- stage('Docker-Setup') {
- sh '''
- groupadd -o -g $(id -g) -r jenkins
- useradd -o -u $(id -u) --create-home -r -g jenkins jenkins
- '''
- }
stage('Test') {
sh 'devops-stages/stage-test.sh'
}