Skip to content
Snippets Groups Projects
Commit 86aef2ee authored by garciadeblas's avatar garciadeblas
Browse files

useradd and groupadd changes in stage2 picked from master to v2.0


Change-Id: I6994bad7b6bc6fd8eba2420120c3a8f8f87995e3
Signed-off-by: default avatargarciadeblas <gerardo.garciadeblas@telefonica.com>
parent 2d4312ab
No related branches found
No related tags found
No related merge requests found
...@@ -38,19 +38,22 @@ def ci_pipeline(mdg,url_prefix,project,branch,refspec,revision,build_system) { ...@@ -38,19 +38,22 @@ def ci_pipeline(mdg,url_prefix,project,branch,refspec,revision,build_system) {
project_checkout(url_prefix,project,refspec,revision) project_checkout(url_prefix,project,refspec,revision)
} }
stage('License Scan') {
sh "devops/tools/license_scan.sh"
}
container_name = "${project}-${branch}".toLowerCase() container_name = "${project}-${branch}".toLowerCase()
stage('Docker-Build') { 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} ." sh "docker build -t ${container_name} ."
} }
withDockerContainer("${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') { stage('Test') {
sh 'devops-stages/stage-test.sh' 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