From 4ef6b419d204e7d040e8df8c0ecd96ee82013195 Mon Sep 17 00:00:00 2001 From: ellahathaway Date: Fri, 17 Nov 2023 06:16:12 +0800 Subject: [PATCH 1/2] Download and compare linux-musl-x64 MSFT sdk --- .../eng/common/templates/job/source-build-build-tarball.yml | 2 +- src/SourceBuild/tarball/content/Directory.Build.props | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/SourceBuild/Arcade/eng/common/templates/job/source-build-build-tarball.yml b/src/SourceBuild/Arcade/eng/common/templates/job/source-build-build-tarball.yml index 9e67adb4d98a..33cc1d0d60ec 100644 --- a/src/SourceBuild/Arcade/eng/common/templates/job/source-build-build-tarball.yml +++ b/src/SourceBuild/Arcade/eng/common/templates/job/source-build-build-tarball.yml @@ -85,7 +85,7 @@ jobs: - ${{ if ne(parameters.excludeSdkContentTests, 'true') }}: - download: ${{ parameters.installerBuildResourceId }} artifact: BlobArtifacts - patterns: '**/dotnet-sdk-+([0-9]).+([0-9]).+([0-9])?(-@(preview|rc|rtm)*)-linux-${{ parameters.architecture }}.tar.gz' + patterns: '**/dotnet-sdk-+([0-9]).+([0-9]).+([0-9])?(-@(preview|rc|rtm)*)-linux*-${{ parameters.architecture }}.tar.gz' displayName: Download MSFT sdk Tarball - ${{ if eq(parameters.usePreviousArtifacts, 'true') }}: diff --git a/src/SourceBuild/tarball/content/Directory.Build.props b/src/SourceBuild/tarball/content/Directory.Build.props index 2f4a8ee71cf3..0bd22885094b 100644 --- a/src/SourceBuild/tarball/content/Directory.Build.props +++ b/src/SourceBuild/tarball/content/Directory.Build.props @@ -174,6 +174,7 @@ freebsd-$(Platform) osx-$(Platform) linux-$(Platform) + linux-musl-$(Platform) win-$(Platform) $(PortableRid) From 1538ad0e817008f33ea53826702914a141c388c6 Mon Sep 17 00:00:00 2001 From: ellahathaway Date: Sat, 18 Nov 2023 00:57:24 +0800 Subject: [PATCH 2/2] Specify platform for msftSdkTarballName --- .../common/templates/job/source-build-build-tarball.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/SourceBuild/Arcade/eng/common/templates/job/source-build-build-tarball.yml b/src/SourceBuild/Arcade/eng/common/templates/job/source-build-build-tarball.yml index 33cc1d0d60ec..c8756326ebdc 100644 --- a/src/SourceBuild/Arcade/eng/common/templates/job/source-build-build-tarball.yml +++ b/src/SourceBuild/Arcade/eng/common/templates/job/source-build-build-tarball.yml @@ -185,7 +185,12 @@ jobs: if [[ '${{ parameters.excludeSdkContentTests}}' != 'true' ]]; then dockerVolumeArgs+=" -v $(PIPELINE.WORKSPACE)/${{ parameters.installerBuildResourceId }}/BlobArtifacts/:/BlobArtifacts" - msftSdkTarballName=$(find "$(PIPELINE.WORKSPACE)/${{ parameters.installerBuildResourceId }}/BlobArtifacts/" -name "dotnet-sdk-*-linux-${{ parameters.architecture }}.tar.gz" -exec basename {} \;) + platform="linux" + docker run --rm $(_Container) /bin/sh -c "cat /etc/os-release | grep -q alpine" + if [[ $? == 0 ]]; then + platform="$platform-musl" + fi + msftSdkTarballName=$(find "$(PIPELINE.WORKSPACE)/${{ parameters.installerBuildResourceId }}/BlobArtifacts/" -name "dotnet-sdk-*-$platform-${{ parameters.architecture }}.tar.gz" -exec basename {} \;) dockerEnvArgs+=" -e SMOKE_TESTS_MSFT_SDK_TARBALL_PATH=/BlobArtifacts/$msftSdkTarballName" fi