Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
T
Terraform Openstack
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
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
Krish Moodbidri
Terraform Openstack
Commits
dab53408
Commit
dab53408
authored
1 year ago
by
Eesaan Atluri
Browse files
Options
Downloads
Patches
Plain Diff
Remove code that destroys TF resources after failure
TF apply failure leads to pipeline exiting so TF destroy doesn't run
parent
a56d68ae
Branches
feat1
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
.gitlab-ci.yml
+1
-10
1 addition, 10 deletions
.gitlab-ci.yml
with
1 addition
and
10 deletions
.gitlab-ci.yml
+
1
−
10
View file @
dab53408
...
...
@@ -88,16 +88,7 @@ tf-apply:
echo "image_ohpc defined as ${TF_VAR_image_ohpc}"
fi
-
export TF_VAR_keypair_name="os-gen-keypair-$BUILD_DATE"
-
|
terraform apply -auto-approve
if [ $? -ne 0 ]; then
echo "Terraform apply failed. Running terraform destroy..."
terraform destroy -auto-approve
TF_SUCCESS=false
else
TF_SUCCESS=true
fi
echo "Terraform success: $TF_SUCCESS"
-
terraform apply -auto-approve
-
export instance_floating_ip=$(terraform output -raw floating_ip_ohpc)
-
export instance_id=$(terraform output -raw xdmod_instance_id)
-
echo "instance_floating_ip=${instance_floating_ip}" | tee -a $CI_PROJECT_DIR/vars.env
...
...
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