From: garciadeblas Date: Tue, 12 Sep 2017 09:05:31 +0000 (+0200) Subject: useradd and groupadd changes in stage2 picked from master to v2.0 X-Git-Url: https://osm.etsi.org/gitweb/?a=commitdiff_plain;h=86aef2ee74065e73e1861148bb8d12db6a8688d5;p=osm%2Fdevops.git useradd and groupadd changes in stage2 picked from master to v2.0 Change-Id: I6994bad7b6bc6fd8eba2420120c3a8f8f87995e3 Signed-off-by: garciadeblas --- diff --git a/jenkins/ci-pipelines/ci_stage_2.groovy b/jenkins/ci-pipelines/ci_stage_2.groovy index c17a7310..00c18e4d 100644 --- a/jenkins/ci-pipelines/ci_stage_2.groovy +++ b/jenkins/ci-pipelines/ci_stage_2.groovy @@ -38,19 +38,22 @@ def ci_pipeline(mdg,url_prefix,project,branch,refspec,revision,build_system) { project_checkout(url_prefix,project,refspec,revision) } + stage('License Scan') { + sh "devops/tools/license_scan.sh" + } + 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' }