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
6d4e809d
Unverified
Commit
6d4e809d
authored
1 year ago
by
Timo Furrer
Browse files
Options
Downloads
Patches
Plain Diff
Add validate-plan template
parent
d3154cae
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
.gitlab/README.md.template
+1
-0
1 addition, 0 deletions
.gitlab/README.md.template
README.md
+1
-0
1 addition, 0 deletions
README.md
templates/validate-plan.yml
+74
-0
74 additions, 0 deletions
templates/validate-plan.yml
with
76 additions
and
0 deletions
.gitlab/README.md.template
+
1
−
0
View file @
6d4e809d
...
...
@@ -74,6 +74,7 @@ This component repository also provides some templates that may often be used,
for example one that only runs validation (`fmt` and `validate`), plan and an apply,
but no destructive actions.
- [`validate-plan`](templates/validate-plan.yml)
- [`validate-plan-apply`](templates/validate-plan-apply.yml)
### Job Templates
...
...
This diff is collapsed.
Click to expand it.
README.md
+
1
−
0
View file @
6d4e809d
...
...
@@ -76,6 +76,7 @@ This component repository also provides some templates that may often be used,
for example one that only runs validation (
`fmt`
and
`validate`
), plan and an apply,
but no destructive actions.
-
[
`validate-plan`
](
templates/validate-plan.yml
)
-
[
`validate-plan-apply`
](
templates/validate-plan-apply.yml
)
### Job Templates
...
...
This diff is collapsed.
Click to expand it.
templates/validate-plan.yml
0 → 100644
+
74
−
0
View file @
6d4e809d
spec
:
inputs
:
# Stages
stage_validate
:
default
:
'
validate'
description
:
'
Defines
the
validate
stage.
This
stage
includes
the
`fmt`
and
`validate`
jobs.'
stage_build
:
default
:
'
build'
description
:
'
Defines
the
build
stage.
This
stage
includes
the
`plan`
job.'
# Versions
# This version is only required, because we cannot access the context of the component,
# see https://gitlab.com/gitlab-org/gitlab/-/issues/438275
version
:
default
:
'
latest'
description
:
'
Version
of
this
component.
Has
to
be
the
same
as
the
one
in
the
component
include
entry.'
opentofu_version
:
default
:
'
1.6.1'
options
:
-
'
$OPENTOFU_VERSION'
-
'
1.6.1'
-
'
1.6.0'
-
'
1.6.0-rc1'
description
:
'
OpenTofu
version
that
should
be
used.'
# Images
image_registry_base
:
default
:
'
$CI_REGISTRY/components/opentofu'
# FIXME: not yet possible because of https://gitlab.com/gitlab-org/gitlab/-/issues/438722
# gitlab_opentofu_image:
# # FIXME: This should reference the component tag that is used.
# # Currently, blocked by https://gitlab.com/gitlab-org/gitlab/-/issues/438275
# # default: '$CI_REGISTRY/components/opentofu/gitlab-opentofu:$[[ inputs.opentofu_version ]]'
# default: '$CI_REGISTRY/components/opentofu/gitlab-opentofu:$[[ inputs.version ]]-opentofu$[[ inputs.opentofu_version ]]'
# description: 'Tag of the gitlab-opentofu image.'
# Configuration
root_dir
:
default
:
${CI_PROJECT_DIR}
description
:
'
Root
directory
for
the
OpenTofu
project.'
state_name
:
default
:
default
description
:
'
Remote
OpenTofu
state
name.'
---
include
:
-
local
:
'
/templates/fmt.yml'
inputs
:
as
:
'
fmt'
stage
:
$[[ inputs.stage_validate ]]
version
:
$[[ inputs.version ]]
opentofu_version
:
$[[ inputs.opentofu_version ]]
image_registry_base
:
$[[ inputs.image_registry_base ]]
root_dir
:
$[[ inputs.root_dir ]]
-
local
:
'
/templates/validate.yml'
inputs
:
as
:
'
validate'
stage
:
$[[ inputs.stage_validate ]]
version
:
$[[ inputs.version ]]
opentofu_version
:
$[[ inputs.opentofu_version ]]
image_registry_base
:
$[[ inputs.image_registry_base ]]
root_dir
:
$[[ inputs.root_dir ]]
state_name
:
$[[ inputs.state_name ]]
-
local
:
'
/templates/plan.yml'
inputs
:
as
:
'
plan'
stage
:
$[[ inputs.stage_build ]]
version
:
$[[ inputs.version ]]
opentofu_version
:
$[[ inputs.opentofu_version ]]
image_registry_base
:
$[[ inputs.image_registry_base ]]
root_dir
:
$[[ inputs.root_dir ]]
state_name
:
$[[ inputs.state_name ]]
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