Prepare installers and Jenkins for Release FIFTEEN
[osm/devops.git] / jenkins / ci-pipelines / ci_stage_3.groovy
index dd876fc..cff7217 100644 (file)
@@ -68,6 +68,7 @@ void run_robot_systest(String tagName,
                        String osmHostname,
                        String prometheusHostname,
                        Integer prometheusPort=null,
+                       String ociRegistryUrl,
                        String envfile=null,
                        String portmappingfile=null,
                        String kubeconfig=null,
@@ -100,12 +101,17 @@ void run_robot_systest(String tagName,
     }
 
     try {
-        sh("""docker run --env OSM_HOSTNAME=${osmHostname} --env PROMETHEUS_HOSTNAME=${prometheusHostname} \
-           ${PROMETHEUS_PORT_VAR} ${JUJU_PASSWORD_VAR} --env-file ${environmentFile} \
-           -v ${clouds}:/etc/openstack/clouds.yaml \
-           -v ${osmRSAfile}:/root/osm_id_rsa -v ${kubeconfig}:/root/.kube/config -v ${tempdir}:/robot-systest/reports \
-           -v ${portmappingfile}:/root/port-mapping.yaml ${hostfilemount} opensourcemano/tests:${tagName} \
-           -c -t ${testName}""")
+        withCredentials([usernamePassword(credentialsId: 'gitlab-oci-test', 
+                        passwordVariable: 'OCI_REGISTRY_PSW', usernameVariable: 'OCI_REGISTRY_USR')]) {
+            sh("""docker run --env OSM_HOSTNAME=${osmHostname} --env PROMETHEUS_HOSTNAME=${prometheusHostname} \
+               ${PROMETHEUS_PORT_VAR} ${JUJU_PASSWORD_VAR} --env-file ${environmentFile} \
+               --env OCI_REGISTRY_URL=${ociRegistryUrl} --env OCI_REGISTRY_USER=${OCI_REGISTRY_USR} \
+               --env OCI_REGISTRY_PASSWORD=${OCI_REGISTRY_PSW} \
+               -v ${clouds}:/etc/openstack/clouds.yaml -v ${osmRSAfile}:/root/osm_id_rsa \
+               -v ${kubeconfig}:/root/.kube/config -v ${tempdir}:/robot-systest/reports \
+               -v ${portmappingfile}:/root/port-mapping.yaml ${hostfilemount} opensourcemano/tests:${tagName} \
+               -c -t ${testName}""")
+        }
     } finally {
         sh("cp ${tempdir}/*.xml .")
         sh("cp ${tempdir}/*.html .")
@@ -185,6 +191,7 @@ node("${params.NODE}") {
     APT_PROXY = 'http://172.21.1.1:3142'
     SSH_KEY = '~/hive/cicd_rsa'
     ARCHIVE_LOGS_FLAG = false
+    OCI_REGISTRY_URL = 'oci://osm.etsi.org:5050/devops/test'
     sh 'env'
 
     tag_or_branch = params.GERRIT_BRANCH.replaceAll(/\./, '')
@@ -532,7 +539,7 @@ node("${params.NODE}") {
                     ]
 
                     sshCommand remote: remote, command: '''
-                        wget https://osm-download.etsi.org/ftp/osm-14.0-fourteen/install_osm.sh
+                        wget https://osm-download.etsi.org/ftp/osm-15.0-fifteen/install_osm.sh
                         chmod +x ./install_osm.sh
                         sed -i '1 i\\export PATH=/snap/bin:\$PATH' ~/.bashrc
                     '''
@@ -634,6 +641,7 @@ EOF"""
                             osmHostname,
                             prometheusHostname,
                             prometheusPort,
+                            OCI_REGISTRY_URL,
                             params.ROBOT_VIM,
                             params.ROBOT_PORT_MAPPING_VIM,
                             params.KUBECONFIG,