Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 20 additions & 16 deletions .azure-pipelines/code-gen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,21 +75,25 @@ jobs:
}
git checkout src/${{ parameters.ServiceName }};
git checkout -b codegen/${{ parameters.ServiceName }} origin/${{ parameters.TargetBranch }};
- 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
- task: PowerShell@2
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;
arguments: '-RequiredPsVersion $(PSVersion)'
- pwsh: |
$SourceBranch = "$(Build.SourceBranch)"
$SourceBranch = $SourceBranch.Replace("refs/heads/", "")
Expand All @@ -101,4 +105,4 @@ jobs:
$(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
displayName: Create PR to main branch
2 changes: 1 addition & 1 deletion .azure-pipelines/code-sign.yml
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ jobs:
inputs:
command: custom
custom: msbuild
arguments: 'build.proj /t:Publish /p:Configuration=Release;NuGetKey=$(NuGetKey);GenerateDocumentationFile=false'
arguments: 'build.proj /t:Publish /p:Configuration=Release;NuGetKey=$(NuGetKey);GenerateDocumentationFile=false;TargetModule=${{ parameters.TargetModule }}'

- pwsh: |
#this task won't be triggered unless $AzureStack was set to true
Expand Down
54 changes: 51 additions & 3 deletions .github/policies/resourceManagement.yml
Original file line number Diff line number Diff line change
Expand Up @@ -430,6 +430,22 @@ configuration:
- Azure/deployments-owners
replyTemplate: Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc ${mentionees}.
assignMentionees: False
- if:
- or:
- labelAdded:
label: Service Attention
- labelAdded:
label: arm-bicep
- hasLabel:
label: Service Attention
- hasLabel:
label: arm-bicep
then:
- mentionUsers:
mentionees:
- Azure/deployments-owners
replyTemplate: Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc ${mentionees}.
assignMentionees: False
- if:
- or:
- labelAdded:
Expand Down Expand Up @@ -692,6 +708,22 @@ configuration:
- maertendMSFT
replyTemplate: Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc ${mentionees}.
assignMentionees: False
- if:
- or:
- labelAdded:
label: Service Attention
- labelAdded:
label: CloudService
- hasLabel:
label: Service Attention
- hasLabel:
label: CloudService
then:
- mentionUsers:
mentionees:
- bberera
replyTemplate: Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc ${mentionees}.
assignMentionees: False
- if:
- or:
- labelAdded:
Expand Down Expand Up @@ -2031,7 +2063,7 @@ configuration:
then:
- mentionUsers:
mentionees:
- Elsie4ever
- Elsie4ever,MohinderAtwal
replyTemplate: Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc ${mentionees}.
assignMentionees: False
- if:
Expand Down Expand Up @@ -2197,7 +2229,7 @@ configuration:
then:
- mentionUsers:
mentionees:
- varunkch (Azure Cli route to zhoxing-ms)
- RamyaElangovanP
replyTemplate: Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc ${mentionees}.
assignMentionees: False
- if:
Expand Down Expand Up @@ -3327,7 +3359,7 @@ configuration:
then:
- mentionUsers:
mentionees:
- chiragg4u
- venu-l
replyTemplate: Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc ${mentionees}.
assignMentionees: False
- if:
Expand Down Expand Up @@ -3628,6 +3660,22 @@ configuration:
- azureSQLGitHub
replyTemplate: Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc ${mentionees}.
assignMentionees: False
- if:
- or:
- labelAdded:
label: Service Attention
- labelAdded:
label: StackHCIVM
- hasLabel:
label: Service Attention
- hasLabel:
label: StackHCIVM
then:
- mentionUsers:
mentionees:
- arc-enabled-vms-on-hci Team
replyTemplate: Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc ${mentionees}.
assignMentionees: False
- if:
- or:
- labelAdded:
Expand Down
4 changes: 2 additions & 2 deletions build.proj
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@
<!-- Flags -->
<CodeSign Condition ="'$(CodeSign)' == ''">false</CodeSign>
<SkipHelp Condition ="'$(SkipHelp)' != 'true'">false</SkipHelp>
<TargetBuild Condition="Exists($(TargetModule))">true</TargetBuild>
<TargetBuild Condition="!Exists($(TargetModule))">false</TargetBuild>
<TargetBuild Condition="'$(TargetModule)' != ''">true</TargetBuild>
<TargetBuild Condition="'$(TargetModule)' == ''">false</TargetBuild>


<!-- Set this true only if you want to test the CodeSign workflow locally -->
Expand Down
1 change: 1 addition & 0 deletions tools/AzPreview/AzPreview.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ RequiredModules = @(@{ModuleName = 'Az.Accounts'; ModuleVersion = '2.15.1'; },
@{ModuleName = 'Az.Cdn'; RequiredVersion = '3.1.1'; },
@{ModuleName = 'Az.ChangeAnalysis'; RequiredVersion = '0.1.0'; },
@{ModuleName = 'Az.CloudService'; RequiredVersion = '2.0.0'; },
@{ModuleName = 'Az.CodeSigning'; RequiredVersion = '0.1.0'; },
@{ModuleName = 'Az.CognitiveServices'; RequiredVersion = '1.14.1'; },
@{ModuleName = 'Az.Communication'; RequiredVersion = '0.2.0'; },
@{ModuleName = 'Az.Compute'; RequiredVersion = '7.1.1'; },
Expand Down
4 changes: 4 additions & 0 deletions tools/CreateMappings_rules.json
Original file line number Diff line number Diff line change
Expand Up @@ -863,5 +863,9 @@
{
"module": "ManagedNetworkFabric",
"alias": "Managed Network Fabric"
},
{
"module": "CodeSigning",
"alias": "Code Signing"
}
]
10 changes: 8 additions & 2 deletions tools/Gen2Master/MoveFromGeneration2Master.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,12 @@ Function Move-Generation2Master {

process {
#Region Handle the module whoes folder is a subfolder of the module folder.
$ModuleName = $SourcePath.Replace('/', '\').Split('\src\')[1].Split('\')[0]
if (-not (Test-Path -Path $SourcePath)) {
Write-Error "The source path $SourcePath does not exist." -ForegroundColor Red
return
}
$SourceFolder = Get-Item -Path $SourcePath
$ModuleName = $SourceFolder.Name

$DestParentPath = $DestPath
While ("" -ne $DestParentPath) {
Expand All @@ -43,6 +48,7 @@ Function Move-Generation2Master {
New-Item "$DestPath\$ModuleName\help" -ItemType Directory
Update-MappingJson $ModuleName
}
$DestPath = (Get-Item -Path $DestPath).FullName
$Dir2Copy = @{
'custom' = 'custom'
'examples' = 'examples'
Expand All @@ -68,7 +74,7 @@ Function Move-Generation2Master {
$Psd1Metadata = Import-LocalizedData -BaseDirectory "$PSScriptRoot/Templates" -FileName "Module.psd1"
}
foreach ($submoduleDir in $submoduleDirs) {
$psd1File = Get-ChildItem -Filter *.psd1 -File -Path $submoduleDir
$psd1File = Get-ChildItem -Filter *.psd1 -File -Path $submoduleDir.FullName
write-host ("psd1 file name {0}" -f $psd1File.Name)
$submoduleName = $psd1File.Name.Split('.')[-2]
Foreach ($Dir in $Dir2Copy.GetEnumerator()) {
Expand Down