From cfbd6769e7130ac30d0cc03341618708f4a87cc4 Mon Sep 17 00:00:00 2001 From: Timo Furrer <tfurrer@gitlab.com> Date: Fri, 26 Jan 2024 14:10:46 +0100 Subject: [PATCH] Document usage on self-managed --- .gitlab/README.md.template | 21 +++++++++++++++++++++ README.md | 21 +++++++++++++++++++++ 2 files changed, 42 insertions(+) diff --git a/.gitlab/README.md.template b/.gitlab/README.md.template index d69eb2e..f60cdc0 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 5b174b4..1b3d6e6 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. -- GitLab