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,
curlandgit - a GitLab token with the
apiscope 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.
| Value | Environment | Option |
|---|---|---|
| GitLab URL | GITLAB_URL | --gitlab-url URL |
| Component project | PLUMBER_COMPONENT_PROJECT | --project GROUP/NAME |
| GitLab token | PLUMBER_COMPONENT_TOKEN | prompt only |
🚀 Run it
With the Platform update, reading GITLAB_URL and PLUMBER_COMPONENT_PROJECT from .env:
./scripts/update.sh --componentAlone (the script does not read .env):
./scripts/component-update.sh --project my-group/plumberFrom any machine that reaches your GitLab:
git clone https://github.com/getplumber/plumber-platform.git plumber-platformcd plumber-platform./scripts/component-update.sh --gitlab-url https://gitlab.mydomain.com --project my-group/plumberRun git pull before each run.
Export the three values; a missing one is an error, not a hang:
export GITLAB_URL="https://gitlab.mydomain.com"export PLUMBER_COMPONENT_PROJECT="my-group/plumber"export PLUMBER_COMPONENT_TOKEN="<owner token>"./scripts/component-update.shThe 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
| Option | Effect |
|---|---|
--publish-only | Skip the copy, publish the latest tag already in the project |
--timeout SECONDS | Wait for the release pipeline (default: 600) |
--dry-run | Print 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.