Skip to content

Commit

Permalink
Add internal build access to pack and sign jobs (#7407)
Browse files Browse the repository at this point in the history
  • Loading branch information
jander-msft authored Oct 3, 2024
1 parent 2862028 commit 56ce405
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 4 deletions.
20 changes: 18 additions & 2 deletions eng/pipelines/jobs/pack-sign-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,15 @@ jobs:
variables:
- _BuildConfig: Release
- _SignType: real
- group: DotNet-MSRC-Storage
- _InternalBuildArgs: ''
- _InternalInstallArgs: >-
-RuntimeSourceFeed https://dotnetclimsrc.blob.core.windows.net/dotnet
-RuntimeSourceFeedKey $(dotnetclimsrc-read-sas-token-base64)
- ${{ if notin(variables['Build.Reason'], 'PullRequest') }}:
- _InternalBuildArgs: >-
/p:TeamName=$(_TeamName)
/p:OfficialBuildId=$(BUILD.BUILDNUMBER)
steps:
- task: DownloadPipelineArtifact@2
displayName: Download Binaries
Expand All @@ -31,13 +40,20 @@ jobs:
inputs:
artifactName: 'THIRD-PARTY-NOTICES'
targetPath: '$(Build.SourcesDirectory)'
- task: PowerShell@2
displayName: Setup Private Feeds Credentials
inputs:
filePath: $(Build.SourcesDirectory)/eng/common/SetupNugetSources.ps1
arguments: -ConfigFile $(Build.SourcesDirectory)/NuGet.config -Password $Env:Token
env:
Token: $(dn-bot-dnceng-artifact-feeds-rw)
- script: >-
$(Build.SourcesDirectory)/eng/cipacksignpublish.cmd
/p:TeamName=$(_TeamName)
/p:OfficialBuildId=$(BUILD.BUILDNUMBER)
/p:DotNetSignType=real
/p:DotNetPublishUsingPipelines=true
/p:ThirdPartyNoticesFilePath='$(Build.SourcesDirectory)/$(_TPNFile)'
$(_InternalInstallArgs)
$(_InternalBuildArgs)
displayName: Pack, Sign, and Publish
# Intentionally copying file as "dotnet-monitor.nupkg.buildversion" for back compat
- task: powershell@2
Expand Down
22 changes: 20 additions & 2 deletions eng/pipelines/jobs/sign-binaries.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,16 @@ jobs:
variables:
- _BuildConfig: ${{ parameters.configuration }}
- _SignType: real
- group: DotNet-MSRC-Storage
- _InternalBuildArgs: ''
- _InternalInstallArgs: >-
-RuntimeSourceFeed https://dotnetclimsrc.blob.core.windows.net/dotnet
-RuntimeSourceFeedKey $(dotnetclimsrc-read-sas-token-base64)
- ${{ if notin(variables['Build.Reason'], 'PullRequest') }}:
- _InternalBuildArgs: >-
/p:TeamName=$(_TeamName)
/p:OfficialBuildId=$(BUILD.BUILDNUMBER)
steps:
- task: DownloadPipelineArtifact@2
Expand All @@ -23,6 +33,14 @@ jobs:
artifactName: Build_Published_${{ parameters.configuration }}
targetPath: '$(Build.SourcesDirectory)/artifacts'

- task: PowerShell@2
displayName: Setup Private Feeds Credentials
inputs:
filePath: $(Build.SourcesDirectory)/eng/common/SetupNugetSources.ps1
arguments: -ConfigFile $(Build.SourcesDirectory)/NuGet.config -Password $Env:Token
env:
Token: $(dn-bot-dnceng-artifact-feeds-rw)

- script: >-
$(Build.SourcesDirectory)/restore.cmd
-configuration ${{ parameters.configuration }}
Expand All @@ -32,10 +50,10 @@ jobs:
-sign
-nobl
/bl:'$(Build.SourcesDirectory)\artifacts\log\Release\SignBinaries.binlog'
/p:TeamName=$(_TeamName)
/p:OfficialBuildId=$(BUILD.BUILDNUMBER)
/p:DotNetSignType=real
/p:SignAllBinaries=true
$(_InternalInstallArgs)
$(_InternalBuildArgs)
displayName: Sign
- task: CopyFiles@2
Expand Down

0 comments on commit 56ce405

Please sign in to comment.