Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit9e9fe79

Browse files
[release/v7.4] Fixes to Azure Public feed usage (#24429)
1 parent5aac2a7 commit9e9fe79

File tree

27 files changed

+271
-363
lines changed

27 files changed

+271
-363
lines changed

‎.pipelines/PowerShell-Coordinated_Packages-Official.yml

Lines changed: 21 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,10 @@ variables:
5858
value:${{ parameters.ReleaseTagVar }}
5959
-name:SKIP_SIGNING
6060
value:${{ parameters.SKIP_SIGNING }}
61-
-group:'AzDevOpsArtifacts'
62-
-group:'mscodehub-feed-read-akv'
61+
-group:mscodehub-feed-read-general
62+
-group:mscodehub-feed-read-akv
63+
-name:ENABLE_MSBUILD_BINLOGS
64+
value:${{ parameters.ENABLE_MSBUILD_BINLOGS }}
6365

6466
extends:
6567
template:v2/OneBranch.Official.CrossPlat.yml@onebranchTemplates
@@ -70,6 +72,11 @@ extends:
7072
WindowsHostVersion:
7173
Network:KS2
7274
customTags:'ES365AIMigrationTooling'
75+
featureFlags:
76+
LinuxHostVersion:
77+
Network:KS3
78+
WindowsHostVersion:
79+
Network:KS3
7380
globalSdl:
7481
disableLegacyManifest:true
7582
# disabled Armorty as we dont have any ARM templates to scan. It fails on some sample ARM templates.
@@ -112,15 +119,18 @@ extends:
112119
type:windows
113120

114121
variables:
115-
-name:ob_sdl_tsa_configFile
116-
value:$(Build.SourcesDirectory)\PowerShell\.config\tsaoptions.json
117-
-name:ob_sdl_credscan_suppressionsFile
118-
value:$(Build.SourcesDirectory)\PowerShell\.config\suppress.json
119-
-${{ if eq(variables['Build.SourceBranch'], 'refs/heads/master') }}:
120-
-name:ob_sdl_codeql_compiled_enabled
121-
value:true
122122
-name:ob_outputDirectory
123123
value:'$(Build.ArtifactStagingDirectory)/ONEBRANCH_ARTIFACT/BuildJson'
124+
-name:ob_sdl_codeSignValidation_enabled
125+
value:false
126+
-name:ob_sdl_codeql_compiled_enabled
127+
value:false
128+
-name:ob_sdl_credscan_suppressionsFile
129+
value:$(Build.SourcesDirectory)\PowerShell\.config\suppress.json
130+
-name:ob_sdl_tsa_configFile
131+
value:$(Build.SourcesDirectory)\PowerShell\.config\tsaoptions.json
132+
-name:ob_signing_setup_enabled
133+
value:false
124134

125135
steps:
126136
-checkout:self
@@ -131,6 +141,8 @@ extends:
131141
-pwsh:|
132142
Get-ChildItem Env: | Out-String -width 9999 -Stream | write-Verbose -Verbose
133143
displayName: Capture environment variables
144+
env:
145+
ob_restore_phase: true # This ensures checkout is done at the beginning of the restore phase
134146
135147
-template:/.pipelines/templates/SetVersionVariables.yml@self
136148
parameters:

‎.pipelines/PowerShell-Packages-Official.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ variables:
5252
value:'onebranch.azurecr.io/windows/ltsc2019/vse2022:latest'# Docker image which is used to build the project
5353
-name:LinuxContainerImage
5454
value:mcr.microsoft.com/onebranch/cbl-mariner/build:2.0
55+
-group:mscodehub-feed-read-general
5556
-group:mscodehub-feed-read-akv
5657
-name:branchCounterKey
5758
value:$[format('{0:yyyyMMdd}-{1}', pipeline.startTime,variables['Build.SourceBranch'])]

‎.pipelines/templates/checkAzureContainer.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,8 @@ jobs:
1313
value:$(Build.SourcesDirectory)\PowerShell\.config\tsaoptions.json
1414
-name:ob_sdl_credscan_suppressionsFile
1515
value:$(Build.SourcesDirectory)\PowerShell\.config\suppress.json
16-
-${{ if eq(variables['Build.SourceBranch'], 'refs/heads/master') }}:
17-
-name:ob_sdl_codeql_compiled_enabled
18-
value:true
16+
-name:ob_sdl_codeql_compiled_enabled
17+
value:false
1918

2019
displayName:Delete blob is exists
2120
pool:
Lines changed: 39 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,53 @@
11
parameters:
22
-name:"repoRoot"
33
default:$(REPOROOT)
4+
-name:"ob_restore_phase"
5+
type:boolean
6+
default:true
7+
48
steps:
9+
-task:NuGetAuthenticate@1
10+
displayName:Install Azure Artifacts Credential Provider
11+
inputs:
12+
forceReinstallCredentialProvider:true
13+
514
-pwsh:|
6-
$configPath = "${env:NugetConfigDir}/nuget.config"
7-
Import-Module ${{ parameters.repoRoot }}/build.psm1 -Force
15+
try {
16+
$configPath = "${env:NugetConfigDir}/nuget.config"
17+
Import-Module ${{ parameters.repoRoot }}/build.psm1 -Force
818
9-
$powerShellPublicPackages = New-NugetPackageSource -Url '$(PowerShellCore_PublicPackages)' -Name 'AzDevOpsFeed'
19+
Write-Verbose -Verbose "Running: Switch-PSNugetConfig -Source Private -UserName '$(AzDevopsFeedUserNameKVPAT)' -ClearTextPAT '$(powershellPackageReadPat)'"
20+
Switch-PSNugetConfig -Source Private -UserName '$(AzDevopsFeedUserNameKVPAT)' -ClearTextPAT '$(powershellPackageReadPat)'
1021
11-
New-NugetConfigFile -NugetPackageSource $powerShellPublicPackages -UserName $(AzDevopsFeedUserNameKVPAT) -ClearTextPAT $(mscodehubPackageReadPat) -Destination "${env:NugetConfigDir}"
12-
if(-not (Test-Path $configPath))
13-
{
14-
throw "nuget.config is not created"
22+
if(-not (Test-Path $configPath))
23+
{
24+
throw "nuget.config is not created"
25+
}
1526
}
16-
Get-Content $configPath | Write-Verbose -Verbose
17-
displayName:'Add nuget.config for Azure DevOps feed for PSGallery modules'
18-
condition:and(succeededOrFailed(), ne(variables['AzDevOpsFeed'], ''))
27+
catch {
28+
Get-Error
29+
throw
30+
}
31+
displayName:'Switch to production Azure DevOps feed for all nuget.configs'
32+
condition:and(succeededOrFailed(), ne(variables['UseAzDevOpsFeed'], ''))
1933
env:
2034
NugetConfigDir:${{ parameters.repoRoot }}/src/Modules
21-
ob_restore_phase:true# This ensures checkout is done at the beginning of the restore phase
35+
ob_restore_phase:${{ parameters.ob_restore_phase }}
2236

2337
-pwsh:|
24-
$configPath = "${env:NugetConfigDir}/nuget.config"
25-
Import-Module ${{ parameters.repoRoot }}/build.psm1 -Force
26-
27-
$powerShellPublicPackages = New-NugetPackageSource -Url '$(PowerShellCore_PublicPackages)' -Name 'AzDevOpsFeed'
28-
29-
New-NugetConfigFile -NugetPackageSource $powerShellPublicPackages -UserName $(AzDevopsFeedUserNameKVPAT) -ClearTextPAT $(mscodehubPackageReadPat) -Destination "${env:NugetConfigDir}"
30-
if (-not (Test-Path $configPath))
31-
{
32-
throw "nuget.config is not created"
38+
Get-ChildItem ${{ parameters.repoRoot }}/nuget.config -Recurse | Foreach-Object {
39+
Write-Verbose -Verbose "--- START $($_.fullname) ---"
40+
get-content $_.fullname | Out-String -width 9999 -Stream | write-Verbose -Verbose
41+
Write-Verbose -Verbose "--- END $($_.fullname) ---"
3342
}
34-
Get-Content $configPath | Write-Verbose -Verbose
35-
displayName:'Add nuget.config for Azure DevOps feed for packages'
36-
condition:and(succeededOrFailed(), ne(variables['PSInternalNugetFeed'], ''))
43+
displayName:'Capture all nuget.config files'
44+
condition:and(succeededOrFailed(), ne(variables['UseAzDevOpsFeed'], ''))
45+
env:
46+
ob_restore_phase:${{ parameters.ob_restore_phase }}
47+
48+
-pwsh:|
49+
Get-ChildItem -Path env:VSS* | Out-String -width 9999 -Stream | write-Verbose -Verbose
50+
displayName:Capture VSS* Environment
51+
condition:and(succeededOrFailed(), ne(variables['UseAzDevOpsFeed'], ''))
3752
env:
38-
NugetConfigDir:${{ parameters.repoRoot }}
39-
ob_restore_phase:true# This ensures checkout is done at the beginning of the restore phase
53+
ob_restore_phase:${{ parameters.ob_restore_phase }}

‎.pipelines/templates/mac.yml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,9 @@ jobs:
2020
-group:DotNetPrivateBuildAccess
2121
-name:ob_outputDirectory
2222
value:'$(Build.ArtifactStagingDirectory)/ONEBRANCH_ARTIFACT'
23-
-name:ob_sdl_binskim_enabled
24-
value:true
25-
-name:ob_sdl_credscan_suppressionsfileforartifacts
26-
value:$(Build.SourcesDirectory)/PowerShell/.config/suppress.json
23+
-name:PowerShellRoot
24+
value:$(Build.SourcesDirectory)
25+
2726
steps:
2827
-checkout:self
2928
clean:true
@@ -39,19 +38,19 @@ jobs:
3938
# make the current user the owner
4039
sudo chown $env:USER "$(Agent.TempDirectory)/PowerShell"
4140
displayName: 'Create $(Agent.TempDirectory)/PowerShell'
42-
-template:/.pipelines/templates/cloneToOfficialPath.yml@self
43-
parameters:
44-
nativePathRoot:'$(Agent.TempDirectory)'
41+
4542
-pwsh:|
46-
tools/releaseBuild/macOS/PowerShellPackageVsts.ps1 -location $(PowerShellRoot) -BootStrap
43+
Import-Module $(PowerShellRoot)/build.psm1 -Force
44+
Start-PSBootstrap -Package
4745
displayName: 'Bootstrap VM'
4846
env:
4947
__DOTNET_RUNTIME_FEED_KEY: $(RUNTIME_SOURCEFEED_KEY)
48+
5049
-template:/.pipelines/templates/insert-nuget-config-azfeed.yml@self
5150
parameters:
5251
repoRoot:$(PowerShellRoot)
5352
-pwsh:|
54-
$env:AzDevOpsFeedPAT2 = '$(AzDevOpsFeedPAT2)'
53+
$env:AzDevOpsFeedPAT2 = '$(powershellPackageReadPat)'
5554
# Add -SkipReleaseChecks as a mitigation to unblock release.
5655
# macos-10.15 does not allow creating a folder under root. Hence, moving the folder.
5756
@@ -76,6 +75,7 @@ jobs:
7675
displayName: 'Build'
7776
env:
7877
__DOTNET_RUNTIME_FEED_KEY: $(RUNTIME_SOURCEFEED_KEY)
78+
7979
-template:/.pipelines/templates/step/finalize.yml@self
8080

8181
-job:sign_${{ parameters.buildArchitecture }}

‎.pipelines/templates/nupkg.yml

Lines changed: 5 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@ jobs:
2222
value:$(Build.SourcesDirectory)\PowerShell\.config\tsaoptions.json
2323
-name:ob_sdl_credscan_suppressionsFile
2424
value:$(Build.SourcesDirectory)\PowerShell\.config\suppress.json
25-
-group:'AzDevOpsArtifacts'
25+
-group:mscodehub-feed-read-general
26+
-group:mscodehub-feed-read-akv
2627
-group:DotNetPrivateBuildAccess
2728

2829
steps:
@@ -89,23 +90,9 @@ jobs:
8990
env:
9091
ob_restore_phase: true # This ensures this done in restore phase to workaround signing issue
9192
92-
-pwsh:|
93-
$repoRoot = "$(PowerShellRoot)"
94-
Write-Verbose -Verbose "repoRoot: $repoRoot"
95-
96-
$configPath = "$repoRoot/nuget.config"
97-
Import-Module "$repoRoot/build.psm1" -Force
98-
New-NugetConfigFile -NugetFeedUrl $(PowerShellCore_PublicPackages) -UserName $(AzDevOpsFeedUserName) -ClearTextPAT $(AzDevOpsFeedPAT2) -FeedName AzDevOpsFeed -Destination "$(PowerShellRoot)"
99-
100-
if(-not (Test-Path $configPath))
101-
{
102-
throw "nuget.config is not created"
103-
}
104-
Get-Content $configPath | Write-Verbose -Verbose
105-
displayName: 'Add nuget.config for Azure DevOps feed for packages'
106-
condition: and(succeededOrFailed(), ne(variables['PowerShellCore_PublicPackages'], ''))
107-
env:
108-
ob_restore_phase: true # This ensures this done in restore phase to workaround signing issue
93+
-template:/.pipelines/templates/insert-nuget-config-azfeed.yml@self
94+
parameters:
95+
repoRoot:$(PowerShellRoot)
10996

11097
-task:NuGetToolInstaller@1
11198
displayName:'Install NuGet.exe'

‎.pipelines/templates/release-MakeBlobPublic.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,8 @@ jobs:
3030
value:$(Build.SourcesDirectory)\PowerShell\.config\tsaoptions.json
3131
-name:ob_sdl_credscan_suppressionsFile
3232
value:$(Build.SourcesDirectory)\PowerShell\.config\suppress.json
33-
-${{ if eq(variables['Build.SourceBranch'], 'refs/heads/master') }}:
34-
-name:ob_sdl_codeql_compiled_enabled
35-
value:true
33+
-name:ob_sdl_codeql_compiled_enabled
34+
value:false
3635

3736
steps:
3837
-checkout:self

‎.pipelines/templates/release-validate-sdk.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@ jobs:
1919
-ImageOverride -equals ${{ parameters.imageName }}
2020

2121
variables:
22-
-group:AzDevOpsArtifacts
22+
-group:mscodehub-feed-read-general
23+
-group:mscodehub-feed-read-akv
2324
-group:DotNetPrivateBuildAccess
2425

2526
steps:

‎.pipelines/templates/testartifacts.yml

Lines changed: 29 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,22 @@ jobs:
2222
steps:
2323
-checkout:self
2424
clean:true
25+
env:
26+
ob_restore_phase:true
27+
2528
-template:/.pipelines/templates/insert-nuget-config-azfeed.yml@self
2629
parameters:
27-
repoRoot:$(Build.SourcesDirectory)
30+
repoRoot:$(Build.SourcesDirectory)/PowerShell
31+
ob_restore_phase:true
32+
2833
-pwsh:|
2934
Import-Module $(Build.SourcesDirectory)/PowerShell/build.psm1
3035
Start-PSBootstrap
3136
displayName: Bootstrap
3237
env:
3338
__DOTNET_RUNTIME_FEED_KEY: $(RUNTIME_SOURCEFEED_KEY)
39+
ob_restore_phase:true
40+
3441
-pwsh:|
3542
New-Item -Path '$(ob_outputDirectory)' -ItemType Directory -Force
3643
Import-Module $(Build.SourcesDirectory)/PowerShell/build.psm1
@@ -58,6 +65,13 @@ jobs:
5865
BuildTestPackage -runtime win-arm64
5966
displayName: Build test package and upload
6067
retryCountOnTaskFailure: 1
68+
env:
69+
ob_restore_phase:true
70+
71+
-pwsh:|
72+
Write-Host "This doesn't do anything but make the build phase run."
73+
displayName: Dummy build task
74+
6175
6276
-job:build_testartifacts_nonwin
6377
variables:
@@ -75,15 +89,22 @@ jobs:
7589
steps:
7690
-checkout:self
7791
clean:true
92+
env:
93+
ob_restore_phase:true
94+
7895
-template:/.pipelines/templates/insert-nuget-config-azfeed.yml@self
7996
parameters:
80-
repoRoot:$(Build.SourcesDirectory)
97+
repoRoot:$(Build.SourcesDirectory)/PowerShell
98+
ob_restore_phase:true
99+
81100
-pwsh:|
82101
Import-Module $(Build.SourcesDirectory)/PowerShell/build.psm1
83102
Start-PSBootstrap
84103
displayName: Bootstrap
85104
env:
86105
__DOTNET_RUNTIME_FEED_KEY: $(RUNTIME_SOURCEFEED_KEY)
106+
ob_restore_phase:true
107+
87108
-pwsh:|
88109
New-Item -Path '$(ob_outputDirectory)' -ItemType Directory -Force
89110
Import-Module $(Build.SourcesDirectory)/PowerShell/build.psm1
@@ -113,3 +134,9 @@ jobs:
113134
BuildTestPackage -runtime linux-musl-x64
114135
displayName: Build test package and upload
115136
retryCountOnTaskFailure: 1
137+
env:
138+
ob_restore_phase:true
139+
140+
-pwsh:|
141+
Write-Host "This doesn't do anything but make the build phase run."
142+
displayName: Dummy build task

‎.pipelines/templates/uploadToAzure.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,8 @@ jobs:
2121
value:$(Build.SourcesDirectory)\PowerShell\.config\tsaoptions.json
2222
-name:ob_sdl_credscan_suppressionsFile
2323
value:$(Build.SourcesDirectory)\PowerShell\.config\suppress.json
24-
-${{ if eq(variables['Build.SourceBranch'], 'refs/heads/master') }}:
25-
-name:ob_sdl_codeql_compiled_enabled
26-
value:true
24+
-name:ob_sdl_codeql_compiled_enabled
25+
value:false
2726

2827
steps:
2928
-checkout:self

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp