Skip to content
Snippets Groups Projects
Unverified Commit 64fa504c authored by Timo Furrer's avatar Timo Furrer
Browse files

Fix backports testing

parent 7833828b
No related branches found
No related tags found
No related merge requests found
...@@ -27,5 +27,5 @@ because components are not yet properly supported in self-managed instances. ...@@ -27,5 +27,5 @@ because components are not yet properly supported in self-managed instances.
That is, they are not bundled and it's not possible to use a component across instances. That is, they are not bundled and it's not possible to use a component across instances.
The OpenTofu CI/CD job and pipeline templates can be generated using `make backports`. The OpenTofu CI/CD job and pipeline templates can be generated using `make backports`.
The output is generated into the `backports` folder. Please contribute those files The output is generated into the `backports` folder.
only upon manual inspection to the canonical GitLab repository. Please contribute those files only upon full manual inspection to the canonical GitLab repository.
...@@ -52,3 +52,4 @@ backports: ...@@ -52,3 +52,4 @@ backports:
@sed -i $(BACKPORTS_BASE_FILE) -e 's/^apply:$$/.opentofu:apply:/' @sed -i $(BACKPORTS_BASE_FILE) -e 's/^apply:$$/.opentofu:apply:/'
@sed -i $(BACKPORTS_BASE_FILE) -e 's/destroy:/.opentofu:destroy:/' @sed -i $(BACKPORTS_BASE_FILE) -e 's/destroy:/.opentofu:destroy:/'
@sed -i $(BACKPORTS_BASE_FILE) -e 's/\[destroy\]/[.opentofu:destroy]/' @sed -i $(BACKPORTS_BASE_FILE) -e 's/\[destroy\]/[.opentofu:destroy]/'
@sed -i $(BACKPORTS_BASE_FILE) -e 's/^delete-state:$$/.opentofu:delete-state:/'
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
# https://gitlab.com/gitlab-org/gitlab/-/blob/master/lib/gitlab/ci/templates/OpenTofu.gitlab-ci.yml # https://gitlab.com/gitlab-org/gitlab/-/blob/master/lib/gitlab/ci/templates/OpenTofu.gitlab-ci.yml
include: include:
- local: /backports/OpenTofu/Base.gitlab-ci.yml # https://gitlab.com/gitlab-org/gitlab/blob/master/lib/gitlab/ci/templates/OpenTofu/Base.gitlab-ci.yml - template: OpenTofu/Base.gitlab-ci.yml # https://gitlab.com/gitlab-org/gitlab/blob/master/lib/gitlab/ci/templates/OpenTofu/Base.gitlab-ci.yml
stages: [validate, test, build, deploy] stages: [validate, test, build, deploy]
......
...@@ -98,7 +98,7 @@ variables: ...@@ -98,7 +98,7 @@ variables:
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && $TF_AUTO_DESTROY == "true" - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && $TF_AUTO_DESTROY == "true"
- when: manual - when: manual
delete-state: .opentofu:delete-state:
extends: .opentofu:default extends: .opentofu:default
stage: cleanup stage: cleanup
needs: [.opentofu:destroy] needs: [.opentofu:destroy]
......
include: include:
- local: /backports/OpenTofu.gitlab-ci.yml - local: /backports/OpenTofu/Base.gitlab-ci.yml
stages: [validate, test, build, deploy, cleanup] stages: [validate, test, build, deploy, cleanup]
# Required to run everything immediately, instead of manually. # Required to run everything immediately, instead of manually.
fmt: fmt:
extends: .opentofu:fmt
rules: [{when: always}] rules: [{when: always}]
validate: validate:
extends: .opentofu:validate
rules: [{when: always}] rules: [{when: always}]
plan: plan:
extends: .opentofu:plan
rules: [{when: always}] rules: [{when: always}]
apply: apply:
extends: .opentofu:apply
rules: [{when: always}] rules: [{when: always}]
destroy: destroy:
extends: .opentofu:destroy
rules: [{when: always}] rules: [{when: always}]
delete-state: delete-state:
extends: .opentofu:delete-states
rules: [{when: always}] rules: [{when: always}]
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment