Fetch creds according scenario type(os or k8) 29/54229/1
authorchenjiankun <chenjiankun1@huawei.com>
Wed, 21 Mar 2018 02:12:15 +0000 (02:12 +0000)
committerchenjiankun <chenjiankun1@huawei.com>
Wed, 21 Mar 2018 02:12:15 +0000 (02:12 +0000)
We have two kinds of scenario: os and k8, their creds
is defferent, so we need to fetch creds according different
scenario type.

Change-Id: I54d1a1fcdfa981fed2a1433693aa3483abf4baf0
Signed-off-by: chenjiankun <chenjiankun1@huawei.com>
jjb/yardstick/yardstick-daily-jobs.yml
jjb/yardstick/yardstick-get-k8s-conf.sh

index 20890fa..24c7f31 100644 (file)
       - description-setter:
           description: "POD: $NODE_NAME"
       - 'yardstick-cleanup'
-      - 'yardstick-fetch-os-creds'
-      - 'yardstick-fetch-k8s-conf'
+      - 'yardstick-fetch-creds'
       - 'yardstick-{testsuite}'
       - 'yardstick-store-results'
 
           !include-raw: ./yardstick-daily.sh
 
 - builder:
-    name: yardstick-fetch-os-creds
+    name: yardstick-fetch-creds
     builders:
-      - shell:
-          !include-raw: ../../utils/fetch_os_creds.sh
-
-- builder:
-    name: yardstick-fetch-k8s-conf
-    builders:
-      - shell:
-          !include-raw: ./yardstick-get-k8s-conf.sh
+      # yamllint disable rule:indentation
+      - conditional-step:
+          condition-kind: regex-match
+          regex: "os-.*"
+          label: '$DEPLOY_SCENARIO'
+          steps:
+            - shell:
+                !include-raw: ../../utils/fetch_os_creds.sh
+      - conditional-step:
+          condition-kind: regex-match
+          regex: "k8-.*"
+          label: '$DEPLOY_SCENARIO'
+          steps:
+            - shell:
+                !include-raw: ./yardstick-get-k8s-conf.sh
 
 - builder:
     name: yardstick-store-results
index 22a6aa4..116d2f0 100755 (executable)
@@ -7,6 +7,7 @@ if [[ "${DEPLOY_SCENARIO:0:2}" == "k8" ]];then
     if [[ ${INSTALLER_TYPE} == 'joid' ]];then
         juju scp kubernetes-master/0:config "${dest_path}"
     elif [[ ${INSTALLER_TYPE} == 'compass' ]];then
+        echo "Copy admin.conf to ${dest_path}"
         docker cp compass-tasks:/opt/admin.conf "${dest_path}"
     fi
 fi