Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
Projet_Terraform
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
MUNIER Florian
Projet_Terraform
Commits
a50d6c39
Commit
a50d6c39
authored
2 years ago
by
MUNIER Florian
Browse files
Options
Downloads
Patches
Plain Diff
[udp] update gitlab-ci
parent
3250aeb0
No related branches found
No related tags found
No related merge requests found
Pipeline
#13829
failed
2 years ago
Stage: init
Stage: plan
Stage: apply
Stage: destroy
Stage: on_failure
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
.gitlab-ci.yml
+14
-4
14 additions, 4 deletions
.gitlab-ci.yml
with
14 additions
and
4 deletions
.gitlab-ci.yml
+
14
−
4
View file @
a50d6c39
...
...
@@ -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
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment