Skip to content

Commit

Permalink
sync az.recovery services7.x.x preview with main (#23116)
Browse files Browse the repository at this point in the history
  • Loading branch information
VeryEarly authored Nov 1, 2023
2 parents e7bd382 + db14807 commit 948f782
Show file tree
Hide file tree
Showing 14,854 changed files with 1,897,420 additions and 952,527 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
14 changes: 7 additions & 7 deletions .azure-pipelines/code-gen.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# Variable 'BotAccessToken' was defined in the Variables tab
# 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
parameters:
- name: TargetBranch
Expand All @@ -22,6 +21,7 @@ jobs:
pool: pool-windows-2019
steps:
- checkout: self
- template: util/get-github-pat-steps.yml
- task: NodeTool@0
displayName: Use Node 14.15.5
inputs:
Expand All @@ -31,7 +31,7 @@ jobs:
inputs:
command: custom
verbose: false
customCommand: install -g autorest@latest
customCommand: install -g autorest@latest
- task: PowerShell@2
displayName: Generate
inputs:
Expand Down Expand Up @@ -92,15 +92,15 @@ jobs:
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:$(BotAccessToken)@github.com/Azure/azure-powershell.git;
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
- pwsh: |
$Title = "Migrate ${{ parameters.ServiceName }} from generation to ${{ parameters.TargetBranch }}"
$SourceBranch = "$(Build.SourceBranch)"
$SourceBranch = $SourceBranch.Replace("refs/heads/", "")
$Title = "Migrate ${{ parameters.ServiceName }} from $SourceBranch to ${{ parameters.TargetBranch }}"
$HeadBranch = "codegen/${{ parameters.ServiceName }}"
$BaseBranch = "${{ parameters.TargetBranch }}"
$SourceBranch = "$(Build.SourceBranch)"
$SourceBranch = $BaseBranch.Replace("refs/heads/", "")
$Description = "Migrate ${{ parameters.ServiceName }} from $SourceBranch to ${{ parameters.TargetBranch }}"
./tools/Github/CreatePR.ps1 -Title $Title -HeadBranch $HeadBranch -BaseBranch $BaseBranch -BotAccessToken $(BotAccessToken) -Description $Description
./tools/Github/CreatePR.ps1 -Title $Title -HeadBranch $HeadBranch -BaseBranch $BaseBranch -BotAccessToken $(GithubToken) -Description $Description
displayName: Create PR to main branch
3 changes: 2 additions & 1 deletion .azure-pipelines/code-sign.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,14 @@ jobs:
variables:
LocalRepoName: 'LocalRepo'
steps:
- template: util/get-github-pat-steps.yml
- task: PowerShell@2
displayName: checkout OOBbranch
inputs:
targetType: 'inline'
script: |
if ('${{ parameters.OOBBranch }}' -ne 'none') {
git remote set-url origin https://azure-powershell-bot:$Token@github.com/Azure/azure-powershell.git;
git remote set-url origin https://azure-powershell-bot:$GithubToken@github.com/Azure/azure-powershell.git;
git fetch origin
git checkout -b ${{ parameters.OOBBranch }} origin/${{ parameters.OOBBranch }}
}
Expand Down
4 changes: 2 additions & 2 deletions .azure-pipelines/security-tools.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# Variable 'IsGenerateBased' was defined in the Variables tab
# Variable 'NugetSecurityAnalysisWarningLevel' was defined in the Variables tab
# Variable 'OCTOKITPAT' was defined in the Variables tab
# Cron Schedules have been converted using UTC Time Zone and may need to be updated for your location
schedules:
- cron: 0 4 * * 1,2,3,4,5
Expand All @@ -20,6 +19,7 @@ jobs:
steps:
- checkout: self
fetchTags: false
- template: util/get-github-pat-steps.yml
- task: PowerShell@2
displayName: Install platyPS
inputs:
Expand All @@ -44,7 +44,7 @@ jobs:
targetType: inline
script: dotnet msbuild build.proj /t:"Build;GenerateHelp" /p:"PullRequestNumber=$(System.PullRequest.PullRequestNumber);IsSecurityCheck=true"
env:
OCTOKITPAT: $(OCTOKITPAT)
OCTOKITPAT: $(GithubToken)
- task: securedevelopmentteam.vss-secure-development-tools.build-task-credscan.CredScan@3
displayName: Run CredScan
condition: in(variables['system.pullRequest.targetBranch'], 'generation', 'main')
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion .azure-pipelines/sync-MSdoc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ trigger:
variables:
TargetedRepo: azure-docs-powershell
TargetedBranchName: sync-upcoming-breaking-changes
GithubToken: $(GITHUB_TOKEN)

jobs:
- job: Sync
Expand All @@ -27,6 +26,7 @@ jobs:
BranchName: ${{ variables.TargetedBranchName }}

steps:
- template: util/get-github-pat-steps.yml
- task: PowerShell@2
displayName: Sync branch
inputs:
Expand Down
2 changes: 1 addition & 1 deletion .azure-pipelines/sync-aliases.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Variable 'BotAccessToken', 'KeyVaultName' and 'ADOTokenName' was defined in the Variables tab
# Variable 'KeyVaultName' and 'ADOTokenName' was defined in the Variables tab
schedules:
- cron: "50 15 * * *"
displayName: 11:50 PM (UTC + 8:00) China Daily Run
Expand Down
2 changes: 1 addition & 1 deletion .azure-pipelines/sync-tools-folder.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ trigger:

variables:
GenerationBranchName: generation
GithubToken: $(GITHUB_TOKEN)

jobs:
- job: Sync
Expand All @@ -41,6 +40,7 @@ jobs:
BranchName: ${{ variables.GenerationBranchName }}

steps:
- template: util/get-github-pat-steps.yml
- task: PowerShell@2
displayName: Sync branch
inputs:
Expand Down
5 changes: 3 additions & 2 deletions .azure-pipelines/test-coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ jobs:
vmImage: ${{ parameters.testPoolVMImage }}

steps:
- template: util/get-github-pat-steps.yml
- task: UseDotNet@2
displayName: 'Install .NET 6.0 SDK'
inputs:
Expand Down Expand Up @@ -138,14 +139,14 @@ jobs:
git config user.name "azure-powershell-bot"
git add $blCsv
git commit -m "Update with the latest test coverage data"
git remote set-url origin https://azure-powershell-bot:$(BotAccessToken)@github.com/Azure/azure-powershell.git
git remote set-url origin https://azure-powershell-bot:$(GithubToken)@github.com/Azure/azure-powershell.git
git push origin testcoverage-baseline --force
$title = "Update test coverage baseline"
$headBranch = "testcoverage-baseline"
$targetBranch = "main"
$description = "Update with the latest test coverage baseline data"
./tools/Github/CreatePR.ps1 -Title $title -HeadBranch $headBranch -BaseBranch $targetBranch -BotAccessToken $(BotAccessToken) -Description $description
./tools/Github/CreatePR.ps1 -Title $title -HeadBranch $headBranch -BaseBranch $targetBranch -BotAccessToken $(GithubToken) -Description $description
- task: PublishPipelineArtifact@1
displayName: Publish Test Coverage Result
Expand Down
18 changes: 16 additions & 2 deletions .azure-pipelines/util/analyze-steps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,23 @@ parameters:
IsGenerateBased: ''

steps:
- template: get-github-pat-steps.yml
- template: download-build-steps.yml
parameters:
artifactName: build-${{ parameters.testFramework }}
- task: NodeTool@0
displayName: Install autorest
inputs:
versionSpec: '14.17.1'
command: custom
verbose: false
customCommand: install autorest@latest
- task: PowerShell@2
displayName: Setup environment for autorest
inputs:
targetType: inline
script: "$env:NODE_OPTIONS=\"--max-old-space-size=65536\""
pwsh: true

- task: UseDotNet@2
displayName: 'Use .NET Core sdk 6.0.x'
Expand Down Expand Up @@ -36,7 +50,7 @@ steps:
custom: msbuild
arguments: 'build.proj /t:GenerateHelp /p:Configuration=${{ parameters.configuration }};PullRequestNumber=$(System.PullRequest.PullRequestNumber)'
env:
OCTOKITPAT: $(OCTOKITPAT)
OCTOKITPAT: $(GithubToken)
PowerShellPlatform: ${{ parameters.powerShellPlatform }}

- task: DotNetCoreCLI@2
Expand All @@ -46,7 +60,7 @@ steps:
custom: msbuild
arguments: 'build.proj /t:StaticAnalysis /p:Configuration=${{ parameters.configuration }};PullRequestNumber=$(System.PullRequest.PullRequestNumber)'
env:
OCTOKITPAT: $(OCTOKITPAT)
OCTOKITPAT: $(GithubToken)
IsGenerateBased: ${{ parameters.IsGenerateBased }}

- template: publish-artifacts-steps.yml
Expand Down
3 changes: 2 additions & 1 deletion .azure-pipelines/util/build-steps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ parameters:
powerShellPlatform: ''

steps:
- template: get-github-pat-steps.yml
- task: NodeTool@0
condition: eq(variables.IsGenerateBased, true)
displayName: Install Autorest
Expand Down Expand Up @@ -36,7 +37,7 @@ steps:
custom: msbuild
arguments: 'build.proj /t:Build /p:Configuration=${{ parameters.configuration }};TestFramework=${{ parameters.testFramework }};PullRequestNumber=$(System.PullRequest.PullRequestNumber)'
env:
OCTOKITPAT: $(OCTOKITPAT)
OCTOKITPAT: $(GithubToken)
PowerShellPlatform: ${{ parameters.powerShellPlatform }}

- task: PowerShell@2
Expand Down
10 changes: 10 additions & 0 deletions .azure-pipelines/util/get-github-pat-steps.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
steps:
- task: AzurePowerShell@5
inputs:
azureSubscription: '$(AzureSubscription)'
ScriptType: 'InlineScript'
Inline: |
$GithubToken = Get-AzKeyVaultSecret -VaultName $(GithubPATKeyVaultName) -Name $(GithubPATKeyVaultAccount) -AsPlainText
Write-Host "##vso[task.setvariable variable=GithubToken;issecret=true]$GithubToken"
azurePowerShellVersion: 'LatestVersion'
displayName: Get Github PAT from Key Vault
3 changes: 2 additions & 1 deletion .azure-pipelines/util/test-steps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ parameters:
powerShellPlatform: ''

steps:
- template: get-github-pat-steps.yml
- template: download-build-steps.yml
parameters:
artifactName: build-${{ parameters.testFramework }}
Expand All @@ -30,7 +31,7 @@ steps:
custom: msbuild
arguments: 'build.proj /t:${{ parameters.testTarget }} /p:Configuration=${{ parameters.configuration }};TestFramework=${{ parameters.testFramework }};PullRequestNumber=$(System.PullRequest.PullRequestNumber)'
env:
OCTOKITPAT: $(OCTOKITPAT)
OCTOKITPAT: $(GithubToken)
PowerShellPlatform: ${{ parameters.powerShellPlatform }}
continueOnError: true

Expand Down
1 change: 0 additions & 1 deletion .azure-pipelines/ux-portal.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# Variable 'BotAccessToken' was defined in the Variables tab
# 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
parameters:
- name: AzurePowerShellVersion
Expand Down
15 changes: 15 additions & 0 deletions .ci-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,15 @@
"file-change:module"
]
},
{
"patterns": [
"src/{ModuleName}/*UX/*.json$"
],
"phases": [
"build:module",
"ux:module"
]
},
{
"patterns": [
"src/{ModuleName}/*"
Expand All @@ -132,6 +141,12 @@
"cmdlet-diff:module"
]
},
{
"patterns": [
"tools/StaticAnalysis/Exceptions/{ModuleName}/*"
],
"phases": []
},
{
"patterns": [
"tools/StaticAnalysis/Exceptions/Az.{ModuleName}/MissingAssemblies.csv",
Expand Down
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
/src/Network/ @Joanna-Yang-Art @htippanaboya
/src/Compute/ @bilaakpan-ms @sandido @haagha @grizzlytheodore
/src/PolicyInsights/ @pilor
/src/Batch/ @wiboris @dpwatrous

# Make sure changes to .github folder go through our team's double check
/.github/ @isra-fel
56 changes: 49 additions & 7 deletions .github/ISSUE_TEMPLATE/4-AZ-DOC-BUG.yml
Original file line number Diff line number Diff line change
@@ -1,26 +1,68 @@
name: ✒️ Document issue or question
description: Report document related issue
name: ✒️ Documentation issue or question
description: Report documentation related issue
title: '[Doc]: '
labels: [needs-triage]

body:
- type: markdown
attributes:
value: >
Thanks for reporting. Azure PowerShell document includes 3 categories.
Azure PowerShell documentation includes 3 categories:
- Conceptual doc about Azure PowerShell: https://docs.microsoft.com/en-us/powershell/azure
- Cmdlet reference doc: https://docs.microsoft.com/en-us/powershell/module
- Engineering doc on Github repo: https://github.com/Azure/azure-powershell
- type: textarea
- type: markdown
attributes:
label: Description
description: >
Please describe issue or question about doc. The link of document is helpful for discussion.
value: Select the issue type, and describe the issue in the text box below. Add as much detail as needed to help us resolve the issue.
- type: dropdown
id: issue-type
attributes:
label: Type of issue
options:
- Typo
- Code doesn't work
- Missing information
- Outdated article
- Other (describe below)
validations:
required: true
- type: textarea
id: userfeedback
validations:
required: true
attributes:
label: Feedback
description: >-
If possible, please provide extended details that will add context and help the team update
the documentation. Additional details may not be useful for typos, grammar, formatting, etc.
For technical or factual errors, please include code snippets and output to show how the
documentation is incorrect.
- type: markdown
attributes:
value: Article information
- type: markdown
attributes:
value: "*If the following fields are automatically filled in for you, please don't modify them*"
- type: input
id: pageUrl
attributes:
label: Page URL
- type: input
id: contentSourceUrl
attributes:
label: Content source URL
- type: input
id: author
attributes:
label: Author
description: GitHub Id of the author
- type: input
id: documentVersionIndependentId
attributes:
label: Document Id
- type: markdown
attributes:
value: >
Expand Down
Loading

0 comments on commit 948f782

Please sign in to comment.