Skip to main content

Update the Plumber component copy

If your GitLab holds a copy of the Plumber CI/CD component, refresh it after each Plumber update so pipelines get the matching version. Pipelines that include the component from gitlab.com need nothing.

🧰 The script

scripts/component-update.sh, in the installation repository, works for any install (Docker Compose, Kubernetes, other). It copies every branch and tag of gitlab.com/getplumber/plumber into your project, runs the release pipeline on the latest tag and checks the version is in the catalog. Running it again when nothing is new changes nothing.

It needs:

  • a clone of the installation repository, curl and git
  • a GitLab token with the api scope from an Owner of the group (or an instance Admin), used for this run only
  • a runner on the project that can pull registry.gitlab.com/gitlab-org/release-cli

⚙️ Inputs

Each value comes from the environment, else from the option, else from a prompt. The token is never an option.

ValueEnvironmentOption
GitLab URLGITLAB_URL--gitlab-url URL
Component projectPLUMBER_COMPONENT_PROJECT--project GROUP/NAME
GitLab tokenPLUMBER_COMPONENT_TOKENprompt only

🚀 Run it

The script ends with Component published: gitlab.mydomain.com/my-group/plumber/plumber@<version>. If component_ref in Settings > Component is empty, pipelines pick up the new version on their next run; if it is pinned, move it.

🔧 Options

OptionEffect
--publish-onlySkip the copy, publish the latest tag already in the project
--timeout SECONDSWait for the release pipeline (default: 600)
--dry-runPrint the plan, touch nothing, no token needed

If no runner picks up the release pipeline in time, fix the runner and run again with --publish-only.

Info

The component’s job still pulls the getplumber/plumber image from Docker Hub. To use your own registry, set the image input of the component.