Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reuse more templates in our build #101197

Merged
merged 15 commits into from
Apr 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions eng/pipelines/common/global-build-job.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ parameters:
extraVariablesTemplates: []
preBuildSteps: []
templatePath: 'templates'
templateContext: ''

jobs:
- template: /eng/common/${{ parameters.templatePath }}/job/job.yml
Expand All @@ -51,6 +52,9 @@ jobs:
enablePublishTestResults: ${{ parameters.enablePublishTestResults }}
testResultsFormat: ${{ parameters.testResultsFormat }}

${{ if ne(parameters.templateContext, '') }}:
templateContext: ${{ parameters.templateContext }}

artifacts:
publish:
logs:
Expand Down
17 changes: 0 additions & 17 deletions eng/pipelines/common/templates/publish-pipeline-artifacts.yml

This file was deleted.

88 changes: 0 additions & 88 deletions eng/pipelines/mono/templates/generate-offsets.yml

This file was deleted.

117 changes: 0 additions & 117 deletions eng/pipelines/mono/templates/workloads-build.yml

This file was deleted.

119 changes: 54 additions & 65 deletions eng/pipelines/official/jobs/prepare-signed-artifacts.yml
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()
Loading
Loading