diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 022bde5dc3f07cd2b8173c4ba60053ea231c3f75..ddb8e76c0ed85e06f9a30db4b46b0d02525e5dc3 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -34,7 +34,7 @@ include: # Additionally, when this project is mirrored into another instance the component reference fails. # This may be solved with https://gitlab.com/gitlab-org/gitlab/-/issues/434260#note_1776822074 - # - component: gitlab.com/components/container-scanning/container-scanning@3.0 + # - component: $CI_SERVER_FQDN/components/container-scanning/container-scanning@3.0 # inputs: # stage: quality # cs_image: $GITLAB_OPENTOFU_IMAGE_NAME diff --git a/.gitlab/README.md.template b/.gitlab/README.md.template index 284eaf77b0e1cf297e7bd6e175e5321d83b03bcc..7ad5f586c841b512303ca449aa93408cb3a5d9e9 100644 --- a/.gitlab/README.md.template +++ b/.gitlab/README.md.template @@ -29,7 +29,7 @@ You find all releases on the [Releases Overview Page](https://gitlab.com/compone ```yaml include: - - component: gitlab.com/components/opentofu/full-pipeline@<VERSION> + - component: $CI_SERVER_FQDN/$CI_PROJECT_PATH/full-pipeline@<VERSION> inputs: # The version must currently be specified explicitly as an input, # to find the correctly associated images. # This can be removed @@ -43,7 +43,7 @@ stages: [validate, test, build, deploy, cleanup] # ... or without the destroy jobs: include: - - component: gitlab.com/components/opentofu/validate-plan-apply@<VERSION> + - component: $CI_SERVER_FQDN/$CI_PROJECT_PATH/validate-plan-apply@<VERSION> inputs: # The version must currently be specified explicitly as an input, # to find the correctly associated images. # This can be removed @@ -59,7 +59,7 @@ A concrete example may look like this: ```yaml # Using version `0.10.0`: include: - - component: gitlab.com/components/opentofu/full-pipeline@0.10.0 + - component: $CI_SERVER_FQDN/$CI_PROJECT_PATH/full-pipeline@0.10.0 inputs: # The version must currently be specified explicitly as an input, # to find the correctly associated images. # This can be removed @@ -74,7 +74,7 @@ stages: [validate, test, build, deploy, cleanup] # ... in case you absolutely know what you are doing and are # aware that this may introduce breaking changes, you may use the latest release: include: - - component: gitlab.com/components/opentofu/full-pipeline@~latest + - component: $CI_SERVER_FQDN/$CI_PROJECT_PATH/full-pipeline@~latest inputs: # The version must currently be specified explicitly as an input, # to find the correctly associated images. # This can be removed @@ -89,7 +89,7 @@ Or import all jobs as hidden templates ready to be extended: ```yaml include: - - component: gitlab.com/components/opentofu/job-templates@<VERSION> + - component: $CI_SERVER_FQDN/$CI_PROJECT_PATH/job-templates@<VERSION> inputs: # The version must currently be specified explicitly as an input, # to find the correctly associated images. # This can be removed @@ -122,7 +122,7 @@ and compose your own pipeline, for example, to just run the `fmt` job you can do ```yaml include: - - component: gitlab.com/components/opentofu/fmt@<VERSION> + - component: $CI_SERVER_FQDN/$CI_PROJECT_PATH/fmt@<VERSION> inputs: # The version must currently be specified explicitly as an input, # to find the correctly associated images. # This can be removed @@ -139,7 +139,7 @@ you want to extend the jobs: ```yaml include: - - component: gitlab.com/components/opentofu/job-templates@<VERSION> + - component: $CI_SERVER_FQDN/$CI_PROJECT_PATH/job-templates@<VERSION> inputs: # The version must currently be specified explicitly as an input, # to find the correctly associated images. # This can be removed @@ -195,7 +195,7 @@ the tools. For example to install `jq`: ```yaml include: - - component: gitlab.com/components/opentofu/validate-plan@<VERSION> + - component: $CI_SERVER_FQDN/$CI_PROJECT_PATH/validate-plan@<VERSION> inputs: version: <VERSION> opentofu_version: 1.6.1 @@ -227,10 +227,10 @@ and as the `version` input. Check out the [Usage](#Usage) section for examples. Each component release deploys the following images: -- `registry.gitlab.com/components/opentofu/gitlab-opentofu:<VERSION>-opentofu<OPENTOFU_VERSION>` -- `registry.gitlab.com/components/opentofu/gitlab-opentofu:<VERSION>-opentofu` +- `$CI_REGISTRY/$CI_PROJECT_PATH/gitlab-opentofu:<VERSION>-opentofu<OPENTOFU_VERSION>` +- `$CI_REGISTRY/$CI_PROJECT_PATH/gitlab-opentofu:<VERSION>-opentofu` - Includes the latest stable OpenTofu version at the time of releasing the component -- `registry.gitlab.com/components/opentofu/gitlab-opentofu:<VERSION>` +- `$CI_REGISTRY/$CI_PROJECT_PATH/gitlab-opentofu:<VERSION>` - Includes the latest stable OpenTofu version at the time of releasing the component In the above examples `<VERSION>` references the component version and `<OPENTOFU_VERSION>` @@ -255,7 +255,7 @@ and then use the component as you would from GitLab.com, but change the domain, ```yaml include: - - component: gitlab.example.com/components/opentofu/full-pipeline@<VERSION> + - component: $CI_SERVER_FQDN/$CI_PROJECT_PATH/full-pipeline@<VERSION> inputs: ... ``` diff --git a/.gitlab/release-notes.md.template b/.gitlab/release-notes.md.template index a24d368e2e86b8c8678758bb56a6ce13e31fe645..eeac4ad606c6b5890144395d05cbb1103d14d0c5 100644 --- a/.gitlab/release-notes.md.template +++ b/.gitlab/release-notes.md.template @@ -8,7 +8,7 @@ You can use the OpenTofu CI/CD component from the CI/CD catalog using: ```yaml include: - - component: gitlab.com/components/opentofu/full-pipeline@$CI_COMMIT_TAG + - component: $CI_COMMIT_TAG/$CI_PROJECT_PATH/full-pipeline@$CI_COMMIT_TAG inputs: # The version must currently be specified explicitly as an input, # to find the correctly associated images. # This can be removed diff --git a/README.md b/README.md index b14016a6d3d3d2193705e491feb911b15c47282b..4dff8c71cef993b86a4637b180094cc9f9142277 100644 --- a/README.md +++ b/README.md @@ -31,7 +31,7 @@ You find all releases on the [Releases Overview Page](https://gitlab.com/compone ```yaml include: - - component: gitlab.com/components/opentofu/full-pipeline@<VERSION> + - component: $CI_SERVER_FQDN/$CI_PROJECT_PATH/full-pipeline@<VERSION> inputs: # The version must currently be specified explicitly as an input, # to find the correctly associated images. # This can be removed @@ -45,7 +45,7 @@ stages: [validate, test, build, deploy, cleanup] # ... or without the destroy jobs: include: - - component: gitlab.com/components/opentofu/validate-plan-apply@<VERSION> + - component: $CI_SERVER_FQDN/$CI_PROJECT_PATH/validate-plan-apply@<VERSION> inputs: # The version must currently be specified explicitly as an input, # to find the correctly associated images. # This can be removed @@ -61,7 +61,7 @@ A concrete example may look like this: ```yaml # Using version `0.10.0`: include: - - component: gitlab.com/components/opentofu/full-pipeline@0.10.0 + - component: $CI_SERVER_FQDN/$CI_PROJECT_PATH/full-pipeline@0.10.0 inputs: # The version must currently be specified explicitly as an input, # to find the correctly associated images. # This can be removed @@ -76,7 +76,7 @@ stages: [validate, test, build, deploy, cleanup] # ... in case you absolutely know what you are doing and are # aware that this may introduce breaking changes, you may use the latest release: include: - - component: gitlab.com/components/opentofu/full-pipeline@~latest + - component: $CI_SERVER_FQDN/$CI_PROJECT_PATH/full-pipeline@~latest inputs: # The version must currently be specified explicitly as an input, # to find the correctly associated images. # This can be removed @@ -91,7 +91,7 @@ Or import all jobs as hidden templates ready to be extended: ```yaml include: - - component: gitlab.com/components/opentofu/job-templates@<VERSION> + - component: $CI_SERVER_FQDN/$CI_PROJECT_PATH/job-templates@<VERSION> inputs: # The version must currently be specified explicitly as an input, # to find the correctly associated images. # This can be removed @@ -124,7 +124,7 @@ and compose your own pipeline, for example, to just run the `fmt` job you can do ```yaml include: - - component: gitlab.com/components/opentofu/fmt@<VERSION> + - component: $CI_SERVER_FQDN/$CI_PROJECT_PATH/fmt@<VERSION> inputs: # The version must currently be specified explicitly as an input, # to find the correctly associated images. # This can be removed @@ -141,7 +141,7 @@ you want to extend the jobs: ```yaml include: - - component: gitlab.com/components/opentofu/job-templates@<VERSION> + - component: $CI_SERVER_FQDN/$CI_PROJECT_PATH/job-templates@<VERSION> inputs: # The version must currently be specified explicitly as an input, # to find the correctly associated images. # This can be removed @@ -218,7 +218,7 @@ the tools. For example to install `jq`: ```yaml include: - - component: gitlab.com/components/opentofu/validate-plan@<VERSION> + - component: $CI_SERVER_FQDN/$CI_PROJECT_PATH/validate-plan@<VERSION> inputs: version: <VERSION> opentofu_version: 1.6.1 @@ -250,10 +250,10 @@ and as the `version` input. Check out the [Usage](#Usage) section for examples. Each component release deploys the following images: -- `registry.gitlab.com/components/opentofu/gitlab-opentofu:<VERSION>-opentofu<OPENTOFU_VERSION>` -- `registry.gitlab.com/components/opentofu/gitlab-opentofu:<VERSION>-opentofu` +- `$CI_REGISTRY/$CI_PROJECT_PATH/gitlab-opentofu:<VERSION>-opentofu<OPENTOFU_VERSION>` +- `$CI_REGISTRY/$CI_PROJECT_PATH/gitlab-opentofu:<VERSION>-opentofu` - Includes the latest stable OpenTofu version at the time of releasing the component -- `registry.gitlab.com/components/opentofu/gitlab-opentofu:<VERSION>` +- `$CI_REGISTRY/$CI_PROJECT_PATH/gitlab-opentofu:<VERSION>` - Includes the latest stable OpenTofu version at the time of releasing the component In the above examples `<VERSION>` references the component version and `<OPENTOFU_VERSION>` @@ -278,7 +278,7 @@ and then use the component as you would from GitLab.com, but change the domain, ```yaml include: - - component: gitlab.example.com/components/opentofu/full-pipeline@<VERSION> + - component: $CI_SERVER_FQDN/$CI_PROJECT_PATH/full-pipeline@<VERSION> inputs: ... ``` diff --git a/backports/.Base.latest.gitlab-ci.yml b/backports/.Base.latest.gitlab-ci.yml index 2232cce9312f1458c483abe4e0cae712148b7b8d..162f2f3da1e5524f77f9a0f298fae36b865c8568 100644 --- a/backports/.Base.latest.gitlab-ci.yml +++ b/backports/.Base.latest.gitlab-ci.yml @@ -19,7 +19,7 @@ variables: # Compatible OpenTofu version, see https://gitlab.com/components/opentofu/-/releases OPENTOFU_VERSION: "1.6.0" # Job Image with `gitlab-tofu` - GITLAB_OPENTOFU_IMAGE_REGISTRY_BASE: $CI_REGISTRY/components/opentofu + GITLAB_OPENTOFU_IMAGE_REGISTRY_BASE: $CI_REGISTRY/$CI_PROJECT_PATH # The relative path to the root directory of the OpenTofu project TF_ROOT: ${CI_PROJECT_DIR} # The name of the state file used by the GitLab Managed Terraform state backend @@ -42,7 +42,7 @@ opentofu:use-component-instead-of-template: echo "To include the CI/CD component with a default configuration:" echo " " echo "include:" - echo " - component: gitlab.com/components/opentofu/full-pipeline@<VERSION>" + echo " - component: $CI_SERVER_FQDN/$CI_PROJECT_PATH/full-pipeline@<VERSION>" echo " inputs:" echo " version: <VERSION>" echo " opentofu_version: 1.6.0" diff --git a/backports/OpenTofu/Base.latest.gitlab-ci.yml b/backports/OpenTofu/Base.latest.gitlab-ci.yml index 16437e6c7b844d05b4188869f71ee5c2d8ece899..7c77480bc7d8c1d285791960bee1b887a7e93746 100644 --- a/backports/OpenTofu/Base.latest.gitlab-ci.yml +++ b/backports/OpenTofu/Base.latest.gitlab-ci.yml @@ -19,7 +19,7 @@ variables: # Compatible OpenTofu version, see https://gitlab.com/components/opentofu/-/releases OPENTOFU_VERSION: "1.6.0" # Job Image with `gitlab-tofu` - GITLAB_OPENTOFU_IMAGE_REGISTRY_BASE: $CI_REGISTRY/components/opentofu + GITLAB_OPENTOFU_IMAGE_REGISTRY_BASE: $CI_REGISTRY/$CI_PROJECT_PATH # The relative path to the root directory of the OpenTofu project TF_ROOT: ${CI_PROJECT_DIR} # The name of the state file used by the GitLab Managed Terraform state backend @@ -42,7 +42,7 @@ opentofu:use-component-instead-of-template: echo "To include the CI/CD component with a default configuration:" echo " " echo "include:" - echo " - component: gitlab.com/components/opentofu/full-pipeline@<VERSION>" + echo " - component: $CI_SERVER_FQDN/$CI_PROJECT_PATH/full-pipeline@<VERSION>" echo " inputs:" echo " version: <VERSION>" echo " opentofu_version: 1.6.0" diff --git a/tests/integration-tests/Defaults.gitlab-ci.yml b/tests/integration-tests/Defaults.gitlab-ci.yml index ad65d6aa2619e54e24e9cdaa5deddae3bdd8706e..572ee7d9565ae9a23af135686cad3a7846a58151 100644 --- a/tests/integration-tests/Defaults.gitlab-ci.yml +++ b/tests/integration-tests/Defaults.gitlab-ci.yml @@ -1,5 +1,5 @@ include: - - component: gitlab.com/$CI_PROJECT_PATH/full-pipeline@$CI_COMMIT_SHA + - component: $CI_SERVER_FQDN/$CI_PROJECT_PATH/full-pipeline@$CI_COMMIT_SHA inputs: image_registry_base: $GITLAB_OPENTOFU_IMAGE_BASE version: $CI_COMMIT_SHA diff --git a/tests/integration-tests/JobTemplates.gitlab-ci.yml b/tests/integration-tests/JobTemplates.gitlab-ci.yml index 7d2b47b6961409e050c2b0d3c764187bcd700ad9..b85fccd0555e23867b78c5902b8b69892f762b0d 100644 --- a/tests/integration-tests/JobTemplates.gitlab-ci.yml +++ b/tests/integration-tests/JobTemplates.gitlab-ci.yml @@ -1,5 +1,5 @@ include: - - component: gitlab.com/$CI_PROJECT_PATH/job-templates@$CI_COMMIT_SHA + - component: $CI_SERVER_FQDN/$CI_PROJECT_PATH/job-templates@$CI_COMMIT_SHA inputs: image_registry_base: $GITLAB_OPENTOFU_IMAGE_BASE version: $CI_COMMIT_SHA diff --git a/tests/integration-tests/TestJob.gitlab-ci.yml b/tests/integration-tests/TestJob.gitlab-ci.yml index 05b8144592a52fb379795bfbd86ae57aa0d93080..adf8da87f9d9cb09ea32a1725c42763335cce558 100644 --- a/tests/integration-tests/TestJob.gitlab-ci.yml +++ b/tests/integration-tests/TestJob.gitlab-ci.yml @@ -1,5 +1,5 @@ include: - - component: gitlab.com/$CI_PROJECT_PATH/test@$CI_COMMIT_SHA + - component: $CI_SERVER_FQDN/$CI_PROJECT_PATH/test@$CI_COMMIT_SHA inputs: image_registry_base: $GITLAB_OPENTOFU_IMAGE_BASE version: $CI_COMMIT_SHA