diff --git a/.gitlab/README.md.template b/.gitlab/README.md.template index d69eb2eacef35159a80b88738653749925ae3368..f60cdc09568fb8af45f9d0194b49fdc3954ff537 100644 --- a/.gitlab/README.md.template +++ b/.gitlab/README.md.template @@ -149,6 +149,27 @@ However, we cannot use the alternative `+` which would indicate build metadata as we'd like. See https://github.com/distribution/distribution/issues/1201* +## Usage on self-managed + +GitLab CI/CD components are not yet distributed and available on self-managed GitLab instances. +(see details [here](https://gitlab.com/gitlab-org/gitlab/-/issues/415638)). +It's also not possible to just include CI/CD components across instance, thus an include like +`- component: gitlab.com/components/opentofu/full-pipeline@~latest` won't work from a +self-managed instance. +However, you could mirror this project from GitLab.com onto any self-managed instance using +a [repository pull mirror](https://docs.gitlab.com/ee/user/project/repository/mirror/pull.html). +and then use the component as you would from GitLab.com, but change the domain, like so: + +```yaml +include: + - component: gitlab.example.com/components/opentofu/full-pipeline@~latest + inputs: + ... +``` + +This example assumes your GitLab instance is hosted on `gitlab.example.com` and this component +project is mirrored in the `components/opentofu` project. + ## Contributing See the [CONTRIBUTING.md](CONTRIBUTING.md) guide. diff --git a/README.md b/README.md index 5b174b43070205d2e516538cb004e7811959102b..1b3d6e691be5f50e678d30f7cd16db0b55c3a4d0 100644 --- a/README.md +++ b/README.md @@ -168,6 +168,27 @@ However, we cannot use the alternative `+` which would indicate build metadata as we'd like. See https://github.com/distribution/distribution/issues/1201* +## Usage on self-managed + +GitLab CI/CD components are not yet distributed and available on self-managed GitLab instances. +(see details [here](https://gitlab.com/gitlab-org/gitlab/-/issues/415638)). +It's also not possible to just include CI/CD components across instance, thus an include like +`- component: gitlab.com/components/opentofu/full-pipeline@~latest` won't work from a +self-managed instance. +However, you could mirror this project from GitLab.com onto any self-managed instance using +a [repository pull mirror](https://docs.gitlab.com/ee/user/project/repository/mirror/pull.html). +and then use the component as you would from GitLab.com, but change the domain, like so: + +```yaml +include: + - component: gitlab.example.com/components/opentofu/full-pipeline@~latest + inputs: + ... +``` + +This example assumes your GitLab instance is hosted on `gitlab.example.com` and this component +project is mirrored in the `components/opentofu` project. + ## Contributing See the [CONTRIBUTING.md](CONTRIBUTING.md) guide.