Skip to content

Commit 658c921

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 b3474bf commit 658c921

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
@@ -740,13 +740,13 @@ jobs:
740740
id: artifactory_upload
741741
run: |
742742
# Artifactory Build Storage Structure:
743-
# | Branch/Event | Stage Prefix | Artifact Path |
744-
# |------------------|---------------------|----------------------------------------------------------------|
745-
# | Pull Request | dev | dev/pr/hidrive-next-pr-<number>.zip |
746-
# | ionos-dev | dev | dev/hidrive-next-<ncVersion>.zip |
747-
# | ionos-stable | stable | stable/hidrive-next-<ncVersion>.zip |
748-
# | rc/* | <ref-name> | rc/<branch>/hidrive-next-<ncVersion>.zip |
749-
# | */dev/* | dev-<branch-prefix> | dev-<prefix>/hidrive-next-<ncVersion>.zip |
743+
# | Branch/Event | Stage Prefix | Artifact Path |
744+
# |------------------|---------------------|------------------------------------------------------------------------------------|
745+
# | Pull Request | dev | dev/pr/hidrive-next-pr-<number>.zip |
746+
# | ionos-dev | dev | dev/hidrive-next-<ncVersion>/<shortSha>/hidrive-next-<ncVersion>.zip |
747+
# | ionos-stable | stable | stable/hidrive-next-<ncVersion>/<shortSha>/hidrive-next-<ncVersion>.zip |
748+
# | rc/* | <ref-name> | rc/<branch>/hidrive-next-<ncVersion>/<shortSha>/hidrive-next-<ncVersion>.zip |
749+
# | */dev/* | dev-<branch-prefix> | dev-<prefix>/hidrive-next-<ncVersion>/<shortSha>/hidrive-next-<ncVersion>.zip |
750750
751751
ARTIFACTORY_STAGE_PREFIX="dev"
752752
@@ -760,10 +760,16 @@ jobs:
760760
fi
761761
762762
export PATH_TO_DIRECTORY="${{ env.ARTIFACTORY_REPOSITORY_SNAPSHOT }}/${ARTIFACTORY_STAGE_PREFIX}"
763-
PATH_TO_FILE="pr/hidrive-next-pr-${{ github.event.pull_request.number }}.zip"
764763
765-
if [ -z "${{ github.event.pull_request.number }}" ]; then
766-
PATH_TO_FILE="hidrive-next-${{ needs.hidrive-next-build.outputs.NC_VERSION }}.zip"
764+
# PR uploads keep the flat layout (one slot per PR number);
765+
# branch uploads nest under <ncVersion>/<shortSha>/ to preserve every build
766+
if [ -n "${{ github.event.pull_request.number }}" ]; then
767+
PATH_TO_FILE="pr/hidrive-next-pr-${{ github.event.pull_request.number }}.zip"
768+
else
769+
SHORT_SHA="${{ github.sha }}"
770+
SHORT_SHA="${SHORT_SHA:0:7}"
771+
NC_VERSION="${{ needs.hidrive-next-build.outputs.NC_VERSION }}"
772+
PATH_TO_FILE="hidrive-next-${NC_VERSION}/${SHORT_SHA}/hidrive-next-${NC_VERSION}.zip"
767773
fi
768774
769775
export PATH_TO_LATEST_ARTIFACT="${PATH_TO_DIRECTORY}/${PATH_TO_FILE}"

0 commit comments

Comments
 (0)