Merge "Make artifactory server configurable in Jenkins build"
authormarchettim <mmarchetti@sandvine.com>
Sat, 9 Sep 2017 20:18:37 +0000 (22:18 +0200)
committerGerrit Code Review <root@osm.etsi.org>
Sat, 9 Sep 2017 20:18:37 +0000 (22:18 +0200)
1  2 
jenkins/ci-pipelines/ci_stage_2.groovy

@@@ -26,7 -26,7 +26,7 @@@ def project_checkout(url_prefix,project
      }
  }
  
- def ci_pipeline(mdg,url_prefix,project,branch,refspec,revision,build_system) {
+ def ci_pipeline(mdg,url_prefix,project,branch,refspec,revision,build_system,artifactory_server) {
      println("build_system = ${build_system}")
      ci_helper = load "devops/jenkins/ci-pipelines/ci_helper.groovy"
  
      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'
          }
@@@ -63,7 -65,7 +63,7 @@@
  
      stage('Archive') {
          sh(returnStdout:true,  script: 'devops-stages/stage-archive.sh').trim()
-         ci_helper.archive(mdg,branch,'untested')
+         ci_helper.archive(artifactory_server,mdg,branch,'untested')
      }
  
      if ( build_system ) {