Skip to content
Open
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
4 changes: 2 additions & 2 deletions eng/ci/worker-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ resources:

variables:
- template: /eng/templates/utils/byoc-variables.yml@self
- ${{ if or(eq(parameters.V1LibraryRelease, true), eq(parameters.V2LibraryRelease, true)) }}:
- group: azure-functions-python-release
- name: codeql.excludePathPatterns
value: deps/,build/
# Maps the single ReleaseVersion parameter to the worker release, which
Expand Down Expand Up @@ -88,7 +90,6 @@ extends:
projectDisplayName: 'Azure Functions Runtime V2'
releaseBranchPrefix: 'release-v2'
tagPrefix: 'runtimes/v2-'
blobPath: 'azure-functions/python/azure-functions-runtime'
artifactName: 'azure-functions-runtime'
- stage: ReleasePythonV1Library_BumpVersion
dependsOn: []
Expand Down Expand Up @@ -126,5 +127,4 @@ extends:
projectDisplayName: 'Azure Functions Runtime V1'
releaseBranchPrefix: 'release-v1'
tagPrefix: 'runtimes/v1-'
blobPath: 'azure-functions/python/azure-functions-runtime-v1'
artifactName: 'azure-functions-runtime-v1'
124 changes: 21 additions & 103 deletions eng/templates/official/release/publish-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,6 @@ parameters:
type: string
default: ''
displayName: 'Optional prefix for git tags (e.g., runtimes/v2-)'
- name: blobPath
type: string
default: 'azure-functions/python/azure-functions-runtime'
displayName: 'Blob path under drops container'
- name: githubOrg
type: string
default: 'Azure'
Expand All @@ -29,10 +25,15 @@ parameters:
type: string
default: 'azure-functions-runtime'
displayName: 'Pipeline artifact name produced by the Build stage'
- name: partnerReleasePipelineUrl
- name: esrpOwners
type: string
default: '$(EsrpOwners)'
- name: esrpApprovers
type: string
default: '$(EsrpApprovers)'
- name: esrpManualApprovers
type: string
default: 'https://dev.azure.com/azure-sdk/internal/_build?definitionId=6991'
displayName: 'Azure SDK partner-release pipeline URL (used in manual PyPI publish instructions)'
default: '$(EsrpManualApprovers)'

jobs:
- job: "CreateReleaseTag"
Expand Down Expand Up @@ -180,99 +181,16 @@ jobs:
notifyUsers: ''
instructions: 'Please head to https://github.com/${{ parameters.githubOrg }}/${{ parameters.githubRepo }}/releases to finish the release note'

- job: PublishRelease
dependsOn: ['CheckGitHubRelease']
displayName: 'Upload artifacts to partner blob for release'

pool:
name: 1es-pool-azfunc
image: 1es-ubuntu-22.04
os: linux

steps:
- checkout: none

- download: current
artifact: ${{ parameters.artifactName }}
displayName: 'Download build artifacts'

- task: AzurePowerShell@5
displayName: 'Upload files to partner drop folder'
inputs:
azureSubscription: 'azure-sdk-partner-drops'
ScriptType: 'InlineScript'
azurePowerShellVersion: LatestVersion
pwsh: true
Inline: |
$version = '${{ parameters.libraryVersion }}'
$blobPath = '${{ parameters.blobPath }}'
$distFolder = '$(Pipeline.Workspace)/${{ parameters.artifactName }}/dist'

Write-Host "Uploading Python artifacts for version: $version"
Write-Host "Source folder: $distFolder"
Write-Host "Destination: https://azuresdkpartnerdrops.blob.core.windows.net/drops/$blobPath/$version/"

# List files to be uploaded
Get-ChildItem -Path $distFolder -Recurse | ForEach-Object {
Write-Host " - $($_.Name)"
}

# Upload all distribution files (whl and tar.gz) to partner blob
azcopy copy "$distFolder/*" "https://azuresdkpartnerdrops.blob.core.windows.net/drops/$blobPath/$version/"

$blobPathFull = "$blobPath/$version"
$partnerReleaseUrl = '${{ parameters.partnerReleasePipelineUrl }}'

Write-Host ""
Write-Host "##[section]Upload complete. The partner-release pipeline will be triggered automatically in the next job."
Write-Host " BlobPath: $blobPathFull"
Write-Host " Partner pipeline: $partnerReleaseUrl"
env:
AZCOPY_AUTO_LOGIN_TYPE: 'PSCRED'

- job: "TriggerPartnerRelease"
dependsOn: ['PublishRelease']
displayName: 'Trigger partner-release pipeline'

pool:
name: 1es-pool-azfunc
image: 1es-ubuntu-22.04
os: linux

steps:
- checkout: none

- pwsh: |
Write-Host "Target folder: ${{ parameters.blobPath }}/${{ parameters.libraryVersion }}"
Write-Host "Storage container: https://ms.portal.azure.com/#blade/Microsoft_Azure_Storage/ContainerMenuBlade/overview/storageAccountId/%2Fsubscriptions%2Fa18897a6-7e44-457d-9260-f2854c0aca42%2FresourceGroups%2Fazuresdkpartnerdrops%2Fproviders%2FMicrosoft.Storage%2FstorageAccounts%2Fazuresdkpartnerdrops/path/drops"
Write-Host "Partner pipeline: ${{ parameters.partnerReleasePipelineUrl }}"
displayName: 'Log partner pipeline information'

- task: AzureCLI@2
displayName: 'Run partner pipeline for PyPI publish'
inputs:
azureSubscription: 'azure-sdk-partner-drops'
scriptType: pscore
scriptLocation: inlineScript
inlineScript: |
$ErrorActionPreference = "Stop"
$blobPath = "${{ parameters.blobPath }}/${{ parameters.libraryVersion }}"
Write-Host "Running partner pipeline for blob path: $blobPath"

$result = az pipelines run `
--project internal `
--organization https://dev.azure.com/azure-sdk `
--id 6991 `
--branch refs/heads/main `
--parameters "BlobPath=$blobPath"

if (!$result) {
Write-Host "##vso[task.LogIssue type=error;]Failed to start partner pipeline."
exit 1
}

$result = $result | ConvertFrom-Json
Write-Host "##[section]Partner pipeline started successfully."
Write-Host "Build ID: $($result.id)"
Write-Host "Partner pipeline may require manual approval to proceed."
Write-Host "Please check the pipeline at: https://dev.azure.com/azure-sdk/internal/_build/results?buildId=$($result.id)"
- template: /ci/release-pypi-package.yml@eng
parameters:
artifact:
name: ${{ parameters.artifactName }}
packagePath: ''
packageName: ${{ parameters.artifactName }}
packageVersion: ${{ parameters.libraryVersion }}
owners: ${{ parameters.esrpOwners }}
approvers: ${{ parameters.esrpApprovers }}
manualApprovers: ${{ parameters.esrpManualApprovers }}
publishToPyPI: true
dependsOn:
- CheckGitHubRelease
Loading