From 5cbf2b11c01bcb7a7895a90c2daf096f17086577 Mon Sep 17 00:00:00 2001 From: Randy Bruno Piverger <21374229+Randy424@users.noreply.github.com> Date: Mon, 14 Sep 2026 12:08:38 -0700 Subject: [PATCH] ACM-42591: Give console CI a Go 1.26 toolchain alongside Node check, unit-tests-sonarcloud, and sonar-post-submit run make -f Makefile.prow check/unit-tests, which is about to start calling go test/build/golangci-lint once backend/ becomes a Go module. The current build_root (stolostron/builder:nodejs24-linux) has no Go toolchain, so those commands would fail with 'go: command not found' regardless of what lands in the console repo itself. Add a self-built console-ci-tools image (Node base + Go 1.26 layered on top) scoped only to this repo's own CI, and point the three Go-dependent tests at it instead of the implicit src build root. Does not touch the shared stolostron/builder:nodejs24-linux tag itself, so other repos/branches referencing that tag (including this repo's own release-5.0/backplane-5.0, already on a separate, non-fast-forwarded chain) are unaffected. Scoped to main, release-5.1, backplane-5.1, release-5.2, and backplane-5.2 -- the branches actually fed by main's fast-forward chain. release-5.0/backplane-5.0 intentionally untouched. Signed-off-by: Randy Bruno Piverger <21374229+Randy424@users.noreply.github.com> Co-Authored-By: Claude Sonnet 5 --- .../stolostron-console-backplane-5.1.yaml | 36 +++++++++++++++++-- .../stolostron-console-backplane-5.2.yaml | 36 +++++++++++++++++-- .../console/stolostron-console-main.yaml | 36 +++++++++++++++++-- .../stolostron-console-release-5.1.yaml | 36 +++++++++++++++++-- .../stolostron-console-release-5.2.yaml | 36 +++++++++++++++++-- 5 files changed, 165 insertions(+), 15 deletions(-) diff --git a/ci-operator/config/stolostron/console/stolostron-console-backplane-5.1.yaml b/ci-operator/config/stolostron/console/stolostron-console-backplane-5.1.yaml index b1b847a8a9941..9ff70a6461a3c 100644 --- a/ci-operator/config/stolostron/console/stolostron-console-backplane-5.1.yaml +++ b/ci-operator/config/stolostron/console/stolostron-console-backplane-5.1.yaml @@ -1,3 +1,8 @@ +base_images: + nodejs24-linux: + name: builder + namespace: stolostron + tag: nodejs24-linux binary_build_commands: make -f Makefile.prow install && make -f Makefile.prow build build_root: image_stream_tag: @@ -8,6 +13,31 @@ images: items: - dockerfile_path: Containerfile.mce to: console-mce + # Combined Node + Go image, scoped only to this repo's own CI. Does not touch + # the shared stolostron/builder:nodejs24-linux tag other repos/branches depend + # on (see ACM-42591). Layers the Go 1.26 toolchain on top of the existing + # Node build root so check/unit-tests-sonarcloud can run both npm and go + # commands in one job. + - dockerfile_literal: | + FROM nodejs24-linux + USER 0 + RUN curl -fsSL -o /tmp/go.tar.gz https://go.dev/dl/go1.26.0.linux-amd64.tar.gz && \ + tar -C /usr/local -xzf /tmp/go.tar.gz && \ + rm -f /tmp/go.tar.gz + ENV PATH="/usr/local/go/bin:${PATH}" + COPY src/ /go/src/github.com/stolostron/console/ + WORKDIR /go/src/github.com/stolostron/console + USER 1000 + from: nodejs24-linux + inputs: + src: + paths: + # NOTE: verify this matches ci-operator's actual source_path for this + # repo's "src" pipeline image before merging; written from the pattern + # used by ci-operator/config/stolostron/sippy but not yet run in CI. + - destination_dir: src + source_path: /go/src/github.com/stolostron/console/. + to: console-ci-tools promotion: to: - name: "5.1" @@ -26,7 +56,7 @@ tests: make -f Makefile.prow install make -f Makefile.prow check container: - from: src + from: console-ci-tools - as: unit-tests-sonarcloud commands: | export SELF="make -f Makefile.prow" @@ -35,7 +65,7 @@ tests: make -f Makefile.prow unit-tests make -f Makefile.prow sonar/js/prow container: - from: src + from: console-ci-tools secrets: - collection: ocm-secrets group: acm-sonarcloud-token-ci @@ -48,7 +78,7 @@ tests: make -f Makefile.prow unit-tests make -f Makefile.prow sonar/js/prow container: - from: src + from: console-ci-tools postsubmit: true secrets: - collection: ocm-secrets diff --git a/ci-operator/config/stolostron/console/stolostron-console-backplane-5.2.yaml b/ci-operator/config/stolostron/console/stolostron-console-backplane-5.2.yaml index 0f3910217c40b..2436d4d1f0d3f 100644 --- a/ci-operator/config/stolostron/console/stolostron-console-backplane-5.2.yaml +++ b/ci-operator/config/stolostron/console/stolostron-console-backplane-5.2.yaml @@ -1,3 +1,8 @@ +base_images: + nodejs24-linux: + name: builder + namespace: stolostron + tag: nodejs24-linux binary_build_commands: make -f Makefile.prow install && make -f Makefile.prow build build_root: image_stream_tag: @@ -8,6 +13,31 @@ images: items: - dockerfile_path: Containerfile.mce to: console-mce + # Combined Node + Go image, scoped only to this repo's own CI. Does not touch + # the shared stolostron/builder:nodejs24-linux tag other repos/branches depend + # on (see ACM-42591). Layers the Go 1.26 toolchain on top of the existing + # Node build root so check/unit-tests-sonarcloud can run both npm and go + # commands in one job. + - dockerfile_literal: | + FROM nodejs24-linux + USER 0 + RUN curl -fsSL -o /tmp/go.tar.gz https://go.dev/dl/go1.26.0.linux-amd64.tar.gz && \ + tar -C /usr/local -xzf /tmp/go.tar.gz && \ + rm -f /tmp/go.tar.gz + ENV PATH="/usr/local/go/bin:${PATH}" + COPY src/ /go/src/github.com/stolostron/console/ + WORKDIR /go/src/github.com/stolostron/console + USER 1000 + from: nodejs24-linux + inputs: + src: + paths: + # NOTE: verify this matches ci-operator's actual source_path for this + # repo's "src" pipeline image before merging; written from the pattern + # used by ci-operator/config/stolostron/sippy but not yet run in CI. + - destination_dir: src + source_path: /go/src/github.com/stolostron/console/. + to: console-ci-tools promotion: to: - name: "5.2" @@ -26,7 +56,7 @@ tests: make -f Makefile.prow install make -f Makefile.prow check container: - from: src + from: console-ci-tools - as: unit-tests-sonarcloud commands: | export SELF="make -f Makefile.prow" @@ -35,7 +65,7 @@ tests: make -f Makefile.prow unit-tests make -f Makefile.prow sonar/js/prow container: - from: src + from: console-ci-tools secrets: - collection: ocm-secrets group: acm-sonarcloud-token-ci @@ -48,7 +78,7 @@ tests: make -f Makefile.prow unit-tests make -f Makefile.prow sonar/js/prow container: - from: src + from: console-ci-tools postsubmit: true secrets: - collection: ocm-secrets diff --git a/ci-operator/config/stolostron/console/stolostron-console-main.yaml b/ci-operator/config/stolostron/console/stolostron-console-main.yaml index 9fb0897de4c37..76bb3f5331b41 100644 --- a/ci-operator/config/stolostron/console/stolostron-console-main.yaml +++ b/ci-operator/config/stolostron/console/stolostron-console-main.yaml @@ -1,3 +1,8 @@ +base_images: + nodejs24-linux: + name: builder + namespace: stolostron + tag: nodejs24-linux binary_build_commands: make -f Makefile.prow install && make -f Makefile.prow build build_root: image_stream_tag: @@ -10,6 +15,31 @@ images: to: console - dockerfile_path: Containerfile.mce to: console-mce + # Combined Node + Go image, scoped only to this repo's own CI. Does not touch + # the shared stolostron/builder:nodejs24-linux tag other repos/branches depend + # on (see ACM-42591). Layers the Go 1.26 toolchain on top of the existing + # Node build root so `check`/`unit-tests-sonarcloud` can run both npm and go + # commands in one job. + - dockerfile_literal: | + FROM nodejs24-linux + USER 0 + RUN curl -fsSL -o /tmp/go.tar.gz https://go.dev/dl/go1.26.0.linux-amd64.tar.gz && \ + tar -C /usr/local -xzf /tmp/go.tar.gz && \ + rm -f /tmp/go.tar.gz + ENV PATH="/usr/local/go/bin:${PATH}" + COPY src/ /go/src/github.com/stolostron/console/ + WORKDIR /go/src/github.com/stolostron/console + USER 1000 + from: nodejs24-linux + inputs: + src: + paths: + # NOTE: verify this matches ci-operator's actual source_path for this + # repo's "src" pipeline image before merging; written from the pattern + # used by ci-operator/config/stolostron/sippy but not yet run in CI. + - destination_dir: src + source_path: /go/src/github.com/stolostron/console/. + to: console-ci-tools prowgen: enable_secrets_store_csi_driver: true resources: @@ -24,7 +54,7 @@ tests: make -f Makefile.prow install make -f Makefile.prow check container: - from: src + from: console-ci-tools - as: unit-tests-sonarcloud commands: | export SELF="make -f Makefile.prow" @@ -33,7 +63,7 @@ tests: make -f Makefile.prow unit-tests make -f Makefile.prow sonar/js/prow container: - from: src + from: console-ci-tools secrets: - collection: ocm-secrets group: acm-sonarcloud-token-ci @@ -60,7 +90,7 @@ tests: make -f Makefile.prow unit-tests make -f Makefile.prow sonar/js/prow container: - from: src + from: console-ci-tools postsubmit: true secrets: - collection: ocm-secrets diff --git a/ci-operator/config/stolostron/console/stolostron-console-release-5.1.yaml b/ci-operator/config/stolostron/console/stolostron-console-release-5.1.yaml index d330c21ab5995..a026f2b60c8b8 100644 --- a/ci-operator/config/stolostron/console/stolostron-console-release-5.1.yaml +++ b/ci-operator/config/stolostron/console/stolostron-console-release-5.1.yaml @@ -1,3 +1,8 @@ +base_images: + nodejs24-linux: + name: builder + namespace: stolostron + tag: nodejs24-linux binary_build_commands: make -f Makefile.prow install && make -f Makefile.prow build build_root: image_stream_tag: @@ -10,6 +15,31 @@ images: to: console - dockerfile_path: Containerfile.mce to: console-mce + # Combined Node + Go image, scoped only to this repo's own CI. Does not touch + # the shared stolostron/builder:nodejs24-linux tag other repos/branches depend + # on (see ACM-42591). Layers the Go 1.26 toolchain on top of the existing + # Node build root so check/unit-tests-sonarcloud can run both npm and go + # commands in one job. + - dockerfile_literal: | + FROM nodejs24-linux + USER 0 + RUN curl -fsSL -o /tmp/go.tar.gz https://go.dev/dl/go1.26.0.linux-amd64.tar.gz && \ + tar -C /usr/local -xzf /tmp/go.tar.gz && \ + rm -f /tmp/go.tar.gz + ENV PATH="/usr/local/go/bin:${PATH}" + COPY src/ /go/src/github.com/stolostron/console/ + WORKDIR /go/src/github.com/stolostron/console + USER 1000 + from: nodejs24-linux + inputs: + src: + paths: + # NOTE: verify this matches ci-operator's actual source_path for this + # repo's "src" pipeline image before merging; written from the pattern + # used by ci-operator/config/stolostron/sippy but not yet run in CI. + - destination_dir: src + source_path: /go/src/github.com/stolostron/console/. + to: console-ci-tools promotion: to: - excluded_images: @@ -30,7 +60,7 @@ tests: make -f Makefile.prow install make -f Makefile.prow check container: - from: src + from: console-ci-tools - as: unit-tests-sonarcloud commands: | export SELF="make -f Makefile.prow" @@ -39,7 +69,7 @@ tests: make -f Makefile.prow unit-tests make -f Makefile.prow sonar/js/prow container: - from: src + from: console-ci-tools secrets: - collection: ocm-secrets group: acm-sonarcloud-token-ci @@ -52,7 +82,7 @@ tests: make -f Makefile.prow unit-tests make -f Makefile.prow sonar/js/prow container: - from: src + from: console-ci-tools postsubmit: true secrets: - collection: ocm-secrets diff --git a/ci-operator/config/stolostron/console/stolostron-console-release-5.2.yaml b/ci-operator/config/stolostron/console/stolostron-console-release-5.2.yaml index 154da497b92f5..2d6af17ee7363 100644 --- a/ci-operator/config/stolostron/console/stolostron-console-release-5.2.yaml +++ b/ci-operator/config/stolostron/console/stolostron-console-release-5.2.yaml @@ -1,3 +1,8 @@ +base_images: + nodejs24-linux: + name: builder + namespace: stolostron + tag: nodejs24-linux binary_build_commands: make -f Makefile.prow install && make -f Makefile.prow build build_root: image_stream_tag: @@ -10,6 +15,31 @@ images: to: console - dockerfile_path: Containerfile.mce to: console-mce + # Combined Node + Go image, scoped only to this repo's own CI. Does not touch + # the shared stolostron/builder:nodejs24-linux tag other repos/branches depend + # on (see ACM-42591). Layers the Go 1.26 toolchain on top of the existing + # Node build root so check/unit-tests-sonarcloud can run both npm and go + # commands in one job. + - dockerfile_literal: | + FROM nodejs24-linux + USER 0 + RUN curl -fsSL -o /tmp/go.tar.gz https://go.dev/dl/go1.26.0.linux-amd64.tar.gz && \ + tar -C /usr/local -xzf /tmp/go.tar.gz && \ + rm -f /tmp/go.tar.gz + ENV PATH="/usr/local/go/bin:${PATH}" + COPY src/ /go/src/github.com/stolostron/console/ + WORKDIR /go/src/github.com/stolostron/console + USER 1000 + from: nodejs24-linux + inputs: + src: + paths: + # NOTE: verify this matches ci-operator's actual source_path for this + # repo's "src" pipeline image before merging; written from the pattern + # used by ci-operator/config/stolostron/sippy but not yet run in CI. + - destination_dir: src + source_path: /go/src/github.com/stolostron/console/. + to: console-ci-tools promotion: to: - excluded_images: @@ -30,7 +60,7 @@ tests: make -f Makefile.prow install make -f Makefile.prow check container: - from: src + from: console-ci-tools - as: unit-tests-sonarcloud commands: | export SELF="make -f Makefile.prow" @@ -39,7 +69,7 @@ tests: make -f Makefile.prow unit-tests make -f Makefile.prow sonar/js/prow container: - from: src + from: console-ci-tools secrets: - collection: ocm-secrets group: acm-sonarcloud-token-ci @@ -52,7 +82,7 @@ tests: make -f Makefile.prow unit-tests make -f Makefile.prow sonar/js/prow container: - from: src + from: console-ci-tools postsubmit: true secrets: - collection: ocm-secrets