X-Git-Url: https://gerrit.linuxfoundation.org/infra/gitweb?a=blobdiff_plain;f=jjb%2Flf-openstack-heat.yaml;fp=jjb%2Flf-openstack-heat.yaml;h=ee60fe268a4f3fe472fa71a02c50dc87a777fec9;hb=3957e7acf87be74dbfaccee20400b6f401a568a3;hp=0000000000000000000000000000000000000000;hpb=8b56734eada742094399d6e52cbc2ddef7b39b2c;p=releng%2Fglobal-jjb.git diff --git a/jjb/lf-openstack-heat.yaml b/jjb/lf-openstack-heat.yaml new file mode 100644 index 00000000..ee60fe26 --- /dev/null +++ b/jjb/lf-openstack-heat.yaml @@ -0,0 +1,43 @@ +--- +- builder: + name: lf-stack-create + builders: + - inject: + properties-content: | + OS_CLOUD={openstack-cloud} + OS_STACK_NAME=$SILO-$JOB_NAME-$BUILD_NUMBER + OS_STACK_TEMPLATE={openstack-heat-template} + OS_STACK_TEMPLATE_DIR={openstack-heat-template-dir} + - config-file-provider: + files: + - file-id: clouds-yaml + target: '$HOME/.config/openstack/clouds.yaml' + - shell: !include-raw: ../shell/openstack-stack-parameters.sh + - shell: !include-raw-escape: ../shell/openstack-stack-create.sh + - shell: !include-raw-escape: ../shell/openstack-stack-copy-ssh-keys.sh + +- publisher: + name: lf-stack-delete + publishers: + - postbuildscript: + builders: + - role: BOTH + build-on: + - ABORTED + - FAILURE + - SUCCESS + - UNSTABLE + build-steps: + - inject: + properties-content: | + OS_CLOUD={openstack-cloud} + OS_STACK_NAME=$SILO-$JOB_NAME-$BUILD_NUMBER + - config-file-provider: + files: + - file-id: clouds-yaml + target: '$HOME/.config/openstack/clouds.yaml' + - shell: | + #!/bin/bash -l + echo "Deleting $OS_STACK_NAME" + lftools openstack --os-cloud "$OS_CLOUD" stack delete "$OS_STACK_NAME" + mark-unstable-if-failed: false