Removing juju installation in the jenkins pipeline 23/11223/3
authoraktas <emin.aktas@ulakhaberlesme.com.tr>
Mon, 6 Sep 2021 10:30:09 +0000 (13:30 +0300)
committergarciadeblas <gerardo.garciadeblas@telefonica.com>
Fri, 1 Oct 2021 08:07:27 +0000 (10:07 +0200)
With the new way of the juju accces in k8s_08 testsuite,
installing juju in the container is not needed.
k8s_08 testsuite changes: https://osm.etsi.org/gerrit/c/osm/tests/+/11104

Change-Id: I7c5a59a776df23ca21b21a17728e658ad6d4e388
Signed-off-by: aktas <emin.aktas@ulakhaberlesme.com.tr>
Signed-off-by: garciadeblas <gerardo.garciadeblas@telefonica.com>
docker/tests/Dockerfile
jenkins/ci-pipelines/ci_stage_3.groovy

index 4a17bab..711b66a 100644 (file)
@@ -36,17 +36,6 @@ ARG OSM_TESTS_URL
 ARG PYTHON3_OSM_IM_URL
 ARG PYTHON3_OSMCLIENT_URL
 
-# Installing Juju
-ARG JUJU_VERSION_M=2.8
-ARG JUJU_VERSION_R=11
-ARG JUJU_VERSION=$JUJU_VERSION_M.$JUJU_VERSION_R
-
-RUN curl --output /tmp/juju-$JUJU_VERSION-linux-amd64.tar.xz -LO \
-    https://launchpad.net/juju/$JUJU_VERSION_M/$JUJU_VERSION/+download/juju-$JUJU_VERSION-linux-amd64.tar.xz && \
-    tar -xf /tmp/juju-$JUJU_VERSION-linux-amd64.tar.xz -C /tmp && \
-    install /tmp/juju /usr/local/bin/juju && \
-    rm /tmp/juju /tmp/juju-$JUJU_VERSION-linux-amd64.tar.xz
-
 RUN curl $PYTHON3_OSM_IM_URL -o osm_im.deb
 RUN dpkg -i ./osm_im.deb
 
@@ -86,9 +75,6 @@ ENV ROBOT_REPORT_FOLDER=/robot-systest/results
 # Kubeconfig file
 ENV K8S_CREDENTIALS=/root/.kube/config
 
-# Juju data folder
-ENV JUJU_DATA=/root/.local/share/juju
-
 # OSM RSA file
 ENV OSM_RSA_FILE=/root/osm_id_rsa
 
index 967bd5d..d3cec43 100644 (file)
@@ -63,7 +63,6 @@ void run_robot_systest(String tagName,
                        Integer prometheusPort=null,
                        String envfile=null,
                        String portmappingfile=null,
-                       String jujudata=null,
                        String kubeconfig=null,
                        String clouds=null,
                        String hostfile=null,
@@ -91,7 +90,7 @@ 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 ${envfile} -v ${clouds}:/etc/openstack/clouds.yaml -v ${jujudata}:/root/.local/share/juju -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}"
+        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()
@@ -191,7 +190,6 @@ node("${params.NODE}") {
     server_id = null
     http_server_name = null
     devopstempdir = null
-    jujutempdir = null
     useCharmedInstaller = params.INSTALLER.equalsIgnoreCase("charmed")
 
     try {
@@ -504,13 +502,6 @@ node("${params.NODE}") {
                         /usr/share/osm-devops/installers/osm_health.sh -k -s ${stackName}
                     """
                 } // stage("OSM Health")
-///////////////////////////////////////////////////////////////////////////////////////
-// Get juju data from installed OSM in remote vm
-///////////////////////////////////////////////////////////////////////////////////////
-                jujutempdir = sh(returnStdout: true, script: "mktemp -d").trim()
-                jujudatafolder = jujutempdir + '/juju'
-                homefolder = sshCommand remote: remote, command: 'echo ${HOME}'
-                sshGet remote: remote, from: homefolder + '/.local/share/juju', into: jujutempdir, override: true
             } // if ( params.DO_INSTALL )
 
 
@@ -661,9 +652,5 @@ EOF"""
         if ( devopstempdir != null ) {
             sh "rm -rf ${devopstempdir}"
         }
-
-        if ( jujutempdir != null ) {
-            sh "rm -rf ${jujutempdir}"
-        }
     }
 }