Skip to content
Snippets Groups Projects
Commit 4316b348 authored by Timo Furrer's avatar Timo Furrer
Browse files

Merge branch 'rules-and-needs' into 'main'

Support inputs for `rules` and `needs`

See merge request components/opentofu!164
parents 1cb6ba04 909b08dd
No related branches found
No related tags found
No related merge requests found
Showing
with 294 additions and 110 deletions
......@@ -88,6 +88,13 @@ spec:
default: ''
type: string
description: 'Path to a variables files relative to root_dir. Only used if no_plan is true otherwise the variables are coming from the plan.'
rules:
# FIXME: eventually, we'll want to define `null` as the default,
# but this is NOT support yet, see
# https://gitlab.com/gitlab-org/gitlab/-/issues/440468
default: []
type: array
description: 'Defines the `rules` of the job.'
---
......@@ -97,10 +104,7 @@ spec:
name: $TF_STATE_NAME
action: start
resource_group: $TF_STATE_NAME
rules:
- if: '$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && "$[[ inputs.auto_apply ]]" == "true"'
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
when: manual
rules: $[[ inputs.rules ]]
cache:
key: "$__CACHE_KEY_HACK"
paths:
......
......@@ -74,11 +74,19 @@ spec:
command:
description: 'The gitlab-tofu command to run.'
needs:
# FIXME: eventually, we'll want to define `null` as the default,
# but this is NOT support yet, see
# https://gitlab.com/gitlab-org/gitlab/-/issues/440468
default: []
type: array
description: 'Defines the `needs` of the job.'
---
'$[[ inputs.as ]]':
stage: $[[ inputs.stage ]]
needs: []
needs: $[[ inputs.needs ]]
cache:
key: "$__CACHE_KEY_HACK"
paths:
......
......@@ -15,6 +15,13 @@ spec:
create_delete_state_job:
default: 'true'
description: 'Wheather the delete-state job should be created or not.'
rules:
# FIXME: eventually, we'll want to define `null` as the default,
# but this is NOT support yet, see
# https://gitlab.com/gitlab-org/gitlab/-/issues/440468
default: []
type: array
description: 'Defines the `rules` of the job.'
---
......@@ -26,6 +33,4 @@ spec:
TF_STATE_NAME: $[[ inputs.state_name ]]
script:
- curl --request DELETE -u "gitlab-ci-token:$CI_JOB_TOKEN" "$CI_API_V4_URL/projects/$CI_PROJECT_ID/terraform/state/$TF_STATE_NAME"
rules:
- if: '$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH'
- when: manual
rules: $[[ inputs.rules ]]
......@@ -88,6 +88,13 @@ spec:
default: ''
type: string
description: 'Path to a variables files relative to root_dir. Only used if no_plan is true otherwise the variables are coming from the plan.'
rules:
# FIXME: eventually, we'll want to define `null` as the default,
# but this is NOT support yet, see
# https://gitlab.com/gitlab-org/gitlab/-/issues/440468
default: []
type: array
description: 'Defines the `rules` of the job.'
---
......@@ -97,9 +104,7 @@ spec:
name: $TF_STATE_NAME
action: stop
resource_group: $TF_STATE_NAME
rules:
- if: '$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && "$[[ inputs.auto_destroy ]]" == "true"'
- when: manual
rules: $[[ inputs.rules ]]
cache:
key: "$__CACHE_KEY_HACK"
paths:
......
......@@ -76,16 +76,28 @@ spec:
type: boolean
description: 'If the job is allowed to fail or not.'
needs:
# FIXME: eventually, we'll want to define `null` as the default,
# but this is NOT support yet, see
# https://gitlab.com/gitlab-org/gitlab/-/issues/440468
default: []
type: array
description: 'Defines the `needs` of the job.'
rules:
# FIXME: eventually, we'll want to define `null` as the default,
# but this is NOT support yet, see
# https://gitlab.com/gitlab-org/gitlab/-/issues/440468
default: []
type: array
description: 'Defines the `rules` of the job.'
---
'$[[ inputs.as ]]':
stage: $[[ inputs.stage ]]
needs: []
rules:
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
- if: $CI_OPEN_MERGE_REQUESTS # Don't add it to a *branch* pipeline if it's already in a merge request pipeline.
when: never
- if: $CI_COMMIT_BRANCH # If there's no open merge request, add it to a *branch* pipeline instead.
needs: $[[ inputs.needs ]]
rules: $[[ inputs.rules ]]
allow_failure: $[[ inputs.allow_failure ]]
cache:
key: "$__CACHE_KEY_HACK"
......
......@@ -100,6 +100,57 @@ spec:
default: ''
type: string
description: 'Path to a variables files relative to root_dir.'
fmt_rules:
default:
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
- if: $CI_OPEN_MERGE_REQUESTS # Don't add it to a *branch* pipeline if it's already in a merge request pipeline.
when: never
- if: $CI_COMMIT_BRANCH # If there's no open merge request, add it to a *branch* pipeline instead.
type: array
description: 'Defines the `rules` of the `fmt` job.'
validate_rules:
default:
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
- if: $CI_OPEN_MERGE_REQUESTS # Don't add it to a *branch* pipeline if it's already in a merge request pipeline.
when: never
- if: $CI_COMMIT_BRANCH # If there's no open merge request, add it to a *branch* pipeline instead.
type: array
description: 'Defines the `rules` of the `validate` job.'
test_rules:
default:
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
- if: $CI_OPEN_MERGE_REQUESTS # Don't add it to a *branch* pipeline if it's already in a merge request pipeline.
when: never
- if: $CI_COMMIT_BRANCH # If there's no open merge request, add it to a *branch* pipeline instead.
type: array
description: 'Defines the `rules` of the `test` job.'
plan_rules:
default:
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
- if: $CI_OPEN_MERGE_REQUESTS # Don't add it to a *branch* pipeline if it's already in a merge request pipeline.
when: never
- if: $CI_COMMIT_BRANCH # If there's no open merge request, add it to a *branch* pipeline instead.
type: array
description: 'Defines the `rules` of the `plan` job.'
apply_rules:
default:
- if: '$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && "$[[ inputs.auto_apply ]]" == "true"'
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
when: manual
type: array
description: 'Defines the `rules` of the `apply` job.'
destroy_rules:
default:
- if: '$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && "$[[ inputs.auto_destroy ]]" == "true"'
- when: manual
type: array
description: 'Defines the `rules` of the `destroy` job.'
delete_state_rules:
default:
- if: '$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH'
- when: manual
type: array
description: 'Defines the `rules` of the `delete-state` job.'
---
......@@ -115,6 +166,8 @@ include:
image_name: $[[ inputs.image_name ]]
image_digest: $[[ inputs.image_digest ]]
root_dir: $[[ inputs.root_dir ]]
needs: []
rules: $[[ inputs.fmt_rules ]]
- local: '/templates/validate.yml'
inputs:
as: '$[[ inputs.job_name_prefix ]]validate'
......@@ -128,6 +181,7 @@ include:
root_dir: $[[ inputs.root_dir ]]
state_name: $[[ inputs.state_name ]]
var_file: $[[ inputs.var_file ]]
rules: $[[ inputs.validate_rules ]]
- local: '/templates/test.yml'
inputs:
as: '$[[ inputs.job_name_prefix ]]test'
......@@ -141,6 +195,8 @@ include:
root_dir: $[[ inputs.root_dir ]]
state_name: $[[ inputs.state_name ]]
var_file: $[[ inputs.var_file ]]
needs: []
rules: $[[ inputs.test_rules ]]
rules:
- exists:
- $[[ inputs.root_dir ]]/**/*.tftest.hcl
......@@ -158,6 +214,7 @@ include:
state_name: $[[ inputs.state_name ]]
artifacts_access: $[[ inputs.plan_artifacts_access ]]
var_file: $[[ inputs.var_file ]]
rules: $[[ inputs.plan_rules ]]
- local: '/templates/apply.yml'
inputs:
as: '$[[ inputs.job_name_prefix ]]apply'
......@@ -172,6 +229,7 @@ include:
state_name: $[[ inputs.state_name ]]
auto_apply: $[[ inputs.auto_apply ]]
var_file: $[[ inputs.var_file ]]
rules: $[[ inputs.apply_rules ]]
- local: '/templates/destroy.yml'
inputs:
as: '$[[ inputs.job_name_prefix ]]destroy'
......@@ -186,12 +244,17 @@ include:
state_name: $[[ inputs.state_name ]]
auto_destroy: $[[ inputs.auto_destroy ]]
var_file: $[[ inputs.var_file ]]
rules: $[[ inputs.destroy_rules ]]
- local: '/templates/delete-state.yml'
inputs:
as: '$[[ inputs.job_name_prefix ]]delete-state'
stage: $[[ inputs.stage_cleanup ]]
state_name: $[[ inputs.state_name ]]
rules: $[[ inputs.delete_state_rules ]]
# NOTE: we have to define this `needs` here, because inputs don't support arrays, yet.
# FIXME: eventually, we'll have a `needs` input on the `delete-state`
# job template, but the issue is that we cannot default it to something
# meaningful other than `null` - but `null` is also not yet supported, see
# https://gitlab.com/gitlab-org/gitlab/-/issues/440468
$[[ inputs.job_name_prefix ]]delete-state:
needs: ['$[[ inputs.job_name_prefix ]]destroy']
......@@ -82,12 +82,19 @@ spec:
default: ''
type: string
description: 'Path to a variables files relative to root_dir.'
needs:
# FIXME: eventually, we'll want to define `null` as the default,
# but this is NOT support yet, see
# https://gitlab.com/gitlab-org/gitlab/-/issues/440468
default: []
type: array
description: 'Defines the `needs` of the job.'
---
'$[[ inputs.as ]]':
stage: $[[ inputs.stage ]]
needs: []
needs: $[[ inputs.needs ]]
cache:
key: "$__CACHE_KEY_HACK"
paths:
......
......@@ -87,6 +87,13 @@ spec:
default: ''
type: string
description: 'Path to a variables files relative to root_dir.'
rules:
# FIXME: eventually, we'll want to define `null` as the default,
# but this is NOT support yet, see
# https://gitlab.com/gitlab-org/gitlab/-/issues/440468
default: []
type: array
description: 'Defines the `rules` of the job.'
---
......@@ -106,11 +113,7 @@ spec:
- $TF_ROOT/$[[ inputs.plan_name ]].cache
reports:
terraform: $TF_ROOT/$[[ inputs.plan_name]].json
rules:
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
- if: $CI_OPEN_MERGE_REQUESTS # Don't add it to a *branch* pipeline if it's already in a merge request pipeline.
when: never
- if: $CI_COMMIT_BRANCH # If there's no open merge request, add it to a *branch* pipeline instead.
rules: $[[ inputs.rules ]]
cache:
key: "$__CACHE_KEY_HACK"
paths:
......
......@@ -77,17 +77,27 @@ spec:
default: ''
type: string
description: 'Path to a variables files relative to root_dir.'
needs:
# FIXME: eventually, we'll want to define `null` as the default,
# but this is NOT support yet, see
# https://gitlab.com/gitlab-org/gitlab/-/issues/440468
default: []
type: array
description: 'Defines the `needs` of the job.'
rules:
# FIXME: eventually, we'll want to define `null` as the default,
# but this is NOT support yet, see
# https://gitlab.com/gitlab-org/gitlab/-/issues/440468
default: []
type: array
description: 'Defines the `rules` of the job.'
---
'$[[ inputs.as ]]':
stage: $[[ inputs.stage ]]
needs: []
rules:
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
- if: $CI_OPEN_MERGE_REQUESTS # Don't add it to a *branch* pipeline if it's already in a merge request pipeline.
when: never
- if: $CI_COMMIT_BRANCH # If there's no open merge request, add it to a *branch* pipeline instead.
needs: $[[ inputs.needs ]]
rules: $[[ inputs.rules ]]
cache:
key: "$__CACHE_KEY_HACK"
paths:
......
......@@ -90,6 +90,37 @@ spec:
default: ''
type: string
description: 'Path to a variables files relative to root_dir.'
fmt_rules:
default:
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
- if: $CI_OPEN_MERGE_REQUESTS # Don't add it to a *branch* pipeline if it's already in a merge request pipeline.
when: never
- if: $CI_COMMIT_BRANCH # If there's no open merge request, add it to a *branch* pipeline instead.
type: array
description: 'Defines the `rules` of the `fmt` job.'
validate_rules:
default:
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
- if: $CI_OPEN_MERGE_REQUESTS # Don't add it to a *branch* pipeline if it's already in a merge request pipeline.
when: never
- if: $CI_COMMIT_BRANCH # If there's no open merge request, add it to a *branch* pipeline instead.
type: array
description: 'Defines the `rules` of the `validate` job.'
plan_rules:
default:
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
- if: $CI_OPEN_MERGE_REQUESTS # Don't add it to a *branch* pipeline if it's already in a merge request pipeline.
when: never
- if: $CI_COMMIT_BRANCH # If there's no open merge request, add it to a *branch* pipeline instead.
type: array
description: 'Defines the `rules` of the `plan` job.'
apply_rules:
default:
- if: '$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && "$[[ inputs.auto_apply ]]" == "true"'
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
when: manual
type: array
description: 'Defines the `rules` of the `apply` job.'
---
......@@ -105,6 +136,8 @@ include:
image_name: $[[ inputs.image_name ]]
image_digest: $[[ inputs.image_digest ]]
root_dir: $[[ inputs.root_dir ]]
needs: []
rules: $[[ inputs.fmt_rules ]]
- local: '/templates/validate.yml'
inputs:
as: '$[[ inputs.job_name_prefix ]]validate'
......@@ -118,6 +151,7 @@ include:
root_dir: $[[ inputs.root_dir ]]
state_name: $[[ inputs.state_name ]]
var_file: $[[ inputs.var_file ]]
rules: $[[ inputs.validate_rules ]]
- local: '/templates/plan.yml'
inputs:
as: '$[[ inputs.job_name_prefix ]]plan'
......@@ -132,6 +166,7 @@ include:
state_name: $[[ inputs.state_name ]]
artifacts_access: $[[ inputs.plan_artifacts_access ]]
var_file: $[[ inputs.var_file ]]
rules: $[[ inputs.plan_rules ]]
- local: '/templates/apply.yml'
inputs:
as: '$[[ inputs.job_name_prefix ]]apply'
......@@ -146,3 +181,4 @@ include:
state_name: $[[ inputs.state_name ]]
auto_apply: $[[ inputs.auto_apply ]]
var_file: $[[ inputs.var_file ]]
rules: $[[ inputs.apply_rules ]]
......@@ -93,6 +93,42 @@ spec:
default: ''
type: string
description: 'Path to a variables files relative to root_dir.'
fmt_rules:
default:
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
- if: $CI_OPEN_MERGE_REQUESTS # Don't add it to a *branch* pipeline if it's already in a merge request pipeline.
when: never
- if: $CI_COMMIT_BRANCH # If there's no open merge request, add it to a *branch* pipeline instead.
type: array
description: 'Defines the `rules` of the `fmt` job.'
validate_rules:
default:
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
- if: $CI_OPEN_MERGE_REQUESTS # Don't add it to a *branch* pipeline if it's already in a merge request pipeline.
when: never
- if: $CI_COMMIT_BRANCH # If there's no open merge request, add it to a *branch* pipeline instead.
type: array
description: 'Defines the `rules` of the `validate` job.'
plan_rules:
default:
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
- if: $CI_OPEN_MERGE_REQUESTS # Don't add it to a *branch* pipeline if it's already in a merge request pipeline.
when: never
- if: $CI_COMMIT_BRANCH # If there's no open merge request, add it to a *branch* pipeline instead.
type: array
description: 'Defines the `rules` of the `plan` job.'
destroy_rules:
default:
- if: '$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && "$[[ inputs.auto_destroy ]]" == "true"'
- when: manual
type: array
description: 'Defines the `rules` of the `destroy` job.'
delete_state_rules:
default:
- if: '$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH'
- when: manual
type: array
description: 'Defines the `rules` of the `delete-state` job.'
---
......@@ -108,6 +144,8 @@ include:
image_name: $[[ inputs.image_name ]]
image_digest: $[[ inputs.image_digest ]]
root_dir: $[[ inputs.root_dir ]]
needs: []
rules: $[[ inputs.fmt_rules ]]
- local: '/templates/validate.yml'
inputs:
as: '$[[ inputs.job_name_prefix ]]validate'
......@@ -121,6 +159,7 @@ include:
root_dir: $[[ inputs.root_dir ]]
state_name: $[[ inputs.state_name ]]
var_file: $[[ inputs.var_file ]]
rules: $[[ inputs.validate_rules ]]
- local: '/templates/plan.yml'
inputs:
as: '$[[ inputs.job_name_prefix ]]plan'
......@@ -137,6 +176,7 @@ include:
artifacts_access: $[[ inputs.plan_artifacts_access ]]
destroy: true
var_file: $[[ inputs.var_file ]]
rules: $[[ inputs.plan_rules ]]
- local: '/templates/destroy.yml'
inputs:
as: '$[[ inputs.job_name_prefix ]]destroy'
......@@ -153,12 +193,17 @@ include:
plan_name: $[[ inputs.plan_name ]]
auto_destroy: $[[ inputs.auto_destroy ]]
var_file: $[[ inputs.var_file ]]
rules: $[[ inputs.destroy_rules ]]
- local: '/templates/delete-state.yml'
inputs:
as: '$[[ inputs.job_name_prefix ]]delete-state'
stage: $[[ inputs.stage_cleanup ]]
state_name: $[[ inputs.state_name ]]
rules: $[[ inputs.delete_state_rules ]]
# NOTE: we have to define this `needs` here, because inputs don't support arrays, yet.
# FIXME: eventually, we'll have a `needs` input on the `delete-state`
# job template, but the issue is that we cannot default it to something
# meaningful other than `null` - but `null` is also not yet supported, see
# https://gitlab.com/gitlab-org/gitlab/-/issues/440468
$[[ inputs.job_name_prefix ]]delete-state:
needs: ['$[[ inputs.job_name_prefix ]]destroy']
......@@ -83,6 +83,30 @@ spec:
default: ''
type: string
description: 'Path to a variables files relative to root_dir.'
fmt_rules:
default:
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
- if: $CI_OPEN_MERGE_REQUESTS # Don't add it to a *branch* pipeline if it's already in a merge request pipeline.
when: never
- if: $CI_COMMIT_BRANCH # If there's no open merge request, add it to a *branch* pipeline instead.
type: array
description: 'Defines the `rules` of the `fmt` job.'
validate_rules:
default:
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
- if: $CI_OPEN_MERGE_REQUESTS # Don't add it to a *branch* pipeline if it's already in a merge request pipeline.
when: never
- if: $CI_COMMIT_BRANCH # If there's no open merge request, add it to a *branch* pipeline instead.
type: array
description: 'Defines the `rules` of the `validate` job.'
plan_rules:
default:
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
- if: $CI_OPEN_MERGE_REQUESTS # Don't add it to a *branch* pipeline if it's already in a merge request pipeline.
when: never
- if: $CI_COMMIT_BRANCH # If there's no open merge request, add it to a *branch* pipeline instead.
type: array
description: 'Defines the `rules` of the `plan` job.'
---
......@@ -98,6 +122,8 @@ include:
image_name: $[[ inputs.image_name ]]
image_digest: $[[ inputs.image_digest ]]
root_dir: $[[ inputs.root_dir ]]
needs: []
rules: $[[ inputs.fmt_rules ]]
- local: '/templates/validate.yml'
inputs:
as: '$[[ inputs.job_name_prefix ]]validate'
......@@ -111,6 +137,7 @@ include:
root_dir: $[[ inputs.root_dir ]]
state_name: $[[ inputs.state_name ]]
var_file: $[[ inputs.var_file ]]
rules: $[[ inputs.validate_rules ]]
- local: '/templates/plan.yml'
inputs:
as: '$[[ inputs.job_name_prefix ]]plan'
......@@ -125,3 +152,4 @@ include:
state_name: $[[ inputs.state_name ]]
artifacts_access: $[[ inputs.artifacts_access ]]
var_file: $[[ inputs.var_file ]]
rules: $[[ inputs.plan_rules ]]
......@@ -70,23 +70,29 @@ spec:
root_dir:
default: ${CI_PROJECT_DIR}
description: 'Root directory for the OpenTofu project.'
state_name:
default: default
description: 'Remote OpenTofu state name.'
var_file:
default: ''
type: string
description: 'Path to a variables files relative to root_dir.'
rules:
# FIXME: eventually, we'll want to define `null` as the default,
# but this is NOT support yet, see
# https://gitlab.com/gitlab-org/gitlab/-/issues/440468
default: []
type: array
description: 'Defines the `rules` of the job.'
---
'$[[ inputs.as ]]':
stage: $[[ inputs.stage ]]
rules:
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
- if: $CI_OPEN_MERGE_REQUESTS # Don't add it to a *branch* pipeline if it's already in a merge request pipeline.
when: never
- if: $CI_COMMIT_BRANCH # If there's no open merge request, add it to a *branch* pipeline instead.
rules: $[[ inputs.rules ]]
cache:
key: "$__CACHE_KEY_HACK"
paths:
......
......@@ -7,29 +7,13 @@ include:
opentofu_version: $OPENTOFU_VERSION
root_dir: $TEST_TF_ROOT
state_name: $TEST_TF_STATE_NAME
# Required to run everything immediately, instead of manually.
fmt_rules: [{when: always}]
validate_rules: [{when: always}]
test_rules: [{when: always}]
plan_rules: [{when: always}]
apply_rules: [{when: always}]
destroy_rules: [{when: always}]
delete_state_rules: [{when: always}]
stages: [validate, test, build, deploy, cleanup]
# Required to run everything immediately, instead of manually.
fmt:
rules: [{when: always}]
validate:
rules: [{when: always}]
test:
rules: [{when: always}]
plan:
rules: [{when: always}]
apply:
rules: [{when: always}]
destroy:
rules: [{when: always}]
delete-state:
rules: [{when: always}]
......@@ -10,6 +10,8 @@ include:
state_name: $TEST_TF_STATE_NAME
no_plan: true
auto_apply: true
# Required to run everything immediately, instead of manually.
rules: [{when: always}]
- component: $CI_SERVER_FQDN/$CI_PROJECT_PATH/validate-plan-destroy@$CI_COMMIT_SHA
inputs:
......@@ -18,26 +20,11 @@ include:
opentofu_version: $OPENTOFU_VERSION
root_dir: $TEST_TF_ROOT
state_name: $TEST_TF_STATE_NAME
# Required to run everything immediately, instead of manually.
fmt_rules: [{when: always}]
validate_rules: [{when: always}]
plan_rules: [{when: always}]
destroy_rules: [{when: always}]
delete_state_rules: [{when: always}]
stages: [setup, validate, build, cleanup]
# Required to run everything immediately, instead of manually.
'setup:apply':
rules: [{when: always}]
fmt:
rules: [{when: always}]
validate:
rules: [{when: always}]
plan:
rules: [{when: always}]
destroy:
rules: [{when: always}]
delete-state:
rules: [{when: always}]
......@@ -6,10 +6,7 @@ include:
opentofu_version: $OPENTOFU_VERSION
root_dir: $TEST_TF_ROOT
state_name: $TEST_TF_STATE_NAME
# Required to run everything immediately, instead of manually.
rules: [{when: always}]
stages: [test]
# Required to run everything immediately, instead of manually.
test:
rules: [{when: always}]
......@@ -8,29 +8,13 @@ include:
root_dir: $TEST_TF_ROOT
state_name: $TEST_TF_STATE_NAME
var_file: varfile.integration-test.tfvars
# Required to run everything immediately, instead of manually.
fmt_rules: [{when: always}]
validate_rules: [{when: always}]
test_rules: [{when: always}]
plan_rules: [{when: always}]
apply_rules: [{when: always}]
destroy_rules: [{when: always}]
delete_state_rules: [{when: always}]
stages: [validate, test, build, deploy, cleanup]
# Required to run everything immediately, instead of manually.
fmt:
rules: [{when: always}]
validate:
rules: [{when: always}]
test:
rules: [{when: always}]
plan:
rules: [{when: always}]
apply:
rules: [{when: always}]
destroy:
rules: [{when: always}]
delete-state:
rules: [{when: always}]
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment