Skip to content
Snippets Groups Projects
Commit 9a7634f7 authored by marchettim's avatar marchettim
Browse files

Revert "Add Jenkins user to Docker image earlier"

This reverts commit dda707b5.

Change-Id: I8129da9c306d202e722306341d6243b710eb5a31
parent dda707b5
No related branches found
No related tags found
No related merge requests found
......@@ -45,12 +45,16 @@ def ci_pipeline(mdg,url_prefix,project,branch,refspec,revision,build_system) {
container_name = "${project}-${branch}".toLowerCase()
stage('Docker-Build') {
sh "echo 'RUN groupadd -o -g " + "id -g".execute().text + " -r jenkins \\' >> Dockerfile"
sh "echo ' && useradd -o -u " + "id -u".execute().text + " --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'
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment