Skip to content
Snippets Groups Projects
Commit a50d6c39 authored by MUNIER Florian's avatar MUNIER Florian
Browse files

[udp] update gitlab-ci

parent 3250aeb0
No related branches found
No related tags found
No related merge requests found
Pipeline #13829 failed
......@@ -29,8 +29,9 @@ init_step:
plan_step:
stage: plan
only:
- master
script:
#- terraform init
- terraform plan -out=tfplan
artifacts:
name: "plan_step:${CI_JOB_ID}"
......@@ -38,16 +39,21 @@ plan_step:
expire_in: "6h"
paths:
- ./tfplan
# - ./terraform.tfstate
dependencies:
- init_step
apply_step:
stage: apply
only:
- master
before_script:
- python3 -m venv ./venv/ansible
- source ./venv/ansible/bin/activate
- pip install ansible
script:
#- terraform init
- terraform apply -input=false tfplan
- deactivate
dependencies:
- init_step
- plan_step
......@@ -59,10 +65,12 @@ apply_step:
- ./tfplan
- .ssh/
- ./ip_files/
- ./mod-ansible/hosts.ini
- ./hosts.ini
destroy_step:
stage: destroy
only:
- master
script:
- terraform destroy -auto-approve
when: manual
......@@ -73,6 +81,8 @@ destroy_step:
destroy_on_failure:
stage: on_failure
only:
- master
script:
- terraform destroy -auto-approve
when: on_failure
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment