Skip to content

Commit edbdcd2

Browse files
IONOS(ci): nest JFrog artifact path by NC_VERSION and short SHA
Branch uploads (ionos-dev / ionos-stable / rc/* / */dev/*) now write to '<stage>/hidrive-next-<NC_VERSION>/<shortSha>/hidrive-next-<NC_VERSION>.zip' instead of overwriting a single '<stage>/hidrive-next-<NC_VERSION>.zip' slot. The nested layout preserves every build by sha and lets us debug a regression against the exact artifact a given commit produced. PR uploads are unchanged: 'dev/pr/hidrive-next-pr-<number>.zip' is still the per-PR canonical path, since PRs benefit from "overwrite the latest on the open PR" semantics. ⚠️ Downstream consumer impact: - trigger-remote-dev-workflow passes ARTIFACTORY_LAST_BUILD_PATH as a literal full path to the GitLab pipeline, so GitLab consumers that re-derive the path from a glob (`dev/hidrive-next-*.zip`) will break. Coordinate with the GitLab pipeline maintainer before merging this commit — or revert if a "latest" symlink is needed. - The Artifactory cleanup policy may need adjustment: per-sha retention will grow the repo over time. The previous flat layout retained one slot per branch. Aligns with the sister ncw-server build-artifact workflow.
1 parent ac072ae commit edbdcd2

1 file changed

Lines changed: 16 additions & 10 deletions

File tree

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

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -741,13 +741,13 @@ jobs:
741741
id: artifactory_upload
742742
run: |
743743
# Artifactory Build Storage Structure:
744-
# | Branch/Event | Stage Prefix | Artifact Path |
745-
# |------------------|---------------------|----------------------------------------------------------------|
746-
# | Pull Request | dev | dev/pr/hidrive-next-pr-<number>.zip |
747-
# | ionos-dev | dev | dev/hidrive-next-<ncVersion>.zip |
748-
# | ionos-stable | stable | stable/hidrive-next-<ncVersion>.zip |
749-
# | rc/* | <ref-name> | rc/<branch>/hidrive-next-<ncVersion>.zip |
750-
# | */dev/* | dev-<branch-prefix> | dev-<prefix>/hidrive-next-<ncVersion>.zip |
744+
# | Branch/Event | Stage Prefix | Artifact Path |
745+
# |------------------|---------------------|------------------------------------------------------------------------------------|
746+
# | Pull Request | dev | dev/pr/hidrive-next-pr-<number>.zip |
747+
# | ionos-dev | dev | dev/hidrive-next-<ncVersion>/<shortSha>/hidrive-next-<ncVersion>.zip |
748+
# | ionos-stable | stable | stable/hidrive-next-<ncVersion>/<shortSha>/hidrive-next-<ncVersion>.zip |
749+
# | rc/* | <ref-name> | rc/<branch>/hidrive-next-<ncVersion>/<shortSha>/hidrive-next-<ncVersion>.zip |
750+
# | */dev/* | dev-<branch-prefix> | dev-<prefix>/hidrive-next-<ncVersion>/<shortSha>/hidrive-next-<ncVersion>.zip |
751751
752752
ARTIFACTORY_STAGE_PREFIX="dev"
753753
@@ -761,10 +761,16 @@ jobs:
761761
fi
762762
763763
export PATH_TO_DIRECTORY="${{ env.ARTIFACTORY_REPOSITORY_SNAPSHOT }}/${ARTIFACTORY_STAGE_PREFIX}"
764-
PATH_TO_FILE="pr/hidrive-next-pr-${{ github.event.pull_request.number }}.zip"
765764
766-
if [ -z "${{ github.event.pull_request.number }}" ]; then
767-
PATH_TO_FILE="hidrive-next-${{ needs.hidrive-next-build.outputs.NC_VERSION }}.zip"
765+
# PR uploads keep the flat layout (one slot per PR number);
766+
# branch uploads nest under <ncVersion>/<shortSha>/ to preserve every build
767+
if [ -n "${{ github.event.pull_request.number }}" ]; then
768+
PATH_TO_FILE="pr/hidrive-next-pr-${{ github.event.pull_request.number }}.zip"
769+
else
770+
SHORT_SHA="${{ github.sha }}"
771+
SHORT_SHA="${SHORT_SHA:0:7}"
772+
NC_VERSION="${{ needs.hidrive-next-build.outputs.NC_VERSION }}"
773+
PATH_TO_FILE="hidrive-next-${NC_VERSION}/${SHORT_SHA}/hidrive-next-${NC_VERSION}.zip"
768774
fi
769775
770776
export PATH_TO_LATEST_ARTIFACT="${PATH_TO_DIRECTORY}/${PATH_TO_FILE}"

0 commit comments

Comments
 (0)