Fix bug 1744 to update installers and manifests for Release ELEVEN
[osm/devops.git] / jenkins / ci-pipelines / ci_stage_3.groovy
index 74b8d46..a96e545 100644 (file)
@@ -32,6 +32,7 @@ properties([
         string(defaultValue: 'artifactory-osm', description: '', name: 'ARTIFACTORY_SERVER'),
         string(defaultValue: 'osm-stage_4', description: '', name: 'DOWNSTREAM_STAGE_NAME'),
         string(defaultValue: 'testing-daily', description: '', name: 'DOCKER_TAG'),
+        string(defaultValue: 'ubuntu18.04', description: '', name: 'OPENSTACK_BASE_IMAGE'),
         booleanParam(defaultValue: false, description: '', name: 'SAVE_CONTAINER_ON_FAIL'),
         booleanParam(defaultValue: false, description: '', name: 'SAVE_CONTAINER_ON_PASS'),
         booleanParam(defaultValue: true, description: '', name: 'SAVE_ARTIFACTS_ON_SMOKE_SUCCESS'),
@@ -56,10 +57,22 @@ properties([
 ////////////////////////////////////////////////////////////////////////////////////////
 // Helper Functions
 ////////////////////////////////////////////////////////////////////////////////////////
-def run_robot_systest(tagName,testName,osmHostname,prometheusHostname,prometheus_port=null,envfile=null,portmappingfile=null,kubeconfig=null,clouds=null,hostfile=null,jujuPassword=null,pass_th='0.0',unstable_th='0.0') {
-    tempdir = sh(returnStdout: true, script: "mktemp -d").trim()
-    if ( !envfile )
-    {
+void run_robot_systest(String tagName,
+                       String testName,
+                       String osmHostname,
+                       String prometheusHostname,
+                       Integer prometheusPort=null,
+                       String envfile=null,
+                       String portmappingfile=null,
+                       String kubeconfig=null,
+                       String clouds=null,
+                       String hostfile=null,
+                       String jujuPassword=null,
+                       String osmRSAfile=null,
+                       String pass_th='0.0',
+                       String unstable_th='0.0') {
+    tempdir = sh(returnStdout: true, script: 'mktemp -d').trim()
+    if ( !envfile ) {
         sh(script: "touch ${tempdir}/env")
         envfile="${tempdir}/env"
     }
@@ -78,7 +91,7 @@ def run_robot_systest(tagName,testName,osmHostname,prometheusHostname,prometheus
     }
 
     try {
-        sh "docker run --env OSM_HOSTNAME=${osmHostname} --env PROMETHEUS_HOSTNAME=${prometheusHostname} ${PROMETHEUS_PORT_VAR} ${JUJU_PASSWORD_VAR} --env-file ${envfile} -v ${clouds}:/etc/openstack/clouds.yaml -v ${kubeconfig}:/root/.kube/config -v ${tempdir}:/robot-systest/reports -v ${portmappingfile}:/root/port-mapping.yaml ${hostfilemount} opensourcemano/tests:${tagName} -c -t ${testName}"
+        sh "docker run --env OSM_HOSTNAME=${osmHostname} --env PROMETHEUS_HOSTNAME=${prometheusHostname} ${PROMETHEUS_PORT_VAR} ${JUJU_PASSWORD_VAR} --env-file ${envfile} -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}/* ."
         outputDirectory = sh(returnStdout: true, script: "pwd").trim()
@@ -224,7 +237,7 @@ node("${params.NODE}") {
                     }
 
                     parallelSteps = [:]
-                    def list = ["RO", "openvim", "osmclient", "IM", "devops", "MON", "N2VC", "NBI", "common", "LCM", "POL", "NG-UI", "PLA", "tests"]
+                    def list = ["RO", "osmclient", "IM", "devops", "MON", "N2VC", "NBI", "common", "LCM", "POL", "NG-UI", "PLA", "tests"]
                     if (upstreamComponent.length()>0) {
                         println("Skipping upstream fetch of "+upstreamComponent)
                         list.remove(upstreamComponent)
@@ -348,7 +361,7 @@ node("${params.NODE}") {
                     output=sh(returnStdout: true, script: """#!/bin/sh -e
                         for line in `grep OS ~/hive/robot-systest.cfg | grep -v OS_CLOUD` ; do export \$line ; done
                         openstack server create --flavor osm.sanity \
-                                                --image ubuntu18.04 \
+                                                --image ${OPENSTACK_BASE_IMAGE} \
                                                 --key-name CICD \
                                                 --property build_url="${BUILD_URL}" \
                                                 --nic net-id=osm-ext \
@@ -432,7 +445,7 @@ node("${params.NODE}") {
                     remote.pty = true
 
                     sshCommand remote: remote, command: """
-                        wget https://osm-download.etsi.org/ftp/osm-9.0-nine/install_osm.sh
+                        wget https://osm-download.etsi.org/ftp/osm-11.0-eleven/install_osm.sh
                         chmod +x ./install_osm.sh
                         sed -i '1 i\\export PATH=/snap/bin:\${PATH}' ~/.bashrc
                     """
@@ -472,8 +485,7 @@ node("${params.NODE}") {
                                     ${release} -r unstable \
                                     -d ${USERNAME}:${PASSWORD}@${INTERNAL_DOCKER_REGISTRY} \
                                     -p ${INTERNAL_DOCKER_PROXY} \
-                                    -t ${container_name} \
-                                    --nocachelxdimages
+                                    -t ${container_name}
                             """
                         }
                         prometheusHostname = IP_ADDRESS
@@ -528,6 +540,7 @@ EOF"""
                             params.CLOUDS,
                             hostfile,
                             jujuPassword,
+                            SSH_KEY,
                             params.ROBOT_PASS_THRESHOLD,
                             params.ROBOT_UNSTABLE_THRESHOLD
                         )