Skip to content

Automate operator release (bundle.yaml/cw-bundle.yaml) on tag builds - #106

Open
kk640244 wants to merge 1 commit into
kk640244-jenkins-build-outfrom
kk640244-automate-operator-release
Open

kk640244 wants to merge 1 commit into
kk640244-jenkins-build-outfrom
kk640244-automate-operator-release

Conversation

@kk640244

@kk640244 kk640244 commented Sep 9, 2026

Copy link
Copy Markdown

Context

Stacked on #105 - targets kk640244-jenkins-build-out, not main, since
this builds on that work. Will need rebasing once #105 merges.

Automates what was previously going to be a manual runbook step: producing
and publishing the operator's installable bundle.yaml/cw-bundle.yaml
for a tagged release, replacing the release.yaml GH Action
(on: push: tags: v*.*.*).

Untested against a live Jenkins run, same as #105.

What changed

Added a Create Release stage to the root Jenkinsfile, gated on
env.TAG_NAME (only runs for tag builds):

  1. make version -> generate-deployment generate-cw-deployment ->
    generate-deployment-bundle generate-cw-deployment-bundle - the exact
    same Makefile targets release.yaml used to run.
  2. Publishes idempotently: gh release create if no release exists yet for
    the tag, gh release upload --clobber if one already does - matches
    softprops/action-gh-release's old find-or-create behavior, so a re-run
    of this stage is safe.

IMAGE_TAG_BASE is overridden locally (BUNDLE_IMAGE_TAG_BASE) to
docker.io/caapim/layer7-operator for this stage's make version call
specifically - confirmed with the team this stays the default image
reference. This Jenkinsfile already defines IMAGE_TAG_BASE at the
pipeline level for a different purpose (the Artifactory image path prefix
used by Build and Push Image), so reusing it as-is here would have baked
the wrong image reference into the released bundle.yaml.

Also extended the Test Automation stage (previously PR-only) to also run
on tag builds, as a final release gate before Create Release runs -
agreed a release should get one fresh test pass rather than relying solely
on its commit's earlier PR-time result.

Needed before this actually fires (not a repo change)

  • Build L7Operator: enable "Discover tags" (pattern v*) in its GitHub
    Branch Source config - env.TAG_NAME is never populated without it.
  • Confirm gh CLI is available on the default-label agent (same category
    of unverified tool-availability assumption as ct in Relocate chart-publish pipeline off gh-pages, wire in PR-gated test automation #105 - flagging
    rather than assuming).
  • GITHUB_CAAPIM_TOKEN credential needs repo-scope release-create
    permission (already used elsewhere for this purpose, so likely fine, not
    independently reverified here).

…lds (Phase 2g)

Adds a tag-gated Create Release stage to the root Jenkinsfile, replacing
the release.yaml GH Action: `make version` -> generate-deployment(-cw) ->
generate-deployment(-cw)-bundle -> publish idempotently via `gh release
create`/`gh release upload --clobber` (find-or-create, matching
softprops/action-gh-release's old behavior so a re-run is safe).

Needs "Discover tags" (pattern v*) enabled on the Build L7Operator
multibranch job before env.TAG_NAME is ever populated - tracked in the
migration plan's Jenkins job config action items, not a repo change.

IMAGE_TAG_BASE is overridden locally to docker.io/caapim/layer7-operator
for this stage's `make version` call specifically - this Jenkinsfile
already defines IMAGE_TAG_BASE at the pipeline level for a different
purpose (the Artifactory image path prefix used by Build and Push Image
above), so reusing it as-is here would have baked the wrong image
reference into the released bundle.yaml.

Extended the Test Automation stage (previously PR-only) to also run on
tag builds, as a final release gate - a release should get one fresh
pass rather than relying solely on its commit's earlier PR-time result.
Create Release is placed after it, so a release is never published
without that stage having passed first for this exact tag.

Assumes `gh` CLI is available on the `default`-label agent (unverified,
same category of assumption as `ct`'s availability flagged in the Phase
2b commits - confirm on first real run).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@kk640244 kk640244 changed the title Automate operator release (bundle.yaml/cw-bundle.yaml) on tag builds (Phase 2g) Automate operator release (bundle.yaml/cw-bundle.yaml) on tag builds Sep 9, 2026
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