-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[PatchRelease] Create a new pipeline to prepare patch release (#41766)
- Loading branch information
Showing
2 changed files
with
56 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
# This script is used to prepare the patch release by generating patches for automatic releases. | ||
# It should be triggered manually by the release driver. Release driver should ensure that the CI pipeline is green | ||
# before manually trigger the patch release pipeline, 'java - patch-release'. | ||
# The release driver should also ensure that the patches are generated successfully and the PR is created successfully. | ||
# | ||
# What this script does: | ||
# - Checks out a new release branch, 'release/patch/$currentDate' | ||
# - Runs the script to generate patches for automatic releases | ||
# - Create a PR with the patches prepared | ||
|
||
trigger: none | ||
pr: none | ||
|
||
parameters: | ||
- name: TestPipeline | ||
type: boolean | ||
default: false | ||
|
||
stages: | ||
- stage: PreparePatchRelease | ||
displayName: Prepare Patch Release | ||
jobs: | ||
- job: PreparePatchRelease | ||
displayName: 'Prepare Patch Release' | ||
timeoutInMinutes: 30 | ||
pool: | ||
name: azsdk-pool-mms-ubuntu-2004-general | ||
image: azsdk-pool-mms-ubuntu-2004-1espt | ||
os: linux | ||
steps: | ||
# Checkout a new release branch | ||
- pwsh: | | ||
$currentDate = Get-Date -Format "yyyyMMdd" | ||
$branchName = "release/patch/$currentDate" | ||
Write-Host "git checkout main" | ||
git checkout main | ||
Write-Host "git checkout -b $branchName" | ||
git checkout -b $branchName | ||
workingDirectory: $(Build.SourcesDirectory) | ||
displayName: 'Create release branch' | ||
# Run the script to generate patches for automatic releases | ||
- task: PowerShell@2 | ||
displayName: 'Run Generate-Patches-For-Automatic-Releases script' | ||
inputs: | ||
pwsh: true | ||
filePath: eng/scripts/Generate-Patches-For-Automatic-Releases.ps1 | ||
arguments: > | ||
-SourcesDirectory . | ||
-PackagesYmlPath eng/pipelines/patch-release.yml | ||
# Create a PR with the patches prepared | ||
- template: /eng/common/pipelines/templates/steps/create-pull-request.yml | ||
parameters: | ||
PRBranchName: prepare-patch-release-$(Build.BuildId) | ||
CommitMsg: "Patch release preparation" | ||
PRTitle: "Prepare patch release" | ||
CloseAfterOpenForTesting: '${{ parameters.TestPipeline }}' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters