-
Notifications
You must be signed in to change notification settings - Fork 866
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Test branch cleanup for release pipeline (#4894)
* Fix paths filter. Add stage for test release branch cleanup * Fix condition * Fix cleanup stage * Disable sign param temporarily * Move stage earlier in the pipeline * Fix * Fix * Fix * Fix * Fix * Fix * Fix * Small tweak * Fix * Fix * Re-enable sign parameter * Fix dryrun * Fix dryrun * Remove logs
- Loading branch information
1 parent
842df8d
commit 85c4030
Showing
2 changed files
with
65 additions
and
18 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 |
---|---|---|
@@ -1,6 +1,18 @@ | ||
# This Yaml Document has been converted by ESAI Yaml Pipeline Conversion Tool. | ||
|
||
trigger: | ||
branches: | ||
include: | ||
- '*' | ||
paths: | ||
include: | ||
- release | ||
- .azure-pipelines | ||
- .vsts.release.yml | ||
|
||
pr: | ||
branches: | ||
include: | ||
- '*' | ||
paths: | ||
include: | ||
- release | ||
|
@@ -344,15 +356,43 @@ extends: | |
displayName: Delete test agent release from Github | ||
condition: and(succeeded(), eq(variables.IsTestRun, 'True')) | ||
# Clean up test release branch | ||
- stage: Cleanup_Release_Branch | ||
displayName: Cleanup Release Branch | ||
dependsOn: | ||
- Verify_release | ||
- Create_Release_Branch | ||
- Release | ||
condition: always() | ||
jobs: | ||
- job: Delete_Release_Branch | ||
displayName: Delete Release Branch | ||
variables: | ||
IsTestRun: $[ stageDependencies.Verify_release.Set_variables.outputs['SetReleaseVariables.isTestRun'] ] | ||
condition: eq(variables.IsTestRun, 'True') | ||
|
||
pool: | ||
name: 1ES-ABTT-Shared-Pool | ||
image: abtt-ubuntu-2204 | ||
os: linux | ||
steps: | ||
- checkout: self | ||
|
||
- powershell: | | ||
git config --global user.email "[email protected]" | ||
git config --global user.name "azure-pipelines-bot" | ||
git status | ||
git -c credential.helper='!f() { echo "username=pat"; echo "password=$(GithubToken)"; };f' push origin --delete $(ReleaseBranch) | ||
git push --delete origin v$(AgentVersion) | ||
$testBranch = "releases/3.000.999" | ||
$testTag = "v3.000.999" | ||
if (git ls-remote --heads origin $testBranch) { | ||
git -c credential.helper='!f() { echo "username=pat"; echo "password=$(GithubToken)"; };f' push origin --delete $testBranch | ||
} | ||
if (git ls-remote --tags origin $testTag) { | ||
git -c credential.helper='!f() { echo "username=pat"; echo "password=$(GithubToken)"; };f' push --delete origin $testTag | ||
} | ||
displayName: Clean up test release branch | ||
condition: and(succeeded(), eq(variables.IsTestRun, 'True')) | ||
- stage: CreatePRs | ||
dependsOn: | ||
|
@@ -395,7 +435,7 @@ extends: | |
cd release | ||
npm install | ||
ls | ||
node createAdoPrs.js $(AgentVersion) --dryrun=$(IsTestRun) | ||
node createAdoPrs.js $(AgentVersion) --dryrun="$(IsTestRun)" | ||
name: s_CreateAdoPrs | ||
displayName: Create PRs in AzureDevOps and ConfigChange | ||
env: | ||
|
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