onap: Use the right openrc file for the cloud 26/2626/1
authorFatih Degirmenci <fdegir@gmail.com>
Wed, 16 Oct 2019 18:25:24 +0000 (20:25 +0200)
committerFatih Degirmenci <fdegir@gmail.com>
Wed, 16 Oct 2019 18:25:24 +0000 (20:25 +0200)
Change-Id: I7ea60a385c4cf96981b0d508ef9ea7ea488c573b

jjb/cloud-infra/cloud-infra-periodic-onap.yaml
jjb/cloud-infra/onap-deploy.sh

index 8d4ed14b06ecdfe08613f5ed130a99602dd92acf..0346f949bddbb0ea3ec77f31f0738ff87df7aeca 100644 (file)
           name: DISTRO
           default: '{distro}'
           description: 'Distribution to use for configuring target nodes (networking etc.)'
+      - string:
+          name: OPENSTACK_CLOUD_PROVIDER
+          default: '{cloud}'
+          description: 'Name of the cloud where this job is run'
       - string:
           name: ONAP_VERSION
           default: '{onap-version}'
           description: $DEPLOY_SCENARIO | $ONAP_FLAVOR
       - shell: |
           #!/bin/bash
-          cp $OPENRC_FILE /tmp/openrc
+          /bin/rm -rf /tmp/openrc && /bin/cp -f $OPENRC_FILE /tmp/openrc
       - multijob:
           name: Deploy ONAP using OOM
           condition: ALWAYS
               current-parameters: false
               predefined-parameters: |
                 DISTRO=$DISTRO
+                OPENSTACK_CLOUD_PROVIDER=$OPENSTACK_CLOUD_PROVIDER
                 DEPLOY_TYPE=$DEPLOY_TYPE
                 PROVISIONER_TYPE=$PROVISIONER_TYPE
                 INSTALLER_TYPE=$INSTALLER_TYPE
               current-parameters: false
               predefined-parameters: |
                 DISTRO=$DISTRO
+                OPENSTACK_CLOUD_PROVIDER=$OPENSTACK_CLOUD_PROVIDER
                 DEPLOY_TYPE=$DEPLOY_TYPE
                 PROVISIONER_TYPE=$PROVISIONER_TYPE
                 INSTALLER_TYPE=$INSTALLER_TYPE
               predefined-parameters: |
                 SLAVE_LABEL=$SLAVE_LABEL
                 DISTRO=$DISTRO
+                OPENSTACK_CLOUD_PROVIDER=$OPENSTACK_CLOUD_PROVIDER
                 PROVISIONER_TYPE=$PROVISIONER_TYPE
                 INSTALLER_TYPE=$INSTALLER_TYPE
                 DEPLOY_SCENARIO=$DEPLOY_SCENARIO
               predefined-parameters: |
                 SLAVE_LABEL=$SLAVE_LABEL
                 DISTRO=$DISTRO
+                OPENSTACK_CLOUD_PROVIDER=$OPENSTACK_CLOUD_PROVIDER
                 PROVISIONER_TYPE=$PROVISIONER_TYPE
                 INSTALLER_TYPE=$INSTALLER_TYPE
                 DEPLOY_SCENARIO=$DEPLOY_SCENARIO
               predefined-parameters: |
                 SLAVE_LABEL=$SLAVE_LABEL
                 DISTRO=$DISTRO
+                OPENSTACK_CLOUD_PROVIDER=$OPENSTACK_CLOUD_PROVIDER
                 PROVISIONER_TYPE=$PROVISIONER_TYPE
                 INSTALLER_TYPE=$INSTALLER_TYPE
                 DEPLOY_SCENARIO=$DEPLOY_SCENARIO
               predefined-parameters: |
                 SLAVE_LABEL=$SLAVE_LABEL
                 DISTRO=$DISTRO
+                OPENSTACK_CLOUD_PROVIDER=$OPENSTACK_CLOUD_PROVIDER
                 PROVISIONER_TYPE=$PROVISIONER_TYPE
                 INSTALLER_TYPE=$INSTALLER_TYPE
                 DEPLOY_SCENARIO=$DEPLOY_SCENARIO
               predefined-parameters: |
                 SLAVE_LABEL=$SLAVE_LABEL
                 DISTRO=$DISTRO
+                OPENSTACK_CLOUD_PROVIDER=$OPENSTACK_CLOUD_PROVIDER
                 PROVISIONER_TYPE=$PROVISIONER_TYPE
                 INSTALLER_TYPE=$INSTALLER_TYPE
                 DEPLOY_SCENARIO=$DEPLOY_SCENARIO
               predefined-parameters: |
                 SLAVE_LABEL=$SLAVE_LABEL
                 DISTRO=$DISTRO
+                OPENSTACK_CLOUD_PROVIDER=$OPENSTACK_CLOUD_PROVIDER
                 DEPLOY_TYPE=$DEPLOY_TYPE
                 INSTALLER_TYPE=$INSTALLER_TYPE
                 DEPLOY_SCENARIO=$DEPLOY_SCENARIO
           name: SLAVE_LABEL
           default: 'xerces-jumphost-onap-ubuntu1804'
           description: 'Slave label to schedule this job on. All slaves have Ubuntu1604 no matter what distro target nodes use'
+      - string:
+          name: OPENSTACK_CLOUD_PROVIDER
+          default: 'city'
+          description: 'Name of the cloud where this job is run'
       - string:
           name: DISTRO
           default: 'ubuntu1804'
           description: 'Type of the deployment'
 
     wrappers:
-      - credentials-binding:
-          - file:
-              credential-id: est-jenkins-openrcfile-city-karlskrona-onap
-              variable: OPENRC_FILE
       - mask-passwords
       - build-timeout:
           timeout: '{build-timeout}'
 
     builders:
       - description-setter:
-          description: $DEPLOY_SCENARIO | $ONAP_FLAVOR
+          description: $DEPLOY_SCENARIO | $ONAP_FLAVOR | $OPENSTACK_CLOUD_PROVIDER
       - '{onap-other-phases}-macro'
 
 - job-template:
           name: SLAVE_LABEL
           default: 'xerces-jumphost-onap-ubuntu1804'
           description: 'Slave label to schedule this job on. All slaves have Ubuntu1604 no matter what distro target nodes use'
+      - string:
+          name: OPENSTACK_CLOUD_PROVIDER
+          default: 'city'
+          description: 'Name of the cloud where this job is run'
       - string:
           name: DISTRO
           default: 'ubuntu1804'
           description: 'Development purposes only! Set to none for disabling test results DB reporting.'
 
     wrappers:
-      - credentials-binding:
-          - file:
-              credential-id: est-jenkins-openrcfile-city-karlskrona-onap
-              variable: OPENRC_FILE
       - mask-passwords
       - build-timeout:
           timeout: '{build-timeout}'
 
     builders:
       - description-setter:
-          description: $DEPLOY_SCENARIO | $ONAP_FLAVOR
+          description: $DEPLOY_SCENARIO | $ONAP_FLAVOR | $OPENSTACK_CLOUD_PROVIDER
       - 'onap-healthcheck-macro'
 
 # vim: set ts=2 sw=2 expandtab:
index 7cf0d6d0e6199cedb7b9c31750f3a10e733a1af7..b348bbd68c8090a3c22423438ebb2ca925a02e0e 100644 (file)
@@ -67,7 +67,7 @@ fi
 echo "Info: Starting K8S cluster creation and ONAP deployment"
 echo "-------------------------------------------------------------------------"
 cd $WORKSPACE
-./engine/deploy.sh -c -r $PROVISIONER_TYPE -u $OPENRC_FILE \
+./engine/deploy.sh -c -r $PROVISIONER_TYPE -u /tmp/openrc \
   -s $DEPLOY_SCENARIO -e $HEAT_ENVIRONMENT_FILE
 
 cd $WORKSPACE