-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Sync tools folder from main branch to generation branch (#23868)
Co-authored-by: azurepowershell <[email protected]>
- Loading branch information
1 parent
ddb9343
commit 585a25f
Showing
3 changed files
with
55 additions
and
38 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 |
---|---|---|
|
@@ -75,36 +75,30 @@ jobs: | |
} | ||
git checkout src/${{ parameters.ServiceName }}; | ||
git checkout -b codegen/${{ parameters.ServiceName }} origin/${{ parameters.TargetBranch }}; | ||
- task: [email protected] | ||
- pwsh: | | ||
#Uninstall-Module -Name PackageManagement -AllVersions | ||
Install-Module -Name PowerShellGet -RequiredVersion 2.2.3 -Force; | ||
Install-Module -Name platyPS -RequiredVersion 0.14.2 -Force; | ||
Install-Module -Name Az.Accounts -Force; | ||
Import-Module .\tools\Gen2Master\MoveFromGeneration2Master.ps1; | ||
Move-Generation2Master -SourcePath .\artifacts\src\${{ parameters.ServiceName }} -DestPath .\src\${{ parameters.ServiceName }}; | ||
git config user.email "[email protected]"; | ||
git config user.name "azure-powershell-bot"; | ||
git add ./src; | ||
git add tools/CreateMappings_rules.json; | ||
git commit -m "Move ${{ parameters.ServiceName }} to ${{ parameters.TargetBranch }}"; | ||
git remote set-url origin https://azure-powershell-bot:$(GithubToken)@github.com/Azure/azure-powershell.git; | ||
git push origin codegen/${{ parameters.ServiceName }} --force; | ||
displayName: Create codegen/${{ parameters.ServiceName }} branch | ||
inputs: | ||
targetType: inline | ||
script: >- | ||
#Uninstall-Module -Name PackageManagement -AllVersions | ||
Install-Module -Name PowerShellGet -RequiredVersion 2.2.3 -Force; | ||
Install-Module -Name platyPS -RequiredVersion 0.14.2 -Force; | ||
Install-Module -Name Az.Accounts -Force; | ||
Import-Module .\tools\Gen2Master\MoveFromGeneration2Master.ps1; | ||
Move-Generation2Master -SourcePath .\artifacts\src\${{ parameters.ServiceName }} -DestPath .\src\${{ parameters.ServiceName }}; | ||
git config user.email "[email protected]"; | ||
git config user.name "azure-powershell-bot"; | ||
git add ./src; | ||
git add tools/CreateMappings_rules.json; | ||
git commit -m "Move ${{ parameters.ServiceName }} to ${{ parameters.TargetBranch }}"; | ||
git remote set-url origin https://azure-powershell-bot:$(GithubToken)@github.com/Azure/azure-powershell.git; | ||
git push origin codegen/${{ parameters.ServiceName }} --force; | ||
- task: PowerShell@2 | ||
displayName: Create PR to main branch | ||
inputs: | ||
targetType: inline | ||
script: >- | ||
$SourceBranch = "$(Build.SourceBranch)" | ||
$SourceBranch = $SourceBranch.Replace("refs/heads/", "") | ||
$Title = "Migrate ${{ parameters.ServiceName }} from $SourceBranch to ${{ parameters.TargetBranch }}" | ||
$HeadBranch = "codegen/${{ parameters.ServiceName }}" | ||
$BaseBranch = "${{ parameters.TargetBranch }}" | ||
$Description = "Migrate ${{ parameters.ServiceName }} from $SourceBranch to ${{ parameters.TargetBranch }} | ||
The last commit of src/${{ parameters.ServiceName }} in $SourceBranch is: | ||
$(git log -1 origin/$SourceBranch -- ./src/${{ parameters.ServiceName }}) | ||
" | ||
./tools/Github/CreatePR.ps1 -Title $Title -HeadBranch $HeadBranch -BaseBranch $BaseBranch -BotAccessToken $(GithubToken) -Description $Description | ||
- pwsh: | | ||
$SourceBranch = "$(Build.SourceBranch)" | ||
$SourceBranch = $SourceBranch.Replace("refs/heads/", "") | ||
$Title = "Migrate ${{ parameters.ServiceName }} from $SourceBranch to ${{ parameters.TargetBranch }}" | ||
$HeadBranch = "codegen/${{ parameters.ServiceName }}" | ||
$BaseBranch = "${{ parameters.TargetBranch }}" | ||
$Description = "Migrate ${{ parameters.ServiceName }} from $SourceBranch to ${{ parameters.TargetBranch }} | ||
The last commit of src/${{ parameters.ServiceName }} in $SourceBranch is: | ||
$(git log -1 origin/$SourceBranch -- ./src/${{ parameters.ServiceName }}) | ||
" | ||
./tools/Github/CreatePR.ps1 -Title $Title -HeadBranch $HeadBranch -BaseBranch $BaseBranch -BotAccessToken $(GithubToken) -Description $Description | ||
displayName: Create PR to main branch |
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
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