Repository navigation
feat: add minimal golang image to verify tag_ranges' json source - #3
Merged
Merged
Conversation
Adds _base/images/golang, the same deliberately trivial pattern as _base/images/node (FROM scratch, one ARG, one LABEL) but exercising the generic json source + JSONata transform instead of dockerhub, to cover both source types added by ContainerHive/ContainerHive#241: tag_ranges: - tag_name: "{{.full}}" source: type: json url: "https://go.dev/dl/?mode=json" transform: | $[stable = true].{ "version": $substring(version, 2) } select: major: { last: 1 } minor: { last: 1 } patch: { last: 1 } versions: golang: "{{.full}}" go.dev's feed strips to the last two stable releases by default (a tiny payload, unlike node's/nodejs.org's full history), and each entry's "version" field carries a "go" prefix that $substring(version, 2) removes - mirroring the issue's own "v" -> $substring(version, 1) example for Node.js. Verified locally against a tag_ranges-capable ch build: resolved to 1.27.1 (go.dev's current stable at the time) and GOLANG_VERSION=1.27.1 came out the other end of buildconfig_resolver, alongside node's own NODEJS_VERSION resolving independently and correctly in the same run. Regenerated both CI pipelines to add the resulting golang build/test/ manifest jobs. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
|
||||||||||||||
|
||||||||||||||
|
||||||||||||||||||
|
||||||||||||||||||||||||||
|
||||||||||||||
|
||||||||||||||||||||||
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.
Follow-up to #2 (merged) — adds a second
tag_rangesdemo image alongsidenode,this time exercising the generic
jsonsource + JSONata transform instead ofdockerhub, to cover both source types added byContainerHive/ContainerHive#251.
go.dev's feed only returns the last two stable releases (a tiny payload, unlikenode's/nodejs.org's full history), and each entry's
versionfield carries agoprefix that
$substring(version, 2)strips — mirroring the issue's ownv→$substring(version, 1)example for Node.js.Verified locally: resolved to
1.27.1(go.dev's current stable at the time) andGOLANG_VERSION=1.27.1came out the other end ofbuildconfig_resolver, alongsidenode's ownNODEJS_VERSIONresolving independently and correctly in the same run.🤖 Generated with Claude Code