diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index b067232576d52166d221edcc66f8307976e2b9e7..99373c2218e1540fb0aa88a5e79424e237b530c1 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