feat: Tools multi-version selector helpers#31
Merged
Conversation
539b7c1 to
f8c13b7
Compare
Member
Author
|
Long term @macedogm plan to get packages installable via |
1 task
Contributor
There was a problem hiding this comment.
Pull request overview
Adds “tool family” selectors to Rancher CI images so multiple versions of a tool (e.g., Helm v3/v4) can coexist and be switched at runtime via ci-select / select-<family> helpers, addressing #29.
Changes:
- Introduces selector infrastructure (manifest + active symlinks) and prepends
/var/ci-tools/activetoPATHfor images that include selectors. - Adds generator support for per-family and generic selector scripts, and records selectors in
images-lock.yaml+ changelog diffing. - Renames Helm v3 binary to
helmv3and makes Helm v4 the defaulthelmvia the selector.
Reviewed changes
Copilot reviewed 23 out of 23 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| internal/dockerfile/tmpl/selector_setup.tmpl | Adds template to create selector manifest + default active symlinks during image build. |
| internal/dockerfile/tmpl/dockerfile.tmpl | Wires selector setup into rendered Dockerfiles (PATH, COPY scripts, RUN setup). |
| internal/dockerfile/spec.go | Adds selector metadata to DockerfileVars and template-rendered setup command helper. |
| internal/dockerfile/generate.go | Generates ci-select.sh and per-family select-*.sh scripts; provides selector-family name listing. |
| internal/dockerfile/build.go | Collects selector families/defaults per image and passes them into Dockerfile rendering. |
| internal/config/validate.go | Validates family definitions and blocks alias names that would conflict with selectors. |
| internal/config/config.go | Extends tool schema with family + family_default; introduces ChecksumList type alias. |
| internal/cli/generate.go | Writes selector scripts to dockerfiles/scripts/ and cleans up stale selector scripts; extends images-lock structure. |
| internal/changelog/types.go | Extends lock/changelog types to include selectors and per-image selector default changes. |
| internal/changelog/diff_test.go | Adds tests for selector added/removed/default-changed diff behavior. |
| internal/changelog/diff.go | Computes selector diffs globally and selector-default changes per image. |
| internal/changelog/changelog.go | Renders selector additions/removals and per-image default changes in changelog entries. |
| images-lock.yaml | Records selector families and per-image family defaults; renames helm tool entry to helmv3. |
| dockerfiles/scripts/select-helm.sh | Adds helm-specific wrapper script invoking ci-select helm. |
| dockerfiles/scripts/ci-select.sh | Adds generic selector script to list/select tools by family using the manifest. |
| dockerfiles/Dockerfile.python3.13 | Applies selector PATH + scripts; renames helm v3 install to helmv3; sets up helm family selector. |
| dockerfiles/Dockerfile.python3.11 | Applies selector PATH + scripts; renames helm v3 install to helmv3; sets up helm family selector. |
| dockerfiles/Dockerfile.node24 | Applies selector PATH + scripts; renames helm v3 install to helmv3; sets up helm family selector. |
| dockerfiles/Dockerfile.node22 | Applies selector PATH + scripts; renames helm v3 install to helmv3; sets up helm family selector. |
| dockerfiles/Dockerfile.go1.26 | Applies selector PATH + scripts; renames helm v3 install to helmv3; updates helm_v3 alias; sets up selector. |
| dockerfiles/Dockerfile.go1.25 | Applies selector PATH + scripts; renames helm v3 install to helmv3; updates helm_v3 alias; sets up selector. |
| dockerfiles/Dockerfile.charts | Applies selector PATH + scripts; renames helm v3 install to helmv3; sets up helm family selector. |
| deps.yaml | Renames helm v3 tool to helmv3, defines helm family and default (helmv4), updates helm_v3 alias targets. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
macedogm
approved these changes
Apr 30, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Attempt to solve: #29
helmbinary (leaveshelm_v3alias used in some CIs for helm 3)/var/ci-tools/activeto PATH to ensure selected tools come firstDEMO:
Change helm with helm specific helper:
Or with core helper (which all tool-family specific ones use):