diff --git a/eng/pipelines/templates/jobs/sdk-diff-tests.yml b/eng/pipelines/templates/jobs/sdk-diff-tests.yml index 7be31841f..7048b4c98 100644 --- a/eng/pipelines/templates/jobs/sdk-diff-tests.yml +++ b/eng/pipelines/templates/jobs/sdk-diff-tests.yml @@ -51,51 +51,25 @@ jobs: env: AZURE_DEVOPS_EXT_PAT: $(System.AccessToken) - - task: DownloadPipelineArtifact@2 - displayName: Download MSFT SDK - inputs: - buildType: specific - buildVersionToDownload: specific - project: internal - pipeline: $(INSTALLER_OFFICIAL_CI_PIPELINE_ID) - buildId: $(InstallerBuildId) - artifact: BlobArtifacts - patterns: '**/dotnet-sdk-+([0-9]).+([0-9]).+([0-9])?(-@(alpha|preview|rc|rtm)*)-linux-${{ parameters.architecture }}.tar.gz' - allowPartiallySucceededBuilds: true - allowFailedBuilds: true - downloadPath: $(Pipeline.Workspace)/Artifacts - checkDownloadedFiles: true + - template: ../steps/download-pipeline-artifact.yml + parameters: + patterns: '**/dotnet-sdk-+([0-9]).+([0-9]).+([0-9])?(-@(alpha|preview|rc|rtm)*)-linux-${{ parameters.architecture }}.tar.gz' + displayName: Download MSFT SDK - - task: DownloadPipelineArtifact@2 - displayName: Download Source Build SDK - inputs: - buildType: specific - buildVersionToDownload: specific - project: internal - pipeline: $(DOTNET_DOTNET_CI_PIPELINE_ID) - buildId: $(DotnetDotnetBuildId) - artifact: ${{ parameters.buildName }}_${{ parameters.architecture }}_Artifacts + - template: ../steps/download-vmr-artifact.yml + parameters: + buildName: ${{ parameters.buildName }} + architecture: ${{ parameters.architecture }} patterns: '**/dotnet-sdk-+([0-9]).+([0-9]).+([0-9])?(-@(alpha|preview|rc|rtm)*)-${{ parameters.targetRid }}.tar.gz' - allowPartiallySucceededBuilds: true - allowFailedBuilds: true - downloadPath: $(Pipeline.Workspace)/Artifacts - checkDownloadedFiles: true + displayName: Download Source Build SDK - - task: DownloadPipelineArtifact@2 - displayName: Download Artifacts - inputs: - buildType: specific - buildVersionToDownload: specific - project: internal - pipeline: $(DOTNET_DOTNET_CI_PIPELINE_ID) - buildId: $(DotnetDotnetBuildId) - artifact: ${{ parameters.buildName }}_${{ parameters.architecture }}_Artifacts + - template: ../steps/download-vmr-artifact.yml + parameters: + buildName: ${{ parameters.buildName }} + architecture: ${{ parameters.architecture }} patterns: '**/Private.SourceBuilt.Artifacts.+([0-9]).+([0-9]).+([0-9])?(-@(alpha|preview|rc|rtm)*).${{ parameters.targetRid }}.tar.gz' - allowPartiallySucceededBuilds: true - allowFailedBuilds: true - downloadPath: $(Pipeline.Workspace)/Artifacts - checkDownloadedFiles: true - + displayName: Download Source Built Artifacts + - script: | msft_sdk_tarball_name=$(find "$(Pipeline.Workspace)/Artifacts" -name "dotnet-sdk-*-linux-${{ parameters.architecture }}.tar.gz" -exec basename {} \;) diff --git a/eng/pipelines/templates/steps/download-pipeline-artifact.yml b/eng/pipelines/templates/steps/download-pipeline-artifact.yml new file mode 100644 index 000000000..21df363d7 --- /dev/null +++ b/eng/pipelines/templates/steps/download-pipeline-artifact.yml @@ -0,0 +1,35 @@ +parameters: +- name: pipeline + type: string + default: $(INSTALLER_OFFICIAL_CI_PIPELINE_ID) + +- name: buildId + type: string + default: $(InstallerBuildId) + +- name: artifact + type: string + default: BlobArtifacts + +- name: patterns + type: string + +- name: displayName + type: string + default: Download Pipeline Artifact + +steps: +- task: DownloadPipelineArtifact@2 + inputs: + buildType: specific + buildVersionToDownload: specific + project: internal + pipeline: ${{ parameters.pipeline }} + buildId: ${{ parameters.buildId }} + artifact: ${{ parameters.artifact }} + patterns: ${{ parameters.patterns }} + allowPartiallySucceededBuilds: true + allowFailedBuilds: true + downloadPath: $(Pipeline.Workspace)/Artifacts + checkDownloadedFiles: true + displayName: ${{ parameters.displayName }} diff --git a/eng/pipelines/templates/steps/download-vmr-artifact.yml b/eng/pipelines/templates/steps/download-vmr-artifact.yml new file mode 100644 index 000000000..2e2266c42 --- /dev/null +++ b/eng/pipelines/templates/steps/download-vmr-artifact.yml @@ -0,0 +1,22 @@ +parameters: +- name: buildName + type: string + +- name: architecture + type: string + +- name: patterns + type: string + +- name: displayName + type: string + default: Download VMR Artifact + +steps: +- template: ../steps/download-pipeline-artifact.yml + parameters: + pipeline: $(DOTNET_DOTNET_CI_PIPELINE_ID) + buildId: $(DotnetDotnetBuildId) + artifact: ${{ parameters.buildName }}_${{ parameters.architecture }}_Artifacts + patterns: ${{ parameters.patterns }} + displayName: ${{ parameters.displayName }}