From c34a5dde41c7cf8cc50c7497ee3a1953b4a53eeb Mon Sep 17 00:00:00 2001
From: Chris Hines <chris.hines@monash.edu>
Date: Thu, 14 Oct 2021 21:14:52 +1100
Subject: [PATCH] still fixing it

---
 .gitlab-ci.yml | 24 ++++++++++++++++++++++++
 1 file changed, 24 insertions(+)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index b0672325..99373c22 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -58,6 +58,25 @@ ansiblelint:
     - python3 ansiblelint/run_lint.py --targets ../qa.yml
     - python3 ansiblelint/run_lint.py --targets ../maintenance.yml
 
+remove_infra:
+  stage: openstack_destroy
+  image: ubuntu
+  allow_failure: false
+  tags:
+  - heat
+  before_script:
+    - cd $DEFAULT_PATH
+    - echo "$HPCCICD_openrc" > ./$NECTAR_ALLOCATION-openrc.sh
+  script:
+    - whoami
+    - apt update
+    - apt -y upgrade
+    - apt -y install openssh-client python3-pip
+    - pip3 install joblib python-cinderclient python-keystoneclient python-novaclient python-openstackclient PyYAML ansible
+    - source ./$NECTAR_ALLOCATION-openrc.sh
+    - echo "Generating a random SSH key for our cluster"
+    - cd infra
+    - ansible-playbook os_delete.yml
 
 build_infra:
   stage: openstack_create
@@ -97,9 +116,14 @@ configure_cluster:
   - ansible
   artifacts:
     paths:
+      - CICD/inventory.yml
+      - CICD/tmp_key
+      - CICD/tmp_key.pub
+      - CICD/infra/os_vars.yml
       - CICD/files
       - CICD/vars
       - CICD/master.log.json
+      - CICD/ssh.cfg
   script:
     - whoami
     - apt update
-- 
GitLab