[Build] Separate publish stage from signing stage. (#717)

This commit is contained in:
Terry Kim 2020-10-07 18:05:29 -07:00 коммит произвёл GitHub
Родитель 8a1ef48c56
Коммит 41e5c6381d
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
1 изменённых файлов: 44 добавлений и 5 удалений

Просмотреть файл

@ -85,10 +85,10 @@ stages:
artifactName: Microsoft.Spark.Binaries
- ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
- job: SignPublish
- job: Sign
dependsOn:
- Build
displayName: Sign and Publish Artifacts
displayName: Sign Artifacts
pool:
name: NetCoreInternal-Pool
queue: buildpool.windows.10.amd64.vs2017
@ -113,18 +113,57 @@ stages:
env:
TeamName: $(_TeamName)
condition: and(succeeded(), in(variables['_SignType'], 'real', 'test'), eq(variables['Agent.Os'], 'Windows_NT'))
- task: PowerShell@2
displayName: Sign artifacts and Package Microsoft.Spark.Worker
displayName: Sign artifacts
inputs:
filePath: eng\common\build.ps1
arguments: -restore -sign -publish
arguments: -restore -sign
-c $(buildConfiguration)
-ci
$(_OfficialBuildIdArgs)
/p:DotNetSignType=$(_SignType)
/p:SparkPackagesDir=$(ArtifactPath)\BuildArtifacts\artifacts\packages
/p:SparkWorkerPublishDir=$(ArtifactPath)\Microsoft.Spark.Worker
- task: PublishBuildArtifacts@1
inputs:
pathtoPublish: '$(ArtifactPath)'
artifactName: Microsoft.Spark.Binaries
# The "Publish" stage is separated out from the "Sign" stage because we need to install powershell module
# to zip files correctly for macOS; installing the module is not allowed in NetCoreInternal-Pool.
- ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
- job: Publish
dependsOn:
- Sign
displayName: Publish Artifacts
pool: Hosted VS2017
variables:
${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
_OfficialBuildIdArgs: /p:OfficialBuildId=$(BUILD.BUILDNUMBER)
steps:
# The following module needs to be installed to zip files correctly for macOS.
- powershell: Install-Module -Name Microsoft.PowerShell.Archive -Scope CurrentUser -Force -AllowClobber -Verbose -MinimumVersion 1.2.5
displayName: Install Microsoft.PowerShell.Archive
- task: DownloadBuildArtifacts@0
displayName: Download Signed Artifacts
inputs:
artifactName: Microsoft.Spark.Binaries
downloadPath: $(Build.ArtifactStagingDirectory)
- task: PowerShell@2
displayName: Package Microsoft.Spark.Worker
inputs:
filePath: eng\common\build.ps1
arguments: -restore -publish
-c $(buildConfiguration)
-ci
$(_OfficialBuildIdArgs)
/p:SparkWorkerPublishDir=$(ArtifactPath)\Microsoft.Spark.Worker
/p:SparkWorkerPackageOutputDir=$(ArtifactPath)
- task: PublishBuildArtifacts@1