Skip to content

feat: add minimal golang image to verify tag_ranges' json source - #3

Merged
timo-reymann merged 1 commit into
mainfrom
feat/tag-ranges-demo
Sep 9, 2026
Merged

timo-reymann merged 1 commit into
mainfrom
feat/tag-ranges-demo

Conversation

@timo-reymann

Copy link
Copy Markdown
Member

Follow-up to #2 (merged) — adds a second tag_ranges demo image alongside node,
this time exercising the generic json source + JSONata transform instead of
dockerhub, to cover both source types added by
ContainerHive/ContainerHive#251.

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 only returns the last two stable releases (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) strips — mirroring the issue's own v →
$substring(version, 1) example for Node.js.

Verified locally: 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.

🤖 Generated with Claude Code

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>
@github-actions

github-actions Bot commented Sep 9, 2026

Copy link
Copy Markdown
TestsPassed ❌️SkippedFailed
Container Structure Tests - node0 ran0 passed0 skipped0 failed
TestResult
No test annotations available

@github-actions

github-actions Bot commented Sep 9, 2026

Copy link
Copy Markdown
TestsPassed ❌️SkippedFailed
Container Structure Tests - golang0 ran0 passed0 skipped0 failed
TestResult
No test annotations available

@github-actions

github-actions Bot commented Sep 9, 2026

Copy link
Copy Markdown
TestsPassed ✅SkippedFailed
Container Structure Tests - base-deployment2 ran2 passed0 skipped0 failed
TestResult
Container Structure Tests - base-deployment
File Existence Test: ca-certificates-exist✅ passed
File Existence Test: ca-certificates-exist✅ passed

@github-actions

github-actions Bot commented Sep 9, 2026

Copy link
Copy Markdown
TestsPassed ✅SkippedFailed
Container Structure Tests - base-ci6 ran6 passed0 skipped0 failed
TestResult
Container Structure Tests - base-ci
Command Test: curl-installed✅ passed
Command Test: git-installed✅ passed
File Existence Test: ca-certificates-exist✅ passed
Command Test: curl-installed✅ passed
Command Test: git-installed✅ passed
File Existence Test: ca-certificates-exist✅ passed

@timo-reymann
timo-reymann merged commit 456e4cb into main Sep 9, 2026
22 checks passed
@github-actions

github-actions Bot commented Sep 9, 2026

Copy link
Copy Markdown
TestsPassed ❌️SkippedFailed
Container Structure Tests - dotnet-runtime0 ran0 passed0 skipped0 failed
TestResult
No test annotations available

@github-actions

github-actions Bot commented Sep 9, 2026

Copy link
Copy Markdown
TestsPassed ✅SkippedFailed
Container Structure Tests - go-ci4 ran4 passed0 skipped0 failed
TestResult
Container Structure Tests - go-ci
Command Test: zig-installed✅ passed
Command Test: zig-installed✅ passed
Command Test: zig-installed✅ passed
Command Test: zig-installed✅ passed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant