@@ -75,21 +75,25 @@ jobs:
7575 }
7676 git checkout src/${{ parameters.ServiceName }};
7777 git checkout -b codegen/${{ parameters.ServiceName }} origin/${{ parameters.TargetBranch }};
78- - pwsh : |
79- #Uninstall-Module -Name PackageManagement -AllVersions
80- Install-Module -Name PowerShellGet -RequiredVersion 2.2.3 -Force;
81- Install-Module -Name platyPS -RequiredVersion 0.14.2 -Force;
82- Install-Module -Name Az.Accounts -Force;
83- Import-Module .\tools\Gen2Master\MoveFromGeneration2Master.ps1;
84- Move-Generation2Master -SourcePath .\artifacts\src\${{ parameters.ServiceName }} -DestPath .\src\${{ parameters.ServiceName }};
85- git config user.email "[email protected] "; 86- git config user.name "azure-powershell-bot";
87- git add ./src;
88- git add tools/CreateMappings_rules.json;
89- git commit -m "Move ${{ parameters.ServiceName }} to ${{ parameters.TargetBranch }}";
90- git remote set-url origin https://azure-powershell-bot:$(GithubToken)@github.com/Azure/azure-powershell.git;
91- git push origin codegen/${{ parameters.ServiceName }} --force;
92- displayName: Create codegen/${{ parameters.ServiceName }} branch
78+ - task : PowerShell@2
79+ displayName : ' Create codegen/${{ parameters.ServiceName }} branch'
80+ inputs :
81+ targetType : ' inline'
82+ script : |
83+ #Uninstall-Module -Name PackageManagement -AllVersions;
84+ Install-Module -Name PowerShellGet -RequiredVersion 2.2.3 -Force;
85+ Install-Module -Name platyPS -RequiredVersion 0.14.2 -Force;
86+ Install-Module -Name Az.Accounts -Force;
87+ Import-Module .\tools\Gen2Master\MoveFromGeneration2Master.ps1;
88+ Move-Generation2Master -SourcePath .\artifacts\src\${{ parameters.ServiceName }} -DestPath .\src\${{ parameters.ServiceName }};
89+ git config user.email "[email protected] "; 90+ git config user.name "azure-powershell-bot";
91+ git add src;
92+ git add tools/CreateMappings_rules.json;
93+ git commit -m "Move ${{ parameters.ServiceName }} to ${{ parameters.TargetBranch }}";
94+ git remote set-url origin https://azure-powershell-bot:$(GithubToken)@github.com/Azure/azure-powershell.git;
95+ git push origin codegen/${{ parameters.ServiceName }} --force;
96+ arguments : ' -RequiredPsVersion $(PSVersion)'
9397 - pwsh : |
9498 $SourceBranch = "$(Build.SourceBranch)"
9599 $SourceBranch = $SourceBranch.Replace("refs/heads/", "")
@@ -101,4 +105,4 @@ jobs:
101105 $(git log -1 origin/$SourceBranch -- ./src/${{ parameters.ServiceName }})
102106 "
103107 ./tools/Github/CreatePR.ps1 -Title $Title -HeadBranch $HeadBranch -BaseBranch $BaseBranch -BotAccessToken $(GithubToken) -Description $Description
104- displayName: Create PR to main branch
108+ displayName: Create PR to main branch
0 commit comments