mirror of
https://github.com/PowerShell/PowerShell
synced 2026-06-08 12:12:50 +00:00
This commit is contained in:
@@ -1,9 +1,19 @@
|
||||
trigger: none
|
||||
|
||||
# needed to disable CI trigger and allow manual trigger
|
||||
# when the branch is same as pipline source, the latest build from the source is used.
|
||||
# when the branch is same as pipeline source, the latest build from the source is used.
|
||||
# all environment used are for manual tasks and approvals.
|
||||
|
||||
parameters:
|
||||
- name: skipPackagesMsftComPublish
|
||||
displayName: Skip actual publishing to Packages.microsoft.com, AFTER we upload it. Used to test the publishing script.
|
||||
default: false
|
||||
type: boolean
|
||||
- name: skipNugetPublish
|
||||
displayName: Skip nuget publishing. Used in testing publishing stage.
|
||||
default: false
|
||||
type: boolean
|
||||
|
||||
resources:
|
||||
pipelines:
|
||||
- pipeline: releasePipeline
|
||||
@@ -17,7 +27,7 @@ resources:
|
||||
type: git
|
||||
trigger: none
|
||||
name: Internal-PowerShellTeam-Tools
|
||||
ref: master
|
||||
ref: main-mirror
|
||||
|
||||
variables:
|
||||
- name: runCodesignValidationInjection
|
||||
@@ -340,6 +350,8 @@ stages:
|
||||
|
||||
steps:
|
||||
- template: templates/release-ReleaseToNuGet.yml
|
||||
parameters:
|
||||
skipPublish: ${{ parameters.skipNugetPublish }}
|
||||
|
||||
- job: PublishPkgsMsftCom
|
||||
|
||||
@@ -353,6 +365,8 @@ stages:
|
||||
- group: 'packages.microsoft.com'
|
||||
steps:
|
||||
- template: templates/release-PublishPackageMsftCom.yml
|
||||
parameters:
|
||||
skipPublish: ${{ parameters.skipPackagesMsftComPublish }}
|
||||
|
||||
- stage: PublishSymbols
|
||||
displayName: Publish symbols
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
parameters:
|
||||
- name: skipPublish
|
||||
default: false
|
||||
type: boolean
|
||||
|
||||
steps:
|
||||
- template: release-SetReleaseTagAndContainerName.yml
|
||||
|
||||
@@ -9,19 +14,44 @@ steps:
|
||||
displayName: Set Package version
|
||||
|
||||
- pwsh: |
|
||||
git clone https://$(AzureDevOpsPat)@mscodehub.visualstudio.com/PowerShellCore/_git/Internal-PowerShellTeam-Tools '$(Pipeline.Workspace)/tools'
|
||||
$branch = 'main-mirror'
|
||||
$gitArgs = "clone",
|
||||
"--verbose",
|
||||
"--branch",
|
||||
"$branch",
|
||||
"https://$(AzureDevOpsPat)@mscodehub.visualstudio.com/PowerShellCore/_git/Internal-PowerShellTeam-Tools",
|
||||
'$(Pipeline.Workspace)/tools'
|
||||
$gitArgs | Write-Verbose -Verbose
|
||||
git $gitArgs
|
||||
displayName: Clone Internal-PowerShellTeam-Tools from MSCodeHub
|
||||
|
||||
- task: PipAuthenticate@1
|
||||
inputs:
|
||||
artifactFeeds: 'pmc'
|
||||
pythonDownloadServiceConnections: pmcDownload
|
||||
|
||||
- pwsh: |
|
||||
pip install pmc-cli
|
||||
|
||||
$newPath = (resolve-path '~/.local/bin').providerpath
|
||||
$vstsCommandString = "vso[task.setvariable variable=PATH]${env:PATH}:$newPath"
|
||||
Write-Host "sending " + $vstsCommandString
|
||||
Write-Host "##$vstsCommandString"
|
||||
displayName: Install pmc cli
|
||||
|
||||
- pwsh: |
|
||||
$metadata = Get-Content -Path "$(Build.SourcesDirectory)/tools/metadata.json" -Raw | ConvertFrom-Json
|
||||
Write-Verbose -Verbose "$(ReleaseTag) $(RepoClientCliClientID) $(RepoClientCliSecret) $(AzureVersion) $($metadata.LTSRelease.Latest)"
|
||||
$params = @{
|
||||
ReleaseTag = "$(ReleaseTag)"
|
||||
AadClientId = "$(RepoClientCliClientID)"
|
||||
AadClientSecret = "$(RepoClientCliSecret)"
|
||||
AadClientId = "$(PmcCliClientID)"
|
||||
BlobFolderName = "$(AzureVersion)"
|
||||
LTS = $metadata.LTSRelease.Latest
|
||||
ForProduction = $true
|
||||
SkipPublish = $${{ parameters.skipPublish }}
|
||||
MappingFilePath = '$(System.DefaultWorkingDirectory)/tools/packages.microsoft.com/mapping.json'
|
||||
}
|
||||
& '$(Pipeline.Workspace)/tools/packages.microsoft.com/releaseLinuxPackages.ps1' -MappingFilePath '$(System.DefaultWorkingDirectory)/tools/packages.microsoft.com/mapping.json' @params
|
||||
|
||||
$params | Out-String -width 9999 -Stream | write-Verbose -Verbose
|
||||
|
||||
& '$(Pipeline.Workspace)/tools/packages.microsoft.com-v4/releaseLinuxPackages.ps1' @params
|
||||
displayName: Run release script
|
||||
|
||||
@@ -1,5 +1,11 @@
|
||||
parameters:
|
||||
- name: skipPublish
|
||||
default: false
|
||||
type: boolean
|
||||
|
||||
steps:
|
||||
- task: DownloadPipelineArtifact@2
|
||||
condition: and(eq('${{ parameters.skipPublish }}', 'false'), succeeded())
|
||||
inputs:
|
||||
source: specific
|
||||
project: PowerShellCore
|
||||
@@ -12,6 +18,7 @@ steps:
|
||||
path: '$(Pipeline.Workspace)/releasePipeline/finalResults'
|
||||
|
||||
- task: DownloadPipelineArtifact@2
|
||||
condition: and(eq('${{ parameters.skipPublish }}', 'false'), succeeded())
|
||||
inputs:
|
||||
source: specific
|
||||
project: PowerShellCore
|
||||
@@ -37,9 +44,11 @@ steps:
|
||||
|
||||
Get-ChildItem "$(Pipeline.Workspace)/release" -recurse
|
||||
displayName: Download and capture nupkgs
|
||||
condition: and(eq('${{ parameters.skipPublish }}', 'false'), succeeded())
|
||||
|
||||
- task: NuGetCommand@2
|
||||
displayName: 'NuGet push'
|
||||
condition: and(eq('${{ parameters.skipPublish }}', 'false'), succeeded())
|
||||
inputs:
|
||||
command: push
|
||||
packagesToPush: '$(Pipeline.Workspace)/release/*.nupkg'
|
||||
|
||||
Reference in New Issue
Block a user