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
b2383ea7
Unverified
Commit
b2383ea7
authored
1 year ago
by
Timo Furrer
Browse files
Options
Downloads
Patches
Plain Diff
Document job templates
parent
e919af24
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
.gitlab/README.md
+31
-3
31 additions, 3 deletions
.gitlab/README.md
README.md
+31
-3
31 additions, 3 deletions
README.md
with
62 additions
and
6 deletions
.gitlab/README.md
+
31
−
3
View file @
b2383ea7
...
...
@@ -30,7 +30,7 @@ include:
-
component
:
gitlab.com/components/opentofu/full-pipeline@<VERSION>
inputs
:
# The version must currently be specified explicitly as an input,
# to find the correctly associated images. # This can be removed
# to find the correctly associated images. # This can be removed
# once https://gitlab.com/gitlab-org/gitlab/-/issues/438275 is solved.
version
:
<VERSION>
opentofu_version
:
<OPENTOFU_VERSION>
...
...
@@ -46,7 +46,7 @@ include:
-
component
:
gitlab.com/components/opentofu/full-pipeline@~latest
inputs
:
# The version must currently be specified explicitly as an input,
# to find the correctly associated images. # This can be removed
# to find the correctly associated images. # This can be removed
# once https://gitlab.com/gitlab-org/gitlab/-/issues/438275 is solved.
version
:
latest
opentofu_version
:
1.6.0
...
...
@@ -60,7 +60,7 @@ include:
-
component
:
gitlab.com/components/opentofu/full-pipeline@0.0.0-alpha1
inputs
:
# The version must currently be specified explicitly as an input,
# to find the correctly associated images. # This can be removed
# to find the correctly associated images. # This can be removed
# once https://gitlab.com/gitlab-org/gitlab/-/issues/438275 is solved.
version
:
0.0.0-alpha1
opentofu_version
:
1.6.0
...
...
@@ -68,6 +68,34 @@ include:
stages
:
[
validate
,
test
,
build
,
deploy
,
cleanup
]
```
Instead of including the
`full-pipeline`
, it's also possible to include individual jobs
and compose your own pipeline, for example, to just run the
`fmt`
job you can do:
```
yaml
include
:
-
component
:
gitlab.com/components/opentofu/fmt@latest
inputs
:
# The version must currently be specified explicitly as an input,
# to find the correctly associated images. # This can be removed
# once https://gitlab.com/gitlab-org/gitlab/-/issues/438275 is solved.
version
:
latest
opentofu_version
:
1.6.0
root_dir
:
tofu/
```
Have a look at the
[
`full-pipeline`
](
templates/full-pipeline.yml
)
for how it's constructed.
The following job components exist:
-
[
`fmt`
](
templates/fmt.yml
)
-
[
`validate`
](
templates/validate.yml
)
-
[
`plan`
](
templates/plan.yml
)
-
[
`apply`
](
templates/apply.yml
)
-
[
`destroy`
](
templates/destroy.yml
)
-
[
`delete-state`
](
templates/delete-state.yml
)
Have a look at the individual template spec to learn about the available inputs.
### Inputs
| Name | Default | Description |
...
...
This diff is collapsed.
Click to expand it.
README.md
+
31
−
3
View file @
b2383ea7
...
...
@@ -32,7 +32,7 @@ include:
-
component
:
gitlab.com/components/opentofu/full-pipeline@<VERSION>
inputs
:
# The version must currently be specified explicitly as an input,
# to find the correctly associated images. # This can be removed
# to find the correctly associated images. # This can be removed
# once https://gitlab.com/gitlab-org/gitlab/-/issues/438275 is solved.
version
:
<VERSION>
opentofu_version
:
<OPENTOFU_VERSION>
...
...
@@ -48,7 +48,7 @@ include:
-
component
:
gitlab.com/components/opentofu/full-pipeline@~latest
inputs
:
# The version must currently be specified explicitly as an input,
# to find the correctly associated images. # This can be removed
# to find the correctly associated images. # This can be removed
# once https://gitlab.com/gitlab-org/gitlab/-/issues/438275 is solved.
version
:
latest
opentofu_version
:
1.6.0
...
...
@@ -62,7 +62,7 @@ include:
-
component
:
gitlab.com/components/opentofu/full-pipeline@0.0.0-alpha1
inputs
:
# The version must currently be specified explicitly as an input,
# to find the correctly associated images. # This can be removed
# to find the correctly associated images. # This can be removed
# once https://gitlab.com/gitlab-org/gitlab/-/issues/438275 is solved.
version
:
0.0.0-alpha1
opentofu_version
:
1.6.0
...
...
@@ -70,6 +70,34 @@ include:
stages
:
[
validate
,
test
,
build
,
deploy
,
cleanup
]
```
Instead of including the
`full-pipeline`
, it's also possible to include individual jobs
and compose your own pipeline, for example, to just run the
`fmt`
job you can do:
```
yaml
include
:
-
component
:
gitlab.com/components/opentofu/fmt@latest
inputs
:
# The version must currently be specified explicitly as an input,
# to find the correctly associated images. # This can be removed
# once https://gitlab.com/gitlab-org/gitlab/-/issues/438275 is solved.
version
:
latest
opentofu_version
:
1.6.0
root_dir
:
tofu/
```
Have a look at the
[
`full-pipeline`
](
templates/full-pipeline.yml
)
for how it's constructed.
The following job components exist:
-
[
`fmt`
](
templates/fmt.yml
)
-
[
`validate`
](
templates/validate.yml
)
-
[
`plan`
](
templates/plan.yml
)
-
[
`apply`
](
templates/apply.yml
)
-
[
`destroy`
](
templates/destroy.yml
)
-
[
`delete-state`
](
templates/delete-state.yml
)
Have a look at the individual template spec to learn about the available inputs.
### Inputs
| Name | Default | Description |
...
...
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