Newer
Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
include:
- component: gitlab.com/$CI_PROJECT_PATH/job-templates@$CI_COMMIT_SHA
inputs:
image_registry_base: $GITLAB_OPENTOFU_IMAGE_BASE
version: $CI_COMMIT_SHA
opentofu_version: $OPENTOFU_VERSION
root_dir: $TEST_TF_ROOT
state_name: $TEST_TF_STATE_NAME
stages: [validate, test, build, deploy, cleanup]
# Required to run everything immediately, instead of manually.
fmt:
extends: '.opentofu:fmt'
rules: [{when: always}]
validate:
extends: '.opentofu:validate'
rules: [{when: always}]
plan:
extends: '.opentofu:plan'
rules: [{when: always}]
apply:
extends: '.opentofu:apply'
rules: [{when: always}]
destroy:
extends: '.opentofu:destroy'
rules: [{when: always}]
delete-state:
extends: '.opentofu:delete-state'
needs: [destroy]
rules: [{when: always}]