Skip to content

Commit 9c33407

Browse files
committed
merge main
2 parents d8c1524 + 75c984a commit 9c33407

File tree

11,365 files changed

+3230335
-2040187
lines changed

Some content is hidden

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

11,365 files changed

+3230335
-2040187
lines changed

.azure-pipelines/code-gen.yml

Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
# Variable 'BaseBranch' was defined in the Variables tab
2+
# Variable 'BotAccessToken' was defined in the Variables tab
3+
# Variable 'ServiceName' was defined in the Variables tab
4+
# 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
5+
resources:
6+
repositories:
7+
- repository: self
8+
type: git
9+
ref: refs/heads/generation
10+
jobs:
11+
- job: Job_1
12+
displayName: 'Service: '
13+
timeoutInMinutes: 90
14+
pool:
15+
name: pool-windows-2019
16+
steps:
17+
- checkout: self
18+
- task: NodeTool@0
19+
displayName: Use Node 14.15.5
20+
inputs:
21+
versionSpec: 14.15.5
22+
- task: Npm@1
23+
displayName: Install autorest
24+
inputs:
25+
command: custom
26+
verbose: false
27+
customCommand: install -g autorest@latest
28+
- task: PowerShell@2
29+
displayName: Generate
30+
inputs:
31+
targetType: inline
32+
script: >-
33+
$subModuleFolders = Get-ChildItem -Directory -Filter *.Autorest
34+
35+
if ($subModuleFolders -eq $null) {
36+
autorest --max-memory-size=8192
37+
} else {
38+
$subModuleFolders | foreach-object { cd $_.FullName; autorest --max-memory-size=8192}
39+
}
40+
pwsh: true
41+
workingDirectory: src/$(ServiceName)/
42+
- task: PowerShell@2
43+
displayName: Build
44+
condition: eq(variables.ServiceSubmoduleName, '')
45+
inputs:
46+
targetType: inline
47+
script: >-
48+
$subModuleFolders = Get-ChildItem -Directory -Filter *.Autorest
49+
50+
if ($subModuleFolders -eq $null) {
51+
./build-module.ps1
52+
} else {
53+
$subModuleFolders | foreach-object { cd $_.FullName; ./build-module.ps1; cd ..}
54+
}
55+
56+
mkdir ../../artifacts/src/$env:SERVICENAME
57+
58+
cp -r ./* ../../artifacts/src/$env:SERVICENAME
59+
pwsh: true
60+
workingDirectory: src/$(ServiceName)
61+
- task: PowerShell@2
62+
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, '')
72+
inputs:
73+
targetType: inline
74+
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
86+
}
87+
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
96+

.azure-pipelines/daily-build.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,35 @@ jobs:
132132
SessionTimeout: '60'
133133
MaxConcurrency: '50'
134134
MaxRetryAttempts: '5'
135+
136+
- task: EsrpCodeSigning@1
137+
displayName: 'Sign 3rd Party [Strong Name]'
138+
inputs:
139+
ConnectedServiceName: '$(signServiceConnection)'
140+
FolderPath: artifacts
141+
Pattern: 'Release/**/FuzzySharp.dll'
142+
UseMinimatch: true
143+
signConfigType: inlineSignParams
144+
inlineOperation: |
145+
[
146+
{
147+
"KeyCode": "CP-233863-SN",
148+
"OperationCode": "StrongNameSign",
149+
"Parameters": {},
150+
"ToolName": "sign",
151+
"ToolVersion": "1.0"
152+
},
153+
{
154+
"KeyCode": "CP-233863-SN",
155+
"OperationCode": "StrongNameVerify",
156+
"Parameters": {},
157+
"ToolName": "sign",
158+
"ToolVersion": "1.0"
159+
}
160+
]
161+
SessionTimeout: '60'
162+
MaxConcurrency: '50'
163+
MaxRetryAttempts: '5'
135164

136165
- task: DotNetCoreCLI@2
137166
displayName: Publish

.azure-pipelines/security-tools.yml

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
# Variable 'IsGenerateBased' was defined in the Variables tab
2+
# Variable 'NugetSecurityAnalysisWarningLevel' was defined in the Variables tab
3+
# Variable 'OCTOKITPAT' was defined in the Variables tab
4+
# Cron Schedules have been converted using UTC Time Zone and may need to be updated for your location
5+
schedules:
6+
- cron: 0 4 * * 1,2,3,4,5
7+
branches:
8+
include:
9+
- main
10+
resources:
11+
repositories:
12+
- repository: self
13+
type: git
14+
ref: refs/heads/main
15+
jobs:
16+
- job: Job_1
17+
displayName: Main
18+
timeoutInMinutes: 120
19+
pool:
20+
name: pool-windows-2019
21+
steps:
22+
- checkout: self
23+
fetchTags: false
24+
- task: PowerShell@2
25+
displayName: Install platyPS
26+
inputs:
27+
targetType: inline
28+
script: Install-Module platyPS -Force -Confirm:$false -Scope CurrentUser
29+
pwsh: true
30+
- task: NodeTool@0
31+
displayName: Install Node 14.17.1
32+
condition: eq(variables.IsGenerateBased, true)
33+
inputs:
34+
versionSpec: 14.17.1
35+
- task: PowerShell@2
36+
displayName: Install autorest
37+
condition: eq(variables.IsGenerateBased, true)
38+
inputs:
39+
targetType: inline
40+
script: npm install autorest@latest;$env:NODE_OPTIONS="--max-old-space-size=65536"
41+
- task: PowerShell@2
42+
displayName: Build
43+
inputs:
44+
targetType: inline
45+
script: dotnet msbuilc build.proj /t:"Build;GenerateHelp" /p:"PullRequestNumber=$(System.PullRequest.PullRequestNumber);IsSecurityCheck=true"
46+
env:
47+
OCTOKITPAT: $(OCTOKITPAT)
48+
- task: securedevelopmentteam.vss-secure-development-tools.build-task-credscan.CredScan@2
49+
displayName: Run CredScan
50+
condition: in(variables['system.pullRequest.targetBranch'], 'generation', 'main')
51+
inputs:
52+
toolMajorVersion: V2
53+
outputFormat: sarif
54+
scanFolder: SecurityTmp
55+
suppressionsFile: tools/SecurityTools/CredScanSuppressions.json
56+
debugMode: false
57+
folderSuppression: false
58+
- task: PowerShell@2
59+
displayName: Cleanup Build
60+
inputs:
61+
targetType: inline
62+
script: ./tools/CleanupBuild.ps1
63+
pwsh: true
64+
- task: PoliCheck@1
65+
displayName: Run PoliCheck
66+
inputs:
67+
targetArgument: $(Build.SourcesDirectory)/artifacts/Debug
68+
result: $(Build.SourcesDirectory)/artifacts/result/PoliCheck.xml
69+
optionsFTPATH: tools/SecurityTools/PoliCheckFileExtensions.xml
70+
- task: PublishPipelineArtifact@0
71+
displayName: Save artifacts
72+
condition: succeededOrFailed()
73+
inputs:
74+
artifactName: artifacts
75+
targetPath: artifacts
76+
...

.azure-pipelines/util/analyze-steps.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,13 +49,17 @@ steps:
4949
command: custom
5050
custom: msbuild
5151
arguments: 'build.proj /t:GenerateHelp /p:Configuration=${{ parameters.configuration }};PullRequestNumber=$(System.PullRequest.PullRequestNumber)'
52+
env:
53+
OCTOKITPAT: $(OCTOKITPAT)
5254

5355
- task: DotNetCoreCLI@2
5456
displayName: 'Static Analysis'
5557
inputs:
5658
command: custom
5759
custom: msbuild
5860
arguments: 'build.proj /t:StaticAnalysis /p:Configuration=${{ parameters.configuration }};PullRequestNumber=$(System.PullRequest.PullRequestNumber)'
61+
env:
62+
OCTOKITPAT: $(OCTOKITPAT)
5963

6064
- template: publish-artifacts-steps.yml
6165
parameters:

.azure-pipelines/util/build-steps.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,8 @@ steps:
4949
command: custom
5050
custom: msbuild
5151
arguments: 'build.proj /t:Build /p:Configuration=${{ parameters.configuration }};TestFramework=${{ parameters.testFramework }};PullRequestNumber=$(System.PullRequest.PullRequestNumber)'
52+
env:
53+
OCTOKITPAT: $(OCTOKITPAT)
5254

5355
- task: PowerShell@2
5456
displayName: Build-AzPredictor

.azure-pipelines/util/test-steps.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@ steps:
3636
command: custom
3737
custom: msbuild
3838
arguments: 'build.proj /t:${{ parameters.testTarget }} /p:Configuration=${{ parameters.configuration }};TestFramework=${{ parameters.testFramework }};PullRequestNumber=$(System.PullRequest.PullRequestNumber)'
39+
env:
40+
OCTOKITPAT: $(OCTOKITPAT)
3941

4042
- powershell: |
4143
Install-Module -Name Pester -RequiredVersion 4.10.1 -Force -SkipPublisherCheck

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
## Description
44

5-
<!-- Please add a brief description of the changes made in this PR -->
5+
<!-- 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. -->
66

77
## Checklist
88

@@ -15,11 +15,11 @@
1515
* 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.
1616
* Should **not** change `ChangeLog.md` if no new release is required, such as fixing test case only.
1717
* **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
18-
* Create new module from the scratch
18+
* Create new module from scratch
1919
* Create new resource types which are not easy to conform to [Azure PowerShell Design Guidelines](../blob/main/documentation/development-docs/design-guidelines)
2020
* Create new resource type which name doesn't use module name as prefix
2121
* Have design question before implementation
2222
* **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)
2323
* **SHOULD** have proper test coverage for changes in pull request.
2424
* **SHOULD NOT** introduce [breaking changes](../blob/main/documentation/breaking-changes/breaking-changes-definition.md) in Az minor release except preview version.
25-
* **SHOULD NOT** change version of module in pull request
25+
* **SHOULD NOT** adjust version of module manually in pull request

0 commit comments

Comments
 (0)