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

Support skipping tests in CI for self-managed

This change set allows to disable the unit and integration tests in the
pipeline intended for GitLab self-managed to save runner resources.

Changelog: added

Closes https://gitlab.com/components/opentofu/-/issues/40
parent 14de263c
No related branches found
No related tags found
No related merge requests found
...@@ -8,6 +8,8 @@ workflow: ...@@ -8,6 +8,8 @@ workflow:
include: include:
- local: tests/unit.gitlab-ci.yml - local: tests/unit.gitlab-ci.yml
rules: rules:
- if: $SKIP_TESTS == "true"
when: never
- changes: - changes:
- src/gitlab-tofu.sh - src/gitlab-tofu.sh
- Dockerfile - Dockerfile
...@@ -16,6 +18,8 @@ include: ...@@ -16,6 +18,8 @@ include:
- if: $CI_COMMIT_TAG - if: $CI_COMMIT_TAG
- local: tests/integration.gitlab-ci.yml - local: tests/integration.gitlab-ci.yml
rules: rules:
- if: $SKIP_TESTS == "true"
when: never
- changes: - changes:
- src/gitlab-tofu.sh - src/gitlab-tofu.sh
- Dockerfile - Dockerfile
......
...@@ -274,6 +274,9 @@ need to change that path in the `include:component` and additionally provide the ...@@ -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 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). [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 ## Migrating from the Terraform CI/CD templates
When migrating from the GitLab Terraform CI/CD templates you can use the following migration rules: When migrating from the GitLab Terraform CI/CD templates you can use the following migration rules:
......
...@@ -299,6 +299,9 @@ need to change that path in the `include:component` and additionally provide the ...@@ -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 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). [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 ## Migrating from the Terraform CI/CD templates
When migrating from the GitLab Terraform CI/CD templates you can use the following migration rules: When migrating from the GitLab Terraform CI/CD templates you can use the following migration rules:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment