Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
OpenTofu
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
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
Code review analytics
Issue analytics
Insights
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
components
OpenTofu
Commits
58553856
Unverified
Commit
58553856
authored
1 year ago
by
Timo Furrer
Browse files
Options
Downloads
Patches
Plain Diff
Use apply setup for destroy integration test
parent
2d8e1765
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
templates/apply.yml
+5
-0
5 additions, 0 deletions
templates/apply.yml
tests/integration-tests/Destroy.gitlab-ci.yml
+16
-1
16 additions, 1 deletion
tests/integration-tests/Destroy.gitlab-ci.yml
with
21 additions
and
1 deletion
templates/apply.yml
+
5
−
0
View file @
58553856
...
@@ -50,6 +50,10 @@ spec:
...
@@ -50,6 +50,10 @@ spec:
state_name
:
state_name
:
default
:
default
default
:
default
description
:
'
Remote
OpenTofu
state
name.'
description
:
'
Remote
OpenTofu
state
name.'
no_plan
:
default
:
false
type
:
boolean
description
:
'
Whether
a
plan
file
should
be
used.'
plan_name
:
plan_name
:
default
:
'
plan'
default
:
'
plan'
description
:
'
The
name
of
the
plan
file
to
use.
Will
be
used
for
TF_PLAN_CACHE
and
TF_PLAN_JSON.'
description
:
'
The
name
of
the
plan
file
to
use.
Will
be
used
for
TF_PLAN_CACHE
and
TF_PLAN_JSON.'
...
@@ -79,6 +83,7 @@ spec:
...
@@ -79,6 +83,7 @@ spec:
__CACHE_KEY_HACK
:
"
$[[
inputs.root_dir
]]"
__CACHE_KEY_HACK
:
"
$[[
inputs.root_dir
]]"
TF_ROOT
:
$[[ inputs.root_dir ]]
TF_ROOT
:
$[[ inputs.root_dir ]]
TF_STATE_NAME
:
$[[ inputs.state_name ]]
TF_STATE_NAME
:
$[[ inputs.state_name ]]
TF_APPLY_NO_PLAN
:
$[[ inputs.no_plan ]]
TF_PLAN_NAME
:
$[[ inputs.plan_name ]]
TF_PLAN_NAME
:
$[[ inputs.plan_name ]]
image
:
image
:
name
:
'
$[[
inputs.image_registry_base
]]/$[[
inputs.image_name
]]:$[[
inputs.version
]]-opentofu$[[
inputs.opentofu_version
]]'
name
:
'
$[[
inputs.image_registry_base
]]/$[[
inputs.image_name
]]:$[[
inputs.version
]]-opentofu$[[
inputs.opentofu_version
]]'
...
...
This diff is collapsed.
Click to expand it.
tests/integration-tests/Destroy.gitlab-ci.yml
+
16
−
1
View file @
58553856
include
:
include
:
-
component
:
$CI_SERVER_FQDN/$CI_PROJECT_PATH/apply@$CI_COMMIT_SHA
inputs
:
image_registry_base
:
$GITLAB_OPENTOFU_IMAGE_BASE
version
:
$CI_COMMIT_SHA
opentofu_version
:
$OPENTOFU_VERSION
as
:
'
setup:apply'
stage
:
setup
root_dir
:
$TEST_TF_ROOT
state_name
:
$TEST_TF_STATE_NAME
no_plan
:
true
auto_apply
:
true
-
component
:
$CI_SERVER_FQDN/$CI_PROJECT_PATH/validate-plan-destroy@$CI_COMMIT_SHA
-
component
:
$CI_SERVER_FQDN/$CI_PROJECT_PATH/validate-plan-destroy@$CI_COMMIT_SHA
inputs
:
inputs
:
image_registry_base
:
$GITLAB_OPENTOFU_IMAGE_BASE
image_registry_base
:
$GITLAB_OPENTOFU_IMAGE_BASE
...
@@ -7,10 +19,13 @@ include:
...
@@ -7,10 +19,13 @@ include:
root_dir
:
$TEST_TF_ROOT
root_dir
:
$TEST_TF_ROOT
state_name
:
$TEST_TF_STATE_NAME
state_name
:
$TEST_TF_STATE_NAME
stages
:
[
validate
,
build
,
cleanup
]
stages
:
[
setup
,
validate
,
build
,
cleanup
]
# Required to run everything immediately, instead of manually.
# Required to run everything immediately, instead of manually.
'
setup:apply'
:
rules
:
[{
when
:
always
}]
fmt
:
fmt
:
rules
:
[{
when
:
always
}]
rules
:
[{
when
:
always
}]
...
...
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