Mentions légales du service
Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
terraform-dynamic
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
Service Desk
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
gitlabci_gallery
orchestration
terraform-dynamic
Commits
543354bb
Commit
543354bb
authored
2 years ago
by
Thierry Martinez
Browse files
Options
Downloads
Patches
Plain Diff
Ignore failures on destruction
parent
63a2243c
No related branches found
No related tags found
No related merge requests found
Pipeline
#752201
passed
2 years ago
Stage: validate
Stage: deploy
Stage: execute
Stage: cleanup
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
README.md
+4
-2
4 additions, 2 deletions
README.md
main.tf
+1
-1
1 addition, 1 deletion
main.tf
with
5 additions
and
3 deletions
README.md
+
4
−
2
View file @
543354bb
...
@@ -108,7 +108,7 @@ resource "cloudstack_instance" "runner" {
...
@@ -108,7 +108,7 @@ resource "cloudstack_instance" "runner" {
}
}
provisioner
"remote-exec"
{
provisioner
"remote-exec"
{
when
=
destroy
when
=
destroy
inline
=
[
"sudo gitlab-runner unregister --all-runners"
]
inline
=
[
"sudo gitlab-runner unregister --all-runners
|| true
"
]
}
}
}
}
```
```
...
@@ -133,7 +133,9 @@ We cannot use a variable for passing the path to this file,
...
@@ -133,7 +133,9 @@ We cannot use a variable for passing the path to this file,
since the connection is used by a destroy provisioner, that
since the connection is used by a destroy provisioner, that
cannot refer to variables.
cannot refer to variables.
This destroy provisioner executes
`gitlab-runner unregister`
This destroy provisioner executes
`gitlab-runner unregister`
before the destruction of the virtual machine.
before the destruction of the virtual machine; failures are ignored
in case of the
`gitlab-runner`
command was not yet installed
when destroying occurs.
## The pipeline specification file [`.gitlab-ci.yml`](.gitlab-ci.yml)
## The pipeline specification file [`.gitlab-ci.yml`](.gitlab-ci.yml)
...
...
This diff is collapsed.
Click to expand it.
main.tf
+
1
−
1
View file @
543354bb
...
@@ -55,6 +55,6 @@ resource "cloudstack_instance" "runner" {
...
@@ -55,6 +55,6 @@ resource "cloudstack_instance" "runner" {
}
}
provisioner
"remote-exec"
{
provisioner
"remote-exec"
{
when
=
destroy
when
=
destroy
inline
=
[
"sudo gitlab-runner unregister --all-runners"
]
inline
=
[
"sudo gitlab-runner unregister --all-runners
|| true
"
]
}
}
}
}
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