Skip to content

Commit 90d05b0

Browse files
author
azurepowershell
committed
Sync tools folder from main branch to generation branch
1 parent ddb9343 commit 90d05b0

File tree

3 files changed

+55
-38
lines changed

3 files changed

+55
-38
lines changed

.azure-pipelines/code-gen.yml

Lines changed: 26 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -75,36 +75,30 @@ jobs:
7575
}
7676
git checkout src/${{ parameters.ServiceName }};
7777
git checkout -b codegen/${{ parameters.ServiceName }} origin/${{ parameters.TargetBranch }};
78-
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;
7992
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-
- task: PowerShell@2
97-
displayName: Create PR to main branch
98-
inputs:
99-
targetType: inline
100-
script: >-
101-
$SourceBranch = "$(Build.SourceBranch)"
102-
$SourceBranch = $SourceBranch.Replace("refs/heads/", "")
103-
$Title = "Migrate ${{ parameters.ServiceName }} from $SourceBranch to ${{ parameters.TargetBranch }}"
104-
$HeadBranch = "codegen/${{ parameters.ServiceName }}"
105-
$BaseBranch = "${{ parameters.TargetBranch }}"
106-
$Description = "Migrate ${{ parameters.ServiceName }} from $SourceBranch to ${{ parameters.TargetBranch }}
107-
The last commit of src/${{ parameters.ServiceName }} in $SourceBranch is:
108-
$(git log -1 origin/$SourceBranch -- ./src/${{ parameters.ServiceName }})
109-
"
110-
./tools/Github/CreatePR.ps1 -Title $Title -HeadBranch $HeadBranch -BaseBranch $BaseBranch -BotAccessToken $(GithubToken) -Description $Description
93+
- pwsh: |
94+
$SourceBranch = "$(Build.SourceBranch)"
95+
$SourceBranch = $SourceBranch.Replace("refs/heads/", "")
96+
$Title = "Migrate ${{ parameters.ServiceName }} from $SourceBranch to ${{ parameters.TargetBranch }}"
97+
$HeadBranch = "codegen/${{ parameters.ServiceName }}"
98+
$BaseBranch = "${{ parameters.TargetBranch }}"
99+
$Description = "Migrate ${{ parameters.ServiceName }} from $SourceBranch to ${{ parameters.TargetBranch }}
100+
The last commit of src/${{ parameters.ServiceName }} in $SourceBranch is:
101+
$(git log -1 origin/$SourceBranch -- ./src/${{ parameters.ServiceName }})
102+
"
103+
./tools/Github/CreatePR.ps1 -Title $Title -HeadBranch $HeadBranch -BaseBranch $BaseBranch -BotAccessToken $(GithubToken) -Description $Description
104+
displayName: Create PR to main branch

.azure-pipelines/code-oob.yml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ stages:
7474
``````
7575
- Install the latest Az.Accounts module unless the OOB build requires a specific version.
7676
``````powershell
77-
Install-Module Az.Accounts -Repository PSGallery
77+
Install-Module Az.Accounts -Repository PSGallery
7878
``````
7979
- Use Az.Tools.Installer to install the OOB build.
8080
``````powershell
@@ -118,7 +118,6 @@ stages:
118118
displayName: Create PR to main branch
119119
condition: and(succeeded(), eq(variables['NeedBumpUp'], 'true'))
120120

121-
122121
- task: PowerShell@2
123122
displayName: publish oob tools
124123
inputs:
@@ -127,6 +126,13 @@ stages:
127126
Copy-Item .\tools\ModulePublisher.psd1 -Destination OOB
128127
Copy-Item .\tools\ModulePublisher.psm1 -Destination OOB
129128
Copy-Item .\tools\NuGet.exe -Destination OOB
129+
130+
- task: ManifestGeneratorTask@0
131+
displayName: 'Generation Task'
132+
inputs:
133+
PackageName: 'Azure PowerShell - ${{ parameters.ServiceName }}'
134+
BuildDropPath: '$(System.ArtifactsDirectory)/OOB'
135+
130136
- task: PublishBuildArtifacts@1
131137
inputs:
132138
PathtoPublish: OOB
@@ -172,4 +178,4 @@ stages:
172178
$moduleName = $jsonObject.ModuleName
173179
$context = New-AzStorageContext -StorageAccountName "$(TestStorageAccountName)"
174180
$package = Get-Item "$(System.ArtifactsDirectory)/artifacts/Az.$moduleName.$versionNumber.nupkg"
175-
$package | Set-AzStorageBlobContent -Container "public" -Context $context -Force
181+
$package | Set-AzStorageBlobContent -Container "public" -Context $context -Force

.github/policies/resourceManagement.yml

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2861,7 +2861,9 @@ configuration:
28612861
then:
28622862
- mentionUsers:
28632863
mentionees:
2864-
- fwsuppgithub
2864+
- gopimsft
2865+
- gimotwanMSFT
2866+
- avripintoms
28652867
replyTemplate: Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc ${mentionees}.
28662868
assignMentionees: False
28672869
- if:
@@ -3028,6 +3030,22 @@ configuration:
30283030
- vpngwsuppgithub
30293031
replyTemplate: Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc ${mentionees}.
30303032
assignMentionees: False
3033+
- if:
3034+
- or:
3035+
- labelAdded:
3036+
label: Service Attention
3037+
- labelAdded:
3038+
label: Nginx
3039+
- hasLabel:
3040+
label: Service Attention
3041+
- hasLabel:
3042+
label: Nginx
3043+
then:
3044+
- mentionUsers:
3045+
mentionees:
3046+
- limingu
3047+
replyTemplate: Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc ${mentionees}.
3048+
assignMentionees: False
30313049
- if:
30323050
- or:
30333051
- labelAdded:
@@ -3175,8 +3193,7 @@ configuration:
31753193
then:
31763194
- mentionUsers:
31773195
mentionees:
3178-
- pvrk
3179-
- adityabalaji-msft
3196+
- Daya-Patil
31803197
replyTemplate: Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc ${mentionees}.
31813198
assignMentionees: False
31823199
- if:

0 commit comments

Comments
 (0)