]> review.fuel-infra Code Review - tools/sustaining.git/commitdiff
Archive stack data as build artifact 47/40647/1
authorVladimir Khlyunev <vkhlyunev@mirantis.com>
Wed, 27 Feb 2019 12:38:19 +0000 (16:38 +0400)
committerVladimir Khlyunev <vkhlyunev@mirantis.com>
Wed, 27 Feb 2019 12:38:19 +0000 (16:38 +0400)
At current moment it stores stack name and floating ip

Change-Id: Ic06203d28196b75d13943f9dd5614274101c391d

maintenance-ci/common/jobs/deploy-stack.yaml [moved from maintenance-ci/common/jobs/deploy_stack.yaml with 73% similarity]
maintenance-ci/common/scripts/deploy_heat_stack.sh

similarity index 73%
rename from maintenance-ci/common/jobs/deploy_stack.yaml
rename to maintenance-ci/common/jobs/deploy-stack.yaml
index 57f57f9df0eb7f8db7447894776d18d8f7e5ca9b..c09a58b4363bb39d3bd15e9015529dbd0daa998f 100644 (file)
@@ -1,7 +1,7 @@
 - job:
     name: 'deploy-heat-stack'
     description: |
-            Create given heat stack on internal cloud in maintenance-team tenant
+      Create given heat stack on internal cloud in maintenance-team tenant
 
     concurrent: false
     node: 'jenkins-master'
         default: ''
 
     scm:
-        - git:
-            url: 'https://review.fuel-infra.org/tools/sustaining/'
-            branches:
-                - origin/master
+    - git:
+        url: 'https://review.fuel-infra.org/tools/sustaining/'
+        branches:
+        - origin/master
 
     wrappers:
     - timestamps
@@ -41,3 +41,8 @@
     builders:
     - shell:
         !include-raw: common/scripts/deploy_heat_stack.sh
+
+    publishers:
+    - archive:
+        artifacts: 'stack_data.sh'
+        only-if-success: true
index 80054b58ced1656e7969b875747caeb22d84a9f9..7a4ea070fd5fcd87005d386f0b8c883605ab3fff 100755 (executable)
@@ -37,4 +37,9 @@ set -x
   source "${OPENRC_FILE?}"
   echo "openstack stack create --wait -t ${HEAT_STACK_YAML} ${parameter_string} ${STACK_NAME}" | bash -
   openstack stack output show "${STACK_NAME}" --all
-deactivate
\ No newline at end of file
+  cat >stack_data.sh <<EOF
+"STACK_NAME=${STACK_NAME}
+STACK_FLOATING_IP=$(heat output-show ${STACK_NAME} floating_ip)
+EOF
+
+deactivate