Skip to content

Commit

Permalink
[release/5.0] Add invocation to NuGet authentication scripts for inte…
Browse files Browse the repository at this point in the history
…rnal feeds (#47210)

* Add invocation to NuGet authentication scripts for internal feeds
  • Loading branch information
hoyosjs authored Jan 21, 2021
1 parent fc3f6f1 commit e17680b
Show file tree
Hide file tree
Showing 6 changed files with 122 additions and 5 deletions.
25 changes: 23 additions & 2 deletions eng/pipelines/common/global-build-job.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
variables:
- name: _osParameter
value: -os ${{ parameters.osGroup }}

- ${{ if and(eq(parameters.osGroup, 'Linux'), eq(parameters.osSubGroup, '_musl')) }}:
- name: _osParameter
value: /p:RuntimeOS=linux-musl /p:OutputRid=linux-musl-${{ parameters.archType }}
Expand All @@ -54,12 +54,33 @@ jobs:
${{ if ne(parameters.isOfficialBuild, true) }}:
value: ''

- ${{ if ne(variables['System.TeamProject'], 'public') }}:
- group: AzureDevOps-Artifact-Feeds-Pats

- ${{ each variable in parameters.variables }}:
- ${{ variable }}

steps:
- template: /eng/pipelines/common/clone-checkout-bundle-step.yml

- ${{ if ne(variables['System.TeamProject'], 'public') }}:
- ${{ if ne(parameters.osGroup, 'Windows_NT') }}:
- task: Bash@3
displayName: Setup Private Feeds Credentials
inputs:
filePath: $(Build.SourcesDirectory)/eng/common/SetupNugetSources.sh
arguments: $(Build.SourcesDirectory)/NuGet.config $Token
env:
Token: $(dn-bot-dnceng-artifact-feeds-rw)
- ${{ if eq(parameters.osGroup, 'Windows_NT') }}:
- 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)

- ${{ if eq(parameters.isOfficialBuild, true) }}:
- template: /eng/pipelines/common/restore-internal-tools.yml

Expand All @@ -76,7 +97,7 @@ jobs:
- script: $(Build.SourcesDirectory)$(dir)build$(scriptExt) -ci -arch ${{ parameters.archType }} $(_osParameter) ${{ parameters.buildArgs }} $(_officialBuildParameter) $(_crossBuildPropertyArg) $(_cxx11Parameter)
displayName: Build product

- ${{ if in(parameters.osGroup, 'OSX', 'iOS','tvOS') }}:
- ${{ if in(parameters.osGroup, 'OSX', 'iOS','tvOS') }}:
- script: |
du -sh $(Build.SourcesDirectory)/*
df -h
Expand Down
21 changes: 21 additions & 0 deletions eng/pipelines/coreclr/templates/xplat-job.yml
Original file line number Diff line number Diff line change
Expand Up @@ -98,10 +98,31 @@ jobs:
- name: crossArg
value: ''

- ${{ if ne(variables['System.TeamProject'], 'public') }}:
- group: AzureDevOps-Artifact-Feeds-Pats

- ${{ each variable in parameters.variables }}:
- ${{insert}}: ${{ variable }}

steps:
- template: /eng/pipelines/common/clone-checkout-bundle-step.yml

- ${{ if ne(variables['System.TeamProject'], 'public') }}:
- ${{ if ne(parameters.osGroup, 'Windows_NT') }}:
- task: Bash@3
displayName: Setup Private Feeds Credentials
inputs:
filePath: $(Build.SourcesDirectory)/eng/common/SetupNugetSources.sh
arguments: $(Build.SourcesDirectory)/NuGet.config $Token
env:
Token: $(dn-bot-dnceng-artifact-feeds-rw)
- ${{ if eq(parameters.osGroup, 'Windows_NT') }}:
- 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)

- ${{ parameters.steps }}
25 changes: 23 additions & 2 deletions eng/pipelines/installer/jobs/base-job.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,9 @@ jobs:
- name: SignType
value: test

- ${{ if ne(variables['System.TeamProject'], 'public') }}:
- group: AzureDevOps-Artifact-Feeds-Pats

# Set up non-PR build from internal project
- ${{ if eq(parameters.isOfficialBuild, true) }}:
- name: SignType
Expand Down Expand Up @@ -420,6 +423,24 @@ jobs:
destinationFolder: $(AllArtifactsDownloadPath)/libraries_bin_${{ platform }}_${{ parameters.liveLibrariesBuildConfig }}/
cleanUnpackFolder: false

- ${{ if ne(variables['System.TeamProject'], 'public') }}:
- ${{ if ne(parameters.osGroup, 'Windows_NT') }}:
- task: Bash@3
displayName: Setup Private Feeds Credentials
inputs:
filePath: $(Build.SourcesDirectory)/eng/common/SetupNugetSources.sh
arguments: $(Build.SourcesDirectory)/NuGet.config $Token
env:
Token: $(dn-bot-dnceng-artifact-feeds-rw)
- ${{ if eq(parameters.osGroup, 'Windows_NT') }}:
- 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)

- ${{ if ne(parameters.liveRuntimeBuildConfig, '') }}:
- template: /eng/pipelines/common/download-artifact-step.yml
parameters:
Expand Down Expand Up @@ -469,7 +490,7 @@ jobs:
- ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
- template: /eng/pipelines/common/macos-sign-with-entitlements.yml
parameters:
filesToSign:
filesToSign:
- name: dotnet
path: $(Build.SourcesDirectory)/artifacts/bin/osx-${{ parameters.archType }}.$(_BuildConfig)/corehost
entitlementsFile: $(Build.SourcesDirectory)/eng/pipelines/common/entitlements.plist
Expand All @@ -480,7 +501,7 @@ jobs:
- script: $(BaseJobBuildCommand) -subset installer.nocorehost
displayName: Build and Package

- ${{ if in(parameters.osGroup, 'OSX', 'iOS','tvOS') }}:
- ${{ if in(parameters.osGroup, 'OSX', 'iOS','tvOS') }}:
- script: |
du -sh $(Build.SourcesDirectory)/*
df -h
Expand Down
21 changes: 21 additions & 0 deletions eng/pipelines/libraries/base-job.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,9 @@ jobs:
- ${{ if eq(parameters.isOfficialBuild, 'true') }}:
- _msbuildCommonParameters: /p:OfficialBuildId=$(Build.BuildNumber)

- ${{ if ne(variables['System.TeamProject'], 'public') }}:
- group: AzureDevOps-Artifact-Feeds-Pats

- _runtimeArtifactName: ''
- _runtimeDownloadPath: ''
- _runtimeArtifactsPathArg: ''
Expand Down Expand Up @@ -126,6 +129,24 @@ jobs:
steps:
- template: /eng/pipelines/common/clone-checkout-bundle-step.yml

- ${{ if ne(variables['System.TeamProject'], 'public') }}:
- ${{ if ne(parameters.osGroup, 'Windows_NT') }}:
- task: Bash@3
displayName: Setup Private Feeds Credentials
inputs:
filePath: $(Build.SourcesDirectory)/eng/common/SetupNugetSources.sh
arguments: $(Build.SourcesDirectory)/NuGet.config $Token
env:
Token: $(dn-bot-dnceng-artifact-feeds-rw)
- ${{ if eq(parameters.osGroup, 'Windows_NT') }}:
- 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)

- ${{ if and(ne(parameters.liveRuntimeBuildConfig, ''), eq(parameters.runTests, true)) }}:
- template: /eng/pipelines/common/download-artifact-step.yml
parameters:
Expand Down
21 changes: 21 additions & 0 deletions eng/pipelines/mono/templates/xplat-job.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,10 +89,31 @@ jobs:
- name: _HelixSource
value: ci/dotnet/runtime/$(Build.SourceBranch)

- ${{ if ne(variables['System.TeamProject'], 'public') }}:
- group: AzureDevOps-Artifact-Feeds-Pats

- ${{ each variable in parameters.variables }}:
- ${{insert}}: ${{ variable }}

steps:
- template: /eng/pipelines/common/clone-checkout-bundle-step.yml

- ${{ if ne(variables['System.TeamProject'], 'public') }}:
- ${{ if ne(parameters.osGroup, 'Windows_NT') }}:
- task: Bash@3
displayName: Setup Private Feeds Credentials
inputs:
filePath: $(Build.SourcesDirectory)/eng/common/SetupNugetSources.sh
arguments: $(Build.SourcesDirectory)/NuGet.config $Token
env:
Token: $(dn-bot-dnceng-artifact-feeds-rw)
- ${{ if eq(parameters.osGroup, 'Windows_NT') }}:
- 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)

- ${{ parameters.steps }}
14 changes: 13 additions & 1 deletion eng/pipelines/official/jobs/prepare-signed-artifacts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,21 @@ jobs:
- name: SignType
value: $[ coalesce(variables.OfficialSignType, 'real') ]

- ${{ if ne(variables['System.TeamProject'], 'public') }}:
- group: AzureDevOps-Artifact-Feeds-Pats

steps:
- template: /eng/pipelines/common/clone-checkout-bundle-step.yml

- ${{ if ne(variables['System.TeamProject'], 'public') }}:
- 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)

- ${{ if eq(parameters.isOfficialBuild, true) }}:
- task: NuGetAuthenticate@0

Expand All @@ -33,7 +45,7 @@ jobs:
zipSources: false
feedSource: https://dnceng.pkgs.visualstudio.com/_packaging/MicroBuildToolset/nuget/v3/index.json
continueOnError: false
condition: and(succeeded(),
condition: and(succeeded(),
in(variables['SignType'], 'real', 'test'))

- task: DownloadBuildArtifacts@0
Expand Down

0 comments on commit e17680b

Please sign in to comment.