diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 4d31d093bdb39a54b528391aca913c4dfb12dee6..1f3861bbfe0a19e75d6486635c6e4aa97813d6bc 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -8,6 +8,8 @@ workflow: include: - local: tests/unit.gitlab-ci.yml rules: + - if: $SKIP_TESTS == "true" + when: never - changes: - src/gitlab-tofu.sh - Dockerfile @@ -16,6 +18,8 @@ include: - if: $CI_COMMIT_TAG - local: tests/integration.gitlab-ci.yml rules: + - if: $SKIP_TESTS == "true" + when: never - changes: - src/gitlab-tofu.sh - Dockerfile diff --git a/.gitlab/README.md.template b/.gitlab/README.md.template index 03983f98a09d48b8f300f6f8035fa0682725b5ee..cb132e7763479da4daa0ffd0535d545eefdcfda8 100644 --- a/.gitlab/README.md.template +++ b/.gitlab/README.md.template @@ -274,6 +274,9 @@ need to change that path in the `include:component` and additionally provide the See also the official GitLab documentation for it [here](https://docs.gitlab.com/ee/ci/components/#use-a-gitlabcom-component-in-a-self-managed-instance). +If you want to save runner resources you may disable the unit and integration tests +by setting the `SKIP_TESTS` CI/CD variable to `true`. + ## Migrating from the Terraform CI/CD templates When migrating from the GitLab Terraform CI/CD templates you can use the following migration rules: diff --git a/README.md b/README.md index a6f8592f5cf1839f3c40bb8887d92d799eb7f8d3..d74b2694cedb14afacf8db5918f07f1a7743ab6c 100644 --- a/README.md +++ b/README.md @@ -299,6 +299,9 @@ need to change that path in the `include:component` and additionally provide the See also the official GitLab documentation for it [here](https://docs.gitlab.com/ee/ci/components/#use-a-gitlabcom-component-in-a-self-managed-instance). +If you want to save runner resources you may disable the unit and integration tests +by setting the `SKIP_TESTS` CI/CD variable to `true`. + ## Migrating from the Terraform CI/CD templates When migrating from the GitLab Terraform CI/CD templates you can use the following migration rules: