forked from dotnet/runtime
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Reuse more templates in our build (dotnet#101197)
Co-authored-by: Alexander Köplinger <[email protected]>
- Loading branch information
1 parent
94a436f
commit 9659766
Showing
8 changed files
with
197 additions
and
320 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 0 additions & 17 deletions
17
eng/pipelines/common/templates/publish-pipeline-artifacts.yml
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
119 changes: 54 additions & 65 deletions
119
eng/pipelines/official/jobs/prepare-signed-artifacts.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,76 +1,65 @@ | ||
parameters: | ||
dependsOn: [] | ||
PublishRidAgnosticPackagesFromPlatform: '' | ||
isOfficialBuild: false | ||
logArtifactName: 'Logs-PrepareSignedArtifacts_Attempt$(System.JobAttempt)' | ||
|
||
jobs: | ||
- job: PrepareSignedArtifacts | ||
displayName: Prepare Signed Artifacts | ||
dependsOn: ${{ parameters.dependsOn }} | ||
pool: | ||
name: $(DncEngInternalBuildPool) | ||
demands: ImageOverride -equals 1es-windows-2022 | ||
# Double the default timeout. | ||
timeoutInMinutes: 240 | ||
workspace: | ||
clean: all | ||
- template: /eng/common/templates-official/job/job.yml | ||
parameters: | ||
name: 'PrepareSignedArtifacts' | ||
displayName: 'Prepare Signed Artifacts' | ||
|
||
variables: | ||
- name: SignType | ||
value: $[ coalesce(variables.OfficialSignType, 'real') ] | ||
pool: | ||
name: $(DncEngInternalBuildPool) | ||
demands: ImageOverride -equals 1es-windows-2022 | ||
|
||
templateContext: | ||
outputs: | ||
- output: pipelineArtifact | ||
displayName: 'Publish BuildLogs' | ||
condition: succeededOrFailed() | ||
targetPath: '$(Build.StagingDirectory)\BuildLogs' | ||
artifactName: ${{ parameters.logArtifactName }} | ||
# Double the default timeout. | ||
timeoutInMinutes: 240 | ||
|
||
steps: | ||
- checkout: self | ||
clean: true | ||
fetchDepth: 20 | ||
workspace: | ||
clean: all | ||
|
||
- ${{ if eq(parameters.isOfficialBuild, true) }}: | ||
- task: NuGetAuthenticate@1 | ||
enableMicrobuild: true | ||
|
||
- task: MicroBuildSigningPlugin@2 | ||
displayName: Install MicroBuild plugin for Signing | ||
inputs: | ||
signType: $(SignType) | ||
zipSources: false | ||
feedSource: https://dnceng.pkgs.visualstudio.com/_packaging/MicroBuildToolset/nuget/v3/index.json | ||
continueOnError: false | ||
condition: and(succeeded(), | ||
in(variables['SignType'], 'real', 'test')) | ||
|
||
- task: DownloadBuildArtifacts@0 | ||
displayName: Download IntermediateArtifacts | ||
inputs: | ||
artifactName: IntermediateArtifacts | ||
downloadPath: $(Build.SourcesDirectory)\artifacts\PackageDownload | ||
checkDownloadedFiles: true | ||
|
||
- script: >- | ||
build.cmd -ci | ||
-subset publish | ||
-configuration Release | ||
/p:PublishRidAgnosticPackagesFromPlatform=${{ parameters.PublishRidAgnosticPackagesFromPlatform }} | ||
/p:OfficialBuildId=$(Build.BuildNumber) | ||
/p:SignType=$(SignType) | ||
/p:DotNetSignType=$(SignType) | ||
/bl:$(Build.SourcesDirectory)\prepare-artifacts.binlog | ||
displayName: Prepare artifacts and upload to build | ||
- task: CopyFiles@2 | ||
displayName: Copy Files to $(Build.StagingDirectory)\BuildLogs | ||
inputs: | ||
SourceFolder: '$(Build.SourcesDirectory)' | ||
Contents: | | ||
**/*.log | ||
**/*.binlog | ||
TargetFolder: '$(Build.StagingDirectory)\BuildLogs' | ||
continueOnError: true | ||
condition: succeededOrFailed() | ||
variables: | ||
- name: '_SignType' | ||
value: $[ coalesce(variables.OfficialSignType, 'real') ] | ||
|
||
templateContext: | ||
inputs: | ||
- input: checkout | ||
repository: self | ||
clean: true | ||
fetchDepth: 20 | ||
- input: pipelineArtifact | ||
artifactName: IntermediateArtifacts | ||
targetPath: $(Build.SourcesDirectory)\artifacts\PackageDownload | ||
outputs: | ||
- output: pipelineArtifact | ||
displayName: 'Publish BuildLogs' | ||
condition: succeededOrFailed() | ||
targetPath: '$(Build.StagingDirectory)\BuildLogs' | ||
artifactName: ${{ parameters.logArtifactName }} | ||
|
||
steps: | ||
- script: >- | ||
build.cmd -ci | ||
-subset publish | ||
-configuration Release | ||
/p:PublishRidAgnosticPackagesFromPlatform=${{ parameters.PublishRidAgnosticPackagesFromPlatform }} | ||
/p:OfficialBuildId=$(Build.BuildNumber) | ||
/p:SignType=$(_SignType) | ||
/p:DotNetSignType=$(_SignType) | ||
/bl:$(Build.SourcesDirectory)\prepare-artifacts.binlog | ||
displayName: Prepare artifacts and upload to build | ||
- task: CopyFiles@2 | ||
displayName: Copy Files to $(Build.StagingDirectory)\BuildLogs | ||
inputs: | ||
SourceFolder: '$(Build.SourcesDirectory)' | ||
Contents: | | ||
**/*.log | ||
**/*.binlog | ||
TargetFolder: '$(Build.StagingDirectory)\BuildLogs' | ||
continueOnError: true | ||
condition: succeededOrFailed() |
Oops, something went wrong.