From 5e769f1e3f9e2ea62e28acacde993b53f51946b7 Mon Sep 17 00:00:00 2001 From: Alexandru Avadanii Date: Thu, 27 Feb 2020 18:12:27 +0100 Subject: [PATCH] ta: ISO upload path: drop "release-1", add arch Previously, TA ISO build used to push artifacts to Nexus repository in a subdirectory that included in its path the BUILD_ID (Jenkins job ID, e.g. [1]), but no further specifics like the artifact architecture. Since amd64 and arm64 build jobs are completely separate, the BUILD_ID for the two jobs are not correlated in any way, so the arm64 job (since it's newer) pushes artifacts to directories that were previously created by the amd64 job some time ago (e.g. #109 has amd64 artifacts from August 2019 and arm64 artifacts from February 2020). This change splits the output artifacts into arch-specific directories, while dropping the "release-1" subdir from the path, so: TA/images/release-1/images/{, latest} becomes: TA/images//{,latest} e.g. instead of [1] we will have [2] and [3]. [1] https://nexus.akraino.org/content/repositories/ \ images-snapshots/TA/release-1/images/123/ [2] https://nexus.akraino.org/content/repositories/ \ images-snapshots/TA/images/amd64/56/ [3] https://nexus.akraino.org/content/repositories/ \ images-snapshots/TA/images/arm64/45/ Change-Id: Ie3e189c1ab61bb9e395663c9882ee869929e0b76 Signed-off-by: Alexandru Avadanii --- jjb/shell/ta-iso-deploy.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/jjb/shell/ta-iso-deploy.sh b/jjb/shell/ta-iso-deploy.sh index 705ac3c..e40eeba 100644 --- a/jjb/shell/ta-iso-deploy.sh +++ b/jjb/shell/ta-iso-deploy.sh @@ -19,11 +19,11 @@ set -x # Trace commands for this script to make debugging easier. set +f # Ensure filename expansion (globbing) is enabled NEXUS_REPO=images-snapshots -release_path=TA/release-1 +release_path=TA/images/${JOB_NAME##*-} repo_dir="$WORKSPACE/work/nexus/$NEXUS_REPO" -upload_dir1="$repo_dir/$release_path/images/$BUILD_ID" -upload_dir2="$repo_dir/$release_path/images/latest" +upload_dir1="$repo_dir/$release_path/$BUILD_ID" +upload_dir2="$repo_dir/$release_path/latest" nexus_repo_url="$NEXUS_URL/content/repositories/$NEXUS_REPO" mkdir -p "$upload_dir1" @@ -43,6 +43,7 @@ cp "$WORKSPACE/work/results/images/"* "$upload_dir2" echo "-----> Upload ISOs to Nexus" lftools deploy nexus "$nexus_repo_url" "$repo_dir" +rm -rf "$repo_dir" set +x # Disable trace since we no longer need it. echo "ISOs location: $nexus_repo_url" -- 2.16.6