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

Appearance settings
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 16 additions & 2 deletions 18 tools/releaseBuild/azureDevOps/releasePipeline.yml
Original file line number Diff line number Diff line change
@@ -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.
Comment thread
TravisEz13 marked this conversation as resolved.
# 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
Expand All @@ -17,7 +27,7 @@ resources:
type: git
trigger: none
name: Internal-PowerShellTeam-Tools
ref: master
ref: main-mirror

variables:
- name: runCodesignValidationInjection
Expand Down Expand Up @@ -340,6 +350,8 @@ stages:

steps:
- template: templates/release-ReleaseToNuGet.yml
parameters:
skipPublish: ${{ parameters.skipNugetPublish }}

- job: PublishPkgsMsftCom

Expand All @@ -353,6 +365,8 @@ stages:
- group: 'packages.microsoft.com'
steps:
- template: templates/release-PublishPackageMsftCom.yml
parameters:
skipPublish: ${{ parameters.skipPackagesMsftComPublish }}

- stage: PublishSymbols
displayName: Publish symbols
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
parameters:
- name: skipPublish
default: false
type: boolean

steps:
- template: release-SetReleaseTagAndContainerName.yml

Expand All @@ -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
Comment thread
TravisEz13 marked this conversation as resolved.

- 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 }}
Comment thread
TravisEz13 marked this conversation as resolved.
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
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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
Expand All @@ -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'
Expand Down
Morty Proxy This is a proxified and sanitized view of the page, visit original site.