Skip to content

IONOS(ci): trigger artifactory/ghcr.io/remote-trigger jobs on per-major dev/stable branches - #322

Merged
printminion-co merged 1 commit into
ionos-dev-v33from
agents/trigger-artifactory-push-workflow
Aug 24, 2026
Merged

IONOS(ci): trigger artifactory/ghcr.io/remote-trigger jobs on per-major dev/stable branches#322
printminion-co merged 1 commit into
ionos-dev-v33from
agents/trigger-artifactory-push-workflow

Conversation

@printminion-co

Copy link
Copy Markdown

Summary

  • ionos-dev-v33 (and all ionos-dev-v*/ionos-stable-v* per-major branches) already trigger the workflow via on.push.branches, but three downstream job-level if: conditions still only matched the bare ionos-dev/ionos-stable names — so upload-to-artifactory, hidirve-next-artifact-to-ghcr_io, and trigger-remote-dev-workflow were silently skipped (confirmed on run 32494139570).
  • Ports the fix already present on ionos-dev-v30/ionos-dev-v31 (lost when v32/v33 were rewritten with the matrix-cache pipeline), adapted to this file's generic glob style:
    • Both artifact-push jobs now also match startsWith(ref_name, 'ionos-dev-'/'ionos-stable-').
    • ARTIFACTORY_STAGE_PREFIX/BUILD_TYPE shell mappings now glob-match ionos-stable* instead of the exact string.
    • trigger-remote-dev-workflow now also matches ionos-dev-v*/ionos-stable-v*, gated by an opt-in REMOTE_TRIGGER_NC_VERSION/REMOTE_TRIGGER_RC_BRANCH whitelist (mirroring v31) so QA deployment can later be restricted to one NC major/RC at a time. Both vars are currently unset repo-wide, so this gate is a no-op today. Bare ionos-dev/ionos-stable are always exempt.
    • The informational "Check configuration" diagnostic step is updated to match.
  • No changes to ionos-dev, ionos-stable, ionos-dev-v30, ionos-dev-v31 behavior.
  • A companion PR applies the identical fix to ionos-dev-v32.

Test plan

  • YAML validated with python3 -c "import yaml; yaml.safe_load(...)".
  • After merge, push to ionos-dev-v33 and confirm Push to artifactory, Push artifact to ghcr.io, and Trigger remote workflow all run (or skip only for pre-existing reasons, never a branch-name mismatch).
  • Confirm ionos-dev/ionos-stable/rc/*/*/dev/* behavior is unchanged.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the HiDrive Next workflow to support per-major IONOS branches for artifact publishing and controlled remote triggers.

Changes:

  • Enables artifact uploads for ionos-dev-v* and ionos-stable-v*.
  • Adds configurable NC-version and RC-branch trigger gates.
  • Updates stable mappings and diagnostic checks.
Suppressed comments (3)

.github/workflows/hidrive-next-build.yml:994

  • The suffix check is applied to every non-*/dev/* branch, including rc/*. With REMOTE_TRIGGER_NC_VERSION=v33, an RC branch such as rc/web-v33 passes this condition even when it differs from REMOTE_TRIGGER_RC_BRANCH, defeating the documented exact-RC whitelist. Restrict the suffix alternative to ionos-dev-v*/ionos-stable-v* (or compare those branch names exactly), leaving RC branches to the exact whitelist check.
       endsWith(github.ref_name, vars.REMOTE_TRIGGER_NC_VERSION) ||
       github.ref_name == vars.REMOTE_TRIGGER_RC_BRANCH)

.github/workflows/hidrive-next-build.yml:817

  • workflow_dispatch is allowed independently of the branch name, so a manual run from a branch such as ionos-stable-hotfix reaches this mapping. The broad ionos-stable* match then publishes that branch under the stable Artifactory prefix, although the accepted stable lanes elsewhere are only ionos-stable and ionos-stable-v*; this can contaminate the stable artifact namespace. Match the bare lane and the -v* lanes explicitly.
          elif [[ "${{ github.ref_name }}" == ionos-stable* ]]; then

.github/workflows/hidrive-next-build.yml:725

  • The upload job's header comment immediately above still lists only the bare ionos-dev/ionos-stable lanes, rc/*, and */dev/*, but this new condition also runs for ionos-dev-v* and ionos-stable-v*. Update the comment so the documented upload behavior matches the condition.
       startsWith(github.ref_name, 'ionos-dev-') || startsWith(github.ref_name, 'ionos-stable-') ||

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread .github/workflows/hidrive-next-build.yml Outdated

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.

Suppressed comments (2)

.github/workflows/hidrive-next-build.yml:215

  • The configuration diagnostic has the same ordering problem: an empty NC variable exits this gate before REMOTE_TRIGGER_RC_BRANCH is checked, so it reports that every RC branch will trigger even when an RC whitelist is configured. Keep the diagnostic split by branch class and mirror the job-level NC/RC checks.
              elif [ -z "$NC_VERSION" ]; then
                echo "- ✅ Version gate: not set — all versions allowed" >> $GITHUB_STEP_SUMMARY
                echo "   ✅ Version gate: not set — all versions allowed"
              elif [[ "$BRANCH" == ionos-dev-v* || "$BRANCH" == ionos-stable-v* ]] && [[ "$BRANCH" == *"$NC_VERSION" ]]; then

.github/workflows/hidrive-next-build.yml:999

  • When REMOTE_TRIGGER_NC_VERSION is empty but REMOTE_TRIGGER_RC_BRANCH is set, this disjunct is true for every branch, so REMOTE_TRIGGER_RC_BRANCH cannot whitelist a single rc/* branch. Evaluate the NC variable only for ionos-*-v* branches and give rc/* its own empty-or-exact RC whitelist check.
       vars.REMOTE_TRIGGER_NC_VERSION == '' ||
       ((startsWith(github.ref_name, 'ionos-dev-v') || startsWith(github.ref_name, 'ionos-stable-v')) &&
        endsWith(github.ref_name, vars.REMOTE_TRIGGER_NC_VERSION)) ||
       github.ref_name == vars.REMOTE_TRIGGER_RC_BRANCH)

…or dev/stable branches

The 'upload-to-artifactory', 'hidirve-next-artifact-to-ghcr_io', and
'trigger-remote-dev-workflow' jobs were being silently skipped on
ionos-dev-v33/ionos-stable-v33 pushes: on.push.branches already covers
these branches (HDNEXT-2144), so the build itself runs, but the
downstream jobs' if: conditions were never updated to match — they only
checked for the bare 'ionos-dev'/'ionos-stable' names, 'rc/*', and
'*/dev/*'.

Port the mature whitelist-gate pattern from ionos-dev-v31: broad
startsWith branch matching for the artifact jobs, plus an opt-in
REMOTE_TRIGGER_NC_VERSION/REMOTE_TRIGGER_RC_BRANCH gate on the
GitLab-trigger job so QA deployment can later be restricted to one NC
major/RC at a time (both variables are currently unset repo-wide, so this
gate is a no-op today).

Scope the NC-version suffix check to ionos-dev-v*/ionos-stable-v*
branches only: it was otherwise evaluated for any branch reaching that
point, including rc/*, so an rc/* branch whose name happened to end with
the whitelisted NC version string would incorrectly pass the gate and
bypass the intended exact REMOTE_TRIGGER_RC_BRANCH whitelist match.

Signed-off-by: Misha M.-Kupriyanov <kupriyanov@strato.de>
@printminion-co
printminion-co force-pushed the agents/trigger-artifactory-push-workflow branch from e789c25 to bd3db78 Compare August 24, 2026 14:44
@printminion-co
printminion-co requested a lite review from Copilot August 24, 2026 14:46

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.

Suppressed comments (1)

.github/workflows/hidrive-next-build.yml:215

  • [[ ... == *"$NC_VERSION" ]] tests only a suffix, so a whitelist of v33 also accepts a valid-looking branch such as ionos-dev-v133 or ionos-stable-v133. This defeats the one-major gate; compare the branch to the exact ionos-{dev,stable}-$NC_VERSION forms (or otherwise enforce a delimiter).
              elif [[ "$BRANCH" == ionos-dev-v* || "$BRANCH" == ionos-stable-v* ]] && [[ "$BRANCH" == *"$NC_VERSION" ]]; then

if [ "$BRANCH" == "ionos-dev" ] || [ "$BRANCH" == "ionos-stable" ]; then
echo "- ✅ Version gate: '$BRANCH' is always exempt" >> $GITHUB_STEP_SUMMARY
echo " ✅ Version gate: '$BRANCH' is always exempt"
elif [ -z "$NC_VERSION" ]; then
@printminion-co
printminion-co merged commit 060ec20 into ionos-dev-v33 Aug 24, 2026
10 of 12 checks passed
@printminion-co
printminion-co deleted the agents/trigger-artifactory-push-workflow branch August 24, 2026 14:57
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.

2 participants