diff --git a/.gitlab/README.md b/.gitlab/README.md index 571b01348e79f607e1396eadf19448248d6786df..b16477ee5295d408b841b12de32ea1a59609b1f4 100644 --- a/.gitlab/README.md +++ b/.gitlab/README.md @@ -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 | diff --git a/README.md b/README.md index 99768d1440ce7f5a204854e34dd292fc80082c06..74e64f97bd609ec991e1c190ce6fa01247a215e4 100644 --- a/README.md +++ b/README.md @@ -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 |