X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=jenkins%2Fci-pipelines%2Fci_stage_3.groovy;h=13476508ea324bd927a4e24e8c6dcef5f7c3f2cd;hb=refs%2Fheads%2Fmaster;hp=dd876fcece1d4e88a429da310f9c8d922b14de10;hpb=1c04a5cf993fac5198b77246f8cba6a80b065cb2;p=osm%2Fdevops.git diff --git a/jenkins/ci-pipelines/ci_stage_3.groovy b/jenkins/ci-pipelines/ci_stage_3.groovy index dd876fce..13476508 100644 --- a/jenkins/ci-pipelines/ci_stage_3.groovy +++ b/jenkins/ci-pipelines/ci_stage_3.groovy @@ -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 ''' @@ -586,9 +593,9 @@ node("${params.NODE}") { ${osm_installation_options} """ } - prometheusHostname = IP_ADDRESS - prometheusPort = 9091 - osmHostname = IP_ADDRESS + prometheusHostname = "prometheus.${IP_ADDRESS}.nip.io" + prometheusPort = 80 + osmHostname = "nbi.${IP_ADDRESS}.nip.io:443" } } // stage("Install") /////////////////////////////////////////////////////////////////////////////////////// @@ -634,6 +641,7 @@ EOF""" osmHostname, prometheusHostname, prometheusPort, + OCI_REGISTRY_URL, params.ROBOT_VIM, params.ROBOT_PORT_MAPPING_VIM, params.KUBECONFIG,