Skip to content

Commit

Permalink
Make internal .NET SDK URL as a parameter for release builld (PowerSh…
Browse files Browse the repository at this point in the history
  • Loading branch information
adityapatwardhan authored and VindSkyggen committed Dec 26, 2023
1 parent 94363ef commit 2935bf0
Show file tree
Hide file tree
Showing 15 changed files with 28 additions and 18 deletions.
8 changes: 8 additions & 0 deletions tools/releaseBuild/azureDevOps/compliance.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@ resources:
name: PowerShell/compliance
ref: master

parameters:
- name: InternalSDKBlobURL
displayName: URL to the blob havibg internal .NET SDK
type: string

variables:
- name: DOTNET_CLI_TELEMETRY_OPTOUT
value: 1
Expand All @@ -33,6 +38,9 @@ variables:
# Defines the variables CgPat, CgOrganization, and CgProject
- group: 'ComponentGovernance'
- group: 'PoolNames'
- name: __DOTNET_RUNTIME_FEED
value: ${{ parameters.InternalSDKBlobURL }}


stages:
- stage: compliance
Expand Down
5 changes: 5 additions & 0 deletions tools/releaseBuild/azureDevOps/releaseBuild.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ parameters:
- true
- false
default: false
- name: InternalSDKBlobURL
displayName: URL to the blob having internal .NET SDK
type: string

resources:
repositories:
Expand Down Expand Up @@ -54,6 +57,8 @@ variables:
- name: BUILDSECMON_OPT_IN
value: true
- group: PoolNames
- name: __DOTNET_RUNTIME_FEED
value: ${{ parameters.InternalSDKBlobURL }}

stages:
- stage: prep
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ jobs:
retryCountOnTaskFailure: 2
displayName: 'Bootstrap'
env:
__DOTNET_RUNTIME_FEED: $(RUNTIME_SOURCEFEED)
__DOTNET_RUNTIME_FEED_KEY: $(RUNTIME_SOURCEFEED_KEY)
- pwsh: |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,6 @@ jobs:
condition: and(succeeded(), ne(variables['SkipBuild'], 'true'))
workingDirectory: $(PowerShellRoot)
env:
__DOTNET_RUNTIME_FEED: $(RUNTIME_SOURCEFEED)
__DOTNET_RUNTIME_FEED_KEY: $(RUNTIME_SOURCEFEED_KEY)
- powershell: |
Expand Down
1 change: 0 additions & 1 deletion tools/releaseBuild/azureDevOps/templates/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ jobs:
condition: and(succeeded(), ne(variables['SkipBuild'], 'true'))
workingDirectory: $(PowerShellRoot)
env:
__DOTNET_RUNTIME_FEED: $(RUNTIME_SOURCEFEED)
__DOTNET_RUNTIME_FEED_KEY: $(RUNTIME_SOURCEFEED_KEY)
- pwsh: |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,6 @@ jobs:
}
displayName: 'Bootstrap VM'
env:
__DOTNET_RUNTIME_FEED: $(RUNTIME_SOURCEFEED)
__DOTNET_RUNTIME_FEED_KEY: $(RUNTIME_SOURCEFEED_KEY)
- pwsh: |
Expand All @@ -133,7 +132,6 @@ jobs:
}
displayName: 'Package'
env:
__DOTNET_RUNTIME_FEED: $(RUNTIME_SOURCEFEED)
__DOTNET_RUNTIME_FEED_KEY: $(RUNTIME_SOURCEFEED_KEY)
- task: ms.vss-governance-buildtask.governance-build-task-component-detection.ComponentGovernanceComponentDetection@0
Expand Down
2 changes: 0 additions & 2 deletions tools/releaseBuild/azureDevOps/templates/mac.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ jobs:
tools/releaseBuild/macOS/PowerShellPackageVsts.ps1 -location $(PowerShellRoot) -BootStrap
displayName: 'Bootstrap VM'
env:
__DOTNET_RUNTIME_FEED: $(RUNTIME_SOURCEFEED)
__DOTNET_RUNTIME_FEED_KEY: $(RUNTIME_SOURCEFEED_KEY)
- template: /tools/releaseBuild/azureDevOps/templates/insert-nuget-config-azfeed.yml
Expand All @@ -58,7 +57,6 @@ jobs:
$env:AzDevOpsFeedPAT2 = $null
displayName: 'Build'
env:
__DOTNET_RUNTIME_FEED: $(RUNTIME_SOURCEFEED)
__DOTNET_RUNTIME_FEED_KEY: $(RUNTIME_SOURCEFEED_KEY)
- task: ms.vss-governance-buildtask.governance-build-task-component-detection.ComponentGovernanceComponentDetection@0
Expand Down
15 changes: 15 additions & 0 deletions tools/releaseBuild/azureDevOps/templates/nuget-pkg-sbom.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,19 @@ parameters:

steps:

- pwsh: |
$configPath = "$(REPOROOT)/nuget.config"
Import-Module '$(REPOROOT)/build.psm1' -Force
New-NugetConfigFile -NugetFeedUrl $(PSInternalNugetFeed) -UserName $(PSInternalNugetFeedUserName) -ClearTextPAT $(PSInternalNugetFeedPAT) -FeedName AzDevOpsFeed -Destination "$(REPOROOT)"
if(-not (Test-Path $configPath))
{
throw "nuget.config is not created"
}
Get-Content $configPath | Write-Verbose -Verbose
displayName: 'Add nuget.config for Azure DevOps feed for packages'
condition: and(succeededOrFailed(), ne(variables['PSInternalNugetFeed'], ''))

- pwsh: |
Import-Module "$env:REPOROOT/build.psm1" -Force
Start-PSBootstrap
Expand Down Expand Up @@ -81,6 +94,8 @@ steps:
Write-Host "##$vstsCommandString"
displayName: Build reference assemblies
env:
__DOTNET_RUNTIME_FEED_KEY: $(RUNTIME_SOURCEFEED_KEY)

- ${{ each value in parameters.ListOfFiles }}:
- pwsh: |
Expand Down
1 change: 0 additions & 1 deletion tools/releaseBuild/azureDevOps/templates/nuget.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ jobs:
Start-PSBootStrap -Verbose
displayName: Bootstrap
env:
__DOTNET_RUNTIME_FEED: $(RUNTIME_SOURCEFEED)
__DOTNET_RUNTIME_FEED_KEY: $(RUNTIME_SOURCEFEED_KEY)
- task: DownloadBuildArtifacts@0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ jobs:
displayName: Install .NET
env:
__DOTNET_RUNTIME_FEED: $(RUNTIME_SOURCEFEED)
__DOTNET_RUNTIME_FEED_KEY: $(RUNTIME_SOURCEFEED_KEY)
- pwsh: |
Expand All @@ -85,7 +84,6 @@ jobs:
displayName: Install global tool
env:
__DOTNET_RUNTIME_FEED: $(RUNTIME_SOURCEFEED)
__DOTNET_RUNTIME_FEED_KEY: $(RUNTIME_SOURCEFEED_KEY)
- pwsh: |
Expand Down Expand Up @@ -148,5 +146,4 @@ jobs:
}
displayName: Basic validation
env:
__DOTNET_RUNTIME_FEED: $(RUNTIME_SOURCEFEED)
__DOTNET_RUNTIME_FEED_KEY: $(RUNTIME_SOURCEFEED_KEY)
2 changes: 0 additions & 2 deletions tools/releaseBuild/azureDevOps/templates/release-SDKTests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,6 @@ jobs:
displayName: Install .NET
env:
__DOTNET_RUNTIME_FEED: $(RUNTIME_SOURCEFEED)
__DOTNET_RUNTIME_FEED_KEY: $(RUNTIME_SOURCEFEED_KEY)
- pwsh: |
Expand Down Expand Up @@ -136,7 +135,6 @@ jobs:
displayName: Restore and execute tests
env:
__DOTNET_RUNTIME_FEED: $(RUNTIME_SOURCEFEED)
__DOTNET_RUNTIME_FEED_KEY: $(RUNTIME_SOURCEFEED_KEY)
- task: PublishTestResults@2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ jobs:
Write-Verbose -Message "Installing .NET SDK completed." -Verbose
displayName: Install .NET
env:
__DOTNET_RUNTIME_FEED: $(RUNTIME_SOURCEFEED)
__DOTNET_RUNTIME_FEED_KEY: $(RUNTIME_SOURCEFEED_KEY)
- pwsh: |
Expand Down
2 changes: 0 additions & 2 deletions tools/releaseBuild/azureDevOps/templates/testartifacts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ jobs:
Start-PSBootstrap
displayName: Bootstrap
env:
__DOTNET_RUNTIME_FEED: $(RUNTIME_SOURCEFEED)
__DOTNET_RUNTIME_FEED_KEY: $(RUNTIME_SOURCEFEED_KEY)
- pwsh: |
Expand Down Expand Up @@ -86,7 +85,6 @@ jobs:
Start-PSBootstrap
displayName: Bootstrap
env:
__DOTNET_RUNTIME_FEED: $(RUNTIME_SOURCEFEED)
__DOTNET_RUNTIME_FEED_KEY: $(RUNTIME_SOURCEFEED_KEY)
- pwsh: |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ jobs:
tools/releaseBuild/Images/microsoft_powershell_windowsservercore/PowerShellPackage.ps1 -location '$(PowerShellRoot)' -destination '$(Build.ArtifactStagingDirectory)/Symbols_$(Architecture)' -Runtime $runtime -ReleaseTag '$(ReleaseTagVar)' -Symbols @params
displayName: 'Build Windows Universal - $(Architecture)-$(BuildConfiguration) Symbols zip'
env:
__DOTNET_RUNTIME_FEED: $(RUNTIME_SOURCEFEED)
__DOTNET_RUNTIME_FEED_KEY: $(RUNTIME_SOURCEFEED_KEY)
- pwsh: |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,6 @@ jobs:
$(PowerShellRoot)/tools/releaseBuild/Images/microsoft_powershell_windowsservercore/PowerShellPackage.ps1 -BuildZip $signedPkg -location '$(PowerShellRoot)' -destination '$(System.ArtifactsDirectory)\pkgSigned' -Runtime $runtime -ReleaseTag '$(ReleaseTagVar)' @params
displayName: 'Build Windows Universal - $(Architecture) Package'
env:
__DOTNET_RUNTIME_FEED: $(RUNTIME_SOURCEFEED)
__DOTNET_RUNTIME_FEED_KEY: $(RUNTIME_SOURCEFEED_KEY)
- pwsh: |
Expand Down

0 comments on commit 2935bf0

Please sign in to comment.