Skip to content

Commit 45acb7d

Browse files
dingmeng-xuevidai-msftSandidowyunchi-msazure-powershell-bot
authored
Merge pull request #19722 from Azure/main
* Fixed batch test recording issue (#19706) * Update Compute storage version (#19691) * storage version update * remove now unneeded changes * update the exception file Co-authored-by: wyunchi-ms <[email protected]> * Add a script to create PR from azure pipeline (#19718) * Add script to create pr * update * update * update Co-authored-by: wyunchi-ms <[email protected]> Co-authored-by: Vincent Dai <[email protected]> Co-authored-by: Adam Sandor <[email protected]> Co-authored-by: wyunchi-ms <[email protected]> Co-authored-by: Azure PowerShell <[email protected]>
2 parents 71c638a + 75f843b commit 45acb7d

File tree

6 files changed

+84
-63
lines changed

6 files changed

+84
-63
lines changed

.azure-pipelines/SyncFromMainBranchConfig.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@
88
"build.proj",
99
"src/Az.Test.props",
1010
"src/Az.autorest.hybrid.props",
11-
"src/psm1.props"
11+
"src/psm1.props",
12+
"NuGet.Config"
1213
],
1314
"UnSyncPath": [
1415
".azure-pipelines/SyncFromMainBranchConfig.json"

.azure-pipelines/code-gen.yml

Lines changed: 5 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -97,34 +97,9 @@ jobs:
9797
git push origin codegen/${{ parameters.ServiceName }} --force;
9898
displayName: Create codegen/${{ parameters.ServiceName }} branch
9999
- pwsh: |
100-
$Headers = @{"Accept" = "application/vnd.github+json"; "Authorization" = "Bearer $(BotAccessToken)"}
101-
$PrBody = @'
102-
<!-- DO NOT DELETE THIS TEMPLATE -->
103-
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:**
111-
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)
100+
$Title = "Migrate ${{ parameters.ServiceName }} from generation to ${{ parameters.TargetBranch }}"
101+
$HeadBranch = "codegen/${{ parameters.ServiceName }}"
102+
$BaseBranch = "${{ parameters.TargetBranch }}"
103+
$Description = "Migrate ${{ parameters.ServiceName }} from generation to ${{ parameters.TargetBranch }}"
104+
./tools/Github/CreatePR.ps1 -Title $Title -HeadBranch $HeadBranch -BaseBranch $BaseBranch -BotAccessToken $(BotAccessToken) -Description $Description
130105
displayName: Create PR to main branch

.azure-pipelines/sync-tools-folder.yml

Lines changed: 5 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -40,34 +40,9 @@ jobs:
4040
pwsh: true
4141

4242
- pwsh: |
43-
$Headers = @{"Accept" = "application/vnd.github+json"; "Authorization" = "Bearer $(GithubToken)"}
44-
$PrBody = @'
45-
<!-- DO NOT DELETE THIS TEMPLATE -->
46-
47-
## Description
48-
49-
<!-- 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. -->
50-
51-
## Checklist
52-
53-
- [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:**
54-
55-
* **SHOULD** select appropriate branch. Cmdlets from Autorest.PowerShell should go to [`generation`](https://github.com/Azure/azure-powershell/tree/generation) branch.
56-
* **SHOULD** make the title of PR clear and informative, and in the present imperative tense.
57-
* **SHOULD** update `ChangeLog.md` file(s) appropriately
58-
* For any service, the `ChangeLog.md` file can be found at `src/{{SERVICE}}/{{SERVICE}}/ChangeLog.md`
59-
* 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.
60-
* Should **not** change `ChangeLog.md` if no new release is required, such as fixing test case only.
61-
* **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
62-
* Create new module from scratch
63-
* Create new resource types which are not easy to conform to [Azure PowerShell Design Guidelines](../blob/main/documentation/development-docs/design-guidelines)
64-
* Create new resource type which name doesn't use module name as prefix
65-
* Have design question before implementation
66-
* **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)
67-
* **SHOULD** have proper test coverage for changes in pull request.
68-
* **SHOULD NOT** introduce [breaking changes](../blob/main/documentation/breaking-changes/breaking-changes-definition.md) in Az minor release except preview version.
69-
* **SHOULD NOT** adjust version of module manually in pull request
70-
'@
71-
$RequestBody = @{"title" = "Sync tools code from main branch to generation branch"; "body" = $PrBody; "head" = "syncToolsFolder-generation"; "base" = "generation" }
72-
Invoke-WebRequest -Uri https://api.github.com/repos/Azure/azure-powershell/pulls -method POST -Headers $Headers -Body ($RequestBody | ConvertTo-Json)
43+
$Title = "Sync tools code from main branch to generation branch"
44+
$HeadBranch = "syncToolsFolder-$(BranchName)"
45+
$BaseBranch = "$(BranchName)"
46+
$Description = "Migrate Sync tools code from main branch to $(BranchName) branch"
47+
./tools/Github/CreatePR.ps1 -Title $Title -HeadBranch $HeadBranch -BaseBranch $BaseBranch -BotAccessToken $(GithubToken) -Description $Description
7348
displayName: Create PR to generation branch

src/Compute/Compute.AlcWrapper/Compute.AlcWrapper.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<Project Sdk="Microsoft.NET.Sdk">
1+
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
44
<PsModuleName>Compute</PsModuleName>
@@ -14,7 +14,7 @@
1414
</PropertyGroup>
1515

1616
<ItemGroup>
17-
<PackageReference Include="Azure.Storage.Blobs" Version="12.1.0" />
17+
<PackageReference Include="Azure.Storage.Blobs" Version="12.13.0" />
1818
</ItemGroup>
1919

2020
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory).., build.proj))\src\Az.Post.props" />

tools/Github/CreatePR.ps1

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
# ----------------------------------------------------------------------------------
2+
#
3+
# Copyright Microsoft Corporation
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
# Unless required by applicable law or agreed to in writing, software
9+
# distributed under the License is distributed on an "AS IS" BASIS,
10+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11+
# See the License for the specific language governing permissions and
12+
# limitations under the License.
13+
# ----------------------------------------------------------------------------------
14+
15+
<#
16+
.SYNOPSIS
17+
Create PR to azure-powershell repo
18+
19+
#>
20+
param(
21+
[Parameter(Mandatory = $true)]
22+
[string]$BotAccessToken,
23+
24+
[Parameter(Mandatory = $true)]
25+
[string]$Title,
26+
27+
[Parameter(Mandatory = $true)]
28+
[string]$HeadBranch,
29+
30+
[Parameter(Mandatory = $true)]
31+
[string]$BaseBranch,
32+
33+
[Parameter(Mandatory = $false)]
34+
[string]$Description
35+
)
36+
37+
$Headers = @{"Accept" = "application/vnd.github+json"; "Authorization" = "Bearer $BotAccessToken"}
38+
$PrBody = @"
39+
<!-- DO NOT DELETE THIS TEMPLATE -->
40+
41+
## Description
42+
$Description
43+
44+
<!-- 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. -->
45+
46+
## Checklist
47+
48+
- [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:**
49+
50+
* **SHOULD** select appropriate branch. Cmdlets from Autorest.PowerShell should go to [`generation`](https://github.com/Azure/azure-powershell/tree/generation) branch.
51+
* **SHOULD** make the title of PR clear and informative, and in the present imperative tense.
52+
* **SHOULD** update `ChangeLog.md` file(s) appropriately
53+
* For any service, the `ChangeLog.md` file can be found at `src/{{SERVICE}}/{{SERVICE}}/ChangeLog.md`
54+
* 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.
55+
* Should **not** change `ChangeLog.md` if no new release is required, such as fixing test case only.
56+
* **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
57+
* Create new module from scratch
58+
* Create new resource types which are not easy to conform to [Azure PowerShell Design Guidelines](../blob/main/documentation/development-docs/design-guidelines)
59+
* Create new resource type which name doesn't use module name as prefix
60+
* Have design question before implementation
61+
* **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)
62+
* **SHOULD** have proper test coverage for changes in pull request.
63+
* **SHOULD NOT** introduce [breaking changes](../blob/main/documentation/breaking-changes/breaking-changes-definition.md) in Az minor release except preview version.
64+
* **SHOULD NOT** adjust version of module manually in pull request
65+
"@
66+
$RequestBody = @{"title" = $Title; "body" = $PrBody; "head" = $HeadBranch; "base" = $BaseBranch }
67+
Invoke-WebRequest -Uri https://api.github.com/repos/Azure/azure-powershell/pulls -method POST -Headers $Headers -Body ($RequestBody | ConvertTo-Json)
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
11
"Directory","Assembly Name","Assembly Version","Referencing Assembly","Severity","ProblemId","Description","Remediation"
22
"Az.Compute","Microsoft.Win32.Registry","4.1.1.0","System.Management.Automation","0","3000","Missing assembly Microsoft.Win32.Registry referenced from System.Management.Automation","Ensure that the assembly is included in the Wix file or directory"
33
"Az.Compute","Microsoft.PowerShell.CoreCLR.Eventing","6.1.0.0","System.Management.Automation","0","3000","Missing assembly Microsoft.PowerShell.CoreCLR.Eventing referenced from System.Management.Automation","Ensure that the assembly is included in the Wix file or directory"
4+
"Az.Compute","System.IO.Hashing","6.0.0.0","Azure.Storage.Blobs","0","3000","Missing ALC assembly System.IO.Hashing referenced from Azure.Storage.Blobs","Ensure that the assembly is included in the Wix file or directory"
5+
"Az.Compute","System.Runtime.CompilerServices.Unsafe","4.0.6.0","Azure.Storage.Blobs","0","3000","Missing ALC assembly System.Runtime.CompilerServices.Unsafe referenced from Azure.Storage.Blobs","Ensure that the assembly is included in the Wix file or directory"
6+
"Az.Compute","System.IO.Hashing","6.0.0.0","Azure.Storage.Common","0","3000","Missing ALC assembly System.IO.Hashing referenced from Azure.Storage.Common","Ensure that the assembly is included in the Wix file or directory"

0 commit comments

Comments
 (0)