From 0d488bcfeecf1eb985fc2ac37015a8cf6d8f7ff2 Mon Sep 17 00:00:00 2001 From: Alexey Rivkin Date: Wed, 15 Feb 2023 15:08:10 +0200 Subject: [PATCH] AZP/RELEASE: Rename and publish all DEBs --- buildlib/az-distro-release.yml | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/buildlib/az-distro-release.yml b/buildlib/az-distro-release.yml index 0e2d88d25ca..ebbe1a15e80 100644 --- a/buildlib/az-distro-release.yml +++ b/buildlib/az-distro-release.yml @@ -5,7 +5,7 @@ jobs: ${{ if eq(variables['Build.Reason'], 'ResourceTrigger') }}: POSTFIX: ucx-${{ replace(variables['Build.SourceBranch'], 'refs/heads/', '') }} ${{ if eq(variables['Build.Reason'], 'IndividualCI') }}: - POSTFIX: ucx-${{ replace(variables['Build.SourceBranch'], 'refs/tags/', '') }} + POSTFIX: ucx-${{ replace(variables['Build.SourceBranch'], 'refs/tags/v', '') }} ${{ if eq(variables['Build.Reason'], 'PullRequest') }}: POSTFIX: ucx-pr$(System.PullRequest.PullRequestNumber) @@ -24,16 +24,16 @@ jobs: artifact_name: $(POSTFIX)-centos8-mofed5-cuda11.tar.bz2 ubuntu16_cuda11: build_container: ubuntu16_cuda11 - artifact_name: $(POSTFIX)-ubuntu16.04-mofed5-cuda11.deb + artifact_name: $(POSTFIX)-ubuntu16.04-mofed5-cuda11.tar.bz2 ubuntu18_cuda11: build_container: ubuntu18_cuda11 - artifact_name: $(POSTFIX)-ubuntu18.04-mofed5-cuda11.deb + artifact_name: $(POSTFIX)-ubuntu18.04-mofed5-cuda11.tar.bz2 ubuntu20_cuda11: build_container: ubuntu20_cuda11 - artifact_name: $(POSTFIX)-ubuntu20.04-mofed5-cuda11.deb + artifact_name: $(POSTFIX)-ubuntu20.04-mofed5-cuda11.tar.bz2 ubuntu22_cuda11: build_container: ubuntu22_cuda11 - artifact_name: $(POSTFIX)-ubuntu22.04-mofed5-cuda11.deb + artifact_name: $(POSTFIX)-ubuntu22.04-mofed5-cuda11.tar.bz2 container: $[ variables['build_container'] ] @@ -72,8 +72,12 @@ jobs: dpkg-buildpackage -us -uc -Pcuda cd .. # Move back to the working directory find . -name '*.deb' - find . -name '*.deb' -exec cp {} "${AZ_ARTIFACT_NAME}" \; - dpkg-deb -I "${AZ_ARTIFACT_NAME}" + VER="${POSTFIX#ucx-}" # Remove 'ucx' prefix from the POSTFIX string + # Rename DEB files + find . -name "ucx*.deb" -exec bash -c 'mv "$1" "${1%%_*}-'"${VER}"'.deb"' _ {} \; + dpkg-deb -I "ucx-${VER}.deb" + tar -cjf "${AZ_ARTIFACT_NAME}" *.deb # Package all DEBs + tar -tjf "${AZ_ARTIFACT_NAME}" displayName: Build DEB package condition: and(succeeded(), contains(variables['artifact_name'], 'ubuntu')) env: