Skip to content

Commit 6bc9fae

Browse files
committed
Merge branch 'main' into yabo/Az.Monitor-preview-synced
2 parents cf4e048 + 4bf5408 commit 6bc9fae

File tree

2,556 files changed

+381526
-20901
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

2,556 files changed

+381526
-20901
lines changed

.azure-pipelines/code-gen.yml

Lines changed: 76 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,23 @@
1-
# Variable 'BaseBranch' was defined in the Variables tab
21
# Variable 'BotAccessToken' was defined in the Variables tab
3-
# Variable 'ServiceName' was defined in the Variables tab
42
# Multi-job configuration must be converted to matrix strategy: https://docs.microsoft.com/en-us/azure/devops/pipelines/process/phases?view=azure-devops&tabs=yaml#multi-job-configuration
3+
parameters:
4+
- name: TargetBranch
5+
displayName: Branch this module will generated to
6+
type: string
7+
default: main
8+
- name: ServiceName
9+
displayName: Service to generate
10+
type: string
11+
default: null
12+
513
resources:
614
repositories:
715
- repository: self
816
type: git
917
ref: refs/heads/generation
1018
jobs:
1119
- job: Job_1
12-
displayName: 'Service: '
20+
displayName: "Service: ${{ parameters.ServiceName }}"
1321
timeoutInMinutes: 90
1422
pool:
1523
name: pool-windows-2019
@@ -30,67 +38,93 @@ jobs:
3038
inputs:
3139
targetType: inline
3240
script: >-
33-
$subModuleFolders = Get-ChildItem -Directory -Filter *.Autorest
41+
$subModuleFolders = Get-ChildItem -Directory -Filter *.Autorest;
3442
3543
if ($subModuleFolders -eq $null) {
36-
autorest --max-memory-size=8192
44+
autorest --max-memory-size=8192;
3745
} else {
38-
$subModuleFolders | foreach-object { cd $_.FullName; autorest --max-memory-size=8192}
46+
$subModuleFolders | foreach-object { cd $_.FullName; autorest --max-memory-size=8192};
3947
}
40-
pwsh: true
41-
workingDirectory: src/$(ServiceName)/
48+
workingDirectory: src/${{ parameters.ServiceName }}
49+
4250
- task: PowerShell@2
4351
displayName: Build
44-
condition: eq(variables.ServiceSubmoduleName, '')
4552
inputs:
4653
targetType: inline
4754
script: >-
48-
$subModuleFolders = Get-ChildItem -Directory -Filter *.Autorest
55+
$subModuleFolders = Get-ChildItem -Directory -Filter *.Autorest;
4956
5057
if ($subModuleFolders -eq $null) {
51-
./build-module.ps1
58+
./build-module.ps1;
5259
} else {
5360
$subModuleFolders | foreach-object { cd $_.FullName; ./build-module.ps1; cd ..}
5461
}
5562
56-
mkdir ../../artifacts/src/$env:SERVICENAME
63+
mkdir ../../artifacts/src/${{ parameters.ServiceName }};
5764
58-
cp -r ./* ../../artifacts/src/$env:SERVICENAME
65+
cp -r ./* ../../artifacts/src/${{ parameters.ServiceName }};
5966
pwsh: true
60-
workingDirectory: src/$(ServiceName)
67+
workingDirectory: src/${{ parameters.ServiceName }}
6168
- task: PowerShell@2
6269
displayName: Checkout main branch
63-
inputs:
64-
targetType: inline
65-
script: >
66-
mkdir src/$env:SERVICENAME
67-
git checkout src/$env:SERVICENAME
68-
git checkout -b codegen/$env:SERVICENAME origin/$env:BaseBranch
69-
- task: PowerShell@2
70-
displayName: Move code to main
71-
condition: eq(variables.ServiceSubmoduleName, '')
7270
inputs:
7371
targetType: inline
7472
script: >-
75-
#Uninstall-Module -Name PackageManagement -AllVersions
76-
Install-Module -Name PowerShellGet -RequiredVersion 2.2.3 -Force
77-
Install-Module -Name platyPS -RequiredVersion 0.14.2 -Force
78-
Install-Module -Name Az.Accounts -Force
79-
Import-Module .\tools\Gen2Master\MoveFromGeneration2Master.ps1
80-
81-
$subModuleFolders = Get-ChildItem .\artifacts\src\$env:SERVICENAME -Directory -Filter *.Autorest
82-
if ($subModuleFolders -eq $null) {
83-
Move-Generation2Master -SourcePath .\artifacts\src\$env:SERVICENAME -DestPath .\src\$env:SERVICENAME
84-
} else {
85-
Move-Generation2MasterHybrid -SourcePath .\artifacts\src\$env:SERVICENAME -DestPath .\src\$env:SERVICENAME
73+
if ((Test-Path src/${{ parameters.ServiceName }}))
74+
{
75+
rm -r src/${{ parameters.ServiceName }};
8676
}
77+
git checkout src/${{ parameters.ServiceName }};
78+
git checkout -b codegen/${{ parameters.ServiceName }} origin/${{ parameters.TargetBranch }};
79+
- pwsh: |
80+
#Uninstall-Module -Name PackageManagement -AllVersions
81+
Install-Module -Name PowerShellGet -RequiredVersion 2.2.3 -Force;
82+
Install-Module -Name platyPS -RequiredVersion 0.14.2 -Force;
83+
Install-Module -Name Az.Accounts -Force;
84+
Import-Module .\tools\Gen2Master\MoveFromGeneration2Master.ps1;
85+
$subModuleFolders = Get-ChildItem .\artifacts\src\${{ parameters.ServiceName }} -Directory -Filter *.Autorest;
86+
if ($subModuleFolders -eq $null) {
87+
Move-Generation2Master -SourcePath .\artifacts\src\${{ parameters.ServiceName }} -DestPath .\src\${{ parameters.ServiceName }};
88+
} else {
89+
Move-Generation2MasterHybrid -SourcePath .\artifacts\src\${{ parameters.ServiceName }} -DestPath .\src\${{ parameters.ServiceName }};
90+
}
91+
git config user.email "[email protected]";
92+
git config user.name "azure-powershell-bot";
93+
git add ./src;
94+
git add tools/CreateMappings_rules.json;
95+
git commit -m "Move ${{ parameters.ServiceName }} to ${{ parameters.TargetBranch }}";
96+
git remote set-url origin https://azure-powershell-bot:$(BotAccessToken)@github.com/Azure/azure-powershell.git;
97+
git push origin codegen/${{ parameters.ServiceName }} --force;
98+
displayName: Create codegen/${{ parameters.ServiceName }} branch
99+
- pwsh: |
100+
$Headers = @{"Accept" = "application/vnd.github+json"; "Authorization" = "Bearer $(BotAccessToken)"}
101+
$PrBody = @'
102+
<!-- DO NOT DELETE THIS TEMPLATE -->
87103
88-
git config user.email "[email protected]"
89-
git config user.name "azure-powershell-bot"
90-
git add ./src
91-
git add tools/CreateMappings_rules.json
92-
git commit -m "Move $env:SERVICENAME to $env:BaseBranch"
93-
git remote set-url origin https://azure-powershell-bot:$(BotAccessToken)@github.com/Azure/azure-powershell.git
94-
git push origin codegen/$env:SERVICENAME
95-
pwsh: true
104+
## Description
105+
106+
<!-- Please add a brief description of the changes made in this PR. If you have an ongoing or finished cmdlet design, please paste the link below. -->
107+
108+
## Checklist
109+
110+
- [x] Check this box to confirm: **I have read the [_Submitting Changes_](../blob/main/CONTRIBUTING.md#submitting-changes) section of [`CONTRIBUTING.md`](../blob/main/CONTRIBUTING.md) and reviewed the following information:**
96111
112+
* **SHOULD** select appropriate branch. Cmdlets from Autorest.PowerShell should go to [`generation`](https://github.com/Azure/azure-powershell/tree/generation) branch.
113+
* **SHOULD** make the title of PR clear and informative, and in the present imperative tense.
114+
* **SHOULD** update `ChangeLog.md` file(s) appropriately
115+
* For any service, the `ChangeLog.md` file can be found at `src/{{SERVICE}}/{{SERVICE}}/ChangeLog.md`
116+
* A snippet outlining the change(s) made in the PR should be written under the `## Upcoming Release` header in the past tense. Add changelog in description section if PR goes into [`generation`](https://github.com/Azure/azure-powershell/tree/generation) branch.
117+
* Should **not** change `ChangeLog.md` if no new release is required, such as fixing test case only.
118+
* **SHOULD** have approved design review for the changes in [this repository](https://github.com/Azure/azure-powershell-cmdlet-review-pr) ([_Microsoft internal only_](../blob/main/CONTRIBUTING.md#onboarding)) with following situations
119+
* Create new module from scratch
120+
* Create new resource types which are not easy to conform to [Azure PowerShell Design Guidelines](../blob/main/documentation/development-docs/design-guidelines)
121+
* Create new resource type which name doesn't use module name as prefix
122+
* Have design question before implementation
123+
* **SHOULD** regenerate markdown help files if there is cmdlet API change. [Instruction](../blob/main/documentation/development-docs/help-generation.md#updating-all-markdown-files-in-a-module)
124+
* **SHOULD** have proper test coverage for changes in pull request.
125+
* **SHOULD NOT** introduce [breaking changes](../blob/main/documentation/breaking-changes/breaking-changes-definition.md) in Az minor release except preview version.
126+
* **SHOULD NOT** adjust version of module manually in pull request
127+
'@
128+
$RequestBody = @{"title" = "Migrate ${{ parameters.ServiceName }} from generation to ${{ parameters.TargetBranch }}"; "body" = $PrBody; "head" = "codegen/${{ parameters.ServiceName }}"; "base" = "${{ parameters.TargetBranch }}" }
129+
Invoke-WebRequest -Uri https://api.github.com/repos/Azure/azure-powershell/pulls -method POST -Headers $Headers -Body ($RequestBody | ConvertTo-Json)
130+
displayName: Create PR to main branch

.azure-pipelines/daily-build.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ jobs:
8383
FolderPath: 'artifacts'
8484
Pattern: |
8585
Release/**/Microsoft*Azure*PowerShell*Cmdlets*.dll
86+
Release/**/Microsoft.Azure.PowerShell.*.Sdk.dll
8687
Release/**/Az.*.private.dll
8788
Release/**/Microsoft.Azure.PowerShell.Authentication.dll
8889
Release/**/Microsoft.Azure.PowerShell.Authentication.ResourceManager.dll

.azure-pipelines/release-test.yml

Lines changed: 31 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,18 @@ parameters:
1515
displayName: Windows PowerShell Version
1616
type: string
1717
default: 5.1.14
18-
- name: ps6
19-
displayName: PowerShell 6 Version
20-
type: string
21-
default: 6.2.4
2218
- name: ps7
23-
displayName: PowerShell 7 Version
19+
displayName: PowerShell 7.0.x Version
2420
type: string
25-
default: 7.0.3
21+
default: 7.0.8
22+
- name: ps7_1
23+
displayName: PowerShell 7.1.x Version
24+
type: string
25+
default: 7.1.5
26+
- name: ps7_2
27+
displayName: PowerShell 7.2.x Version
28+
type: string
29+
default: 7.2.0
2630
- name: latest_ps
2731
displayName: PowerShell Latest Version
2832
type: string
@@ -40,15 +44,21 @@ jobs:
4044

4145
- template: util/smoke-test-steps.yml
4246
parameters:
43-
name: 'Win_PS6_2_4_SmokeTest'
47+
name: 'Win_PS7_0_X_SmokeTest'
4448
vmImage: ${{ parameters.win_image }}
45-
psVersion: ${{ parameters.ps6 }}
49+
psVersion: ${{ parameters.ps7 }}
4650

4751
- template: util/smoke-test-steps.yml
4852
parameters:
49-
name: 'Win_PS7_0_3_SmokeTest'
53+
name: 'Win_PS7_1_X_SmokeTest'
5054
vmImage: ${{ parameters.win_image }}
51-
psVersion: ${{ parameters.ps7 }}
55+
psVersion: ${{ parameters.ps7_1 }}
56+
57+
- template: util/smoke-test-steps.yml
58+
parameters:
59+
name: 'Win_PS7_2_X_SmokeTest'
60+
vmImage: ${{ parameters.win_image }}
61+
psVersion: ${{ parameters.ps7_2 }}
5262

5363
- template: util/smoke-test-steps.yml
5464
parameters:
@@ -58,33 +68,33 @@ jobs:
5868

5969
- template: util/smoke-test-steps.yml
6070
parameters:
61-
name: 'Linux_PS6_2_4_SmokeTest'
71+
name: 'Linux_PS7_0_X_SmokeTest'
6272
vmImage: ${{ parameters.linux_image }}
63-
psVersion: ${{ parameters.ps6 }}
73+
psVersion: ${{ parameters.ps7 }}
6474

6575
- template: util/smoke-test-steps.yml
6676
parameters:
67-
name: 'Linux_PS7_0_3_SmokeTest'
77+
name: 'Linux_PS7_1_X_SmokeTest'
6878
vmImage: ${{ parameters.linux_image }}
69-
psVersion: ${{ parameters.ps7 }}
79+
psVersion: ${{ parameters.ps7_1 }}
7080

7181
- template: util/smoke-test-steps.yml
7282
parameters:
73-
name: 'Linux_Latest_PS_SmokeTest'
83+
name: 'Linux_PS7_2_X_SmokeTest'
7484
vmImage: ${{ parameters.linux_image }}
75-
psVersion: ${{ parameters.latest_ps }}
85+
psVersion: ${{ parameters.ps7_2 }}
7686

7787
- template: util/smoke-test-steps.yml
7888
parameters:
79-
name: 'MacOS_PS6_2_4_SmokeTest'
80-
vmImage: ${{ parameters.macOS_image }}
81-
psVersion: ${{ parameters.ps6 }}
89+
name: 'Linux_Latest_PS_SmokeTest'
90+
vmImage: ${{ parameters.linux_image }}
91+
psVersion: ${{ parameters.latest_ps }}
8292

8393
- template: util/smoke-test-steps.yml
8494
parameters:
85-
name: 'MacOS_PS7_0_3_SmokeTest'
95+
name: 'MacOS_PS7_2_X_SmokeTest'
8696
vmImage: ${{ parameters.macOS_image }}
87-
psVersion: ${{ parameters.ps7 }}
97+
psVersion: ${{ parameters.ps7_2 }}
8898

8999
- template: util/smoke-test-steps.yml
90100
parameters:

NuGet.Config

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<clear />
55
<!-- Do not add any additional feeds if new packages are needed they need to come from nuget.org or our azure-sdk-for-net DevOps feed -->
66
<add key="local-feed" value="tools/LocalFeed" />
7-
<add key="azure-powershell" value="https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-powershell/nuget/v3/index.json" />
7+
<add key="azure-powershell" value="https://pkgs.dev.azure.com/azclitools/public/_packaging/azure-powershell/nuget/v3/index.json" />
88
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" />
99
</packageSources>
1010
<disabledPackageSources>

0 commit comments

Comments
 (0)