Skip to content

Commit a0b9d7c

Browse files
authored
Merge branch 'Azure:dev' into dev
2 parents 46154c3 + 919923c commit a0b9d7c

File tree

493 files changed

+599573
-575721
lines changed

Some content is hidden

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

493 files changed

+599573
-575721
lines changed

.azure-pipelines/sync-alias.yml

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,14 @@ resources:
1414
type: git
1515
name: internal.wiki
1616

17+
variables:
18+
- template: ${{ variables.Pipeline.Workspace }}/.azure-pipelines/templates/variables.yml
19+
1720
jobs:
1821
- job: UpdateYaml
1922
displayName: Update resourceManagement.yml
20-
pool: pool-windows-2019
23+
pool:
24+
name: ${{ variables.windows_pool }}
2125
uses:
2226
repositories:
2327
- ServiceContactList
@@ -71,14 +75,14 @@ jobs:
7175
git add .github/policies
7276
git commit -m "Sync resourceManagement.yml"
7377
74-
git remote set-url origin https://azclibot:$(GithubToken)@github.com/Azure/azure-cli.git;
75-
git push origin "sync_alias_$env:Build_BuildId" --force
78+
git remote add azclibot https://azclibot:$(GithubToken)@github.com/azclibot/azure-cli.git
79+
git push azclibot "sync_alias_$env:Build_BuildId" --force
7680
displayName: Git commit and push
7781
condition: and(succeeded(), eq(variables['ChangesDetected'], 'true'))
7882
7983
- pwsh: |
8084
$Title = "{CI} Sync resourceManagement.yml according To ADO Wiki Page - Service Contact List"
81-
$HeadBranch = "sync_alias_$env:Build_BuildId"
85+
$HeadBranch = "azclibot:sync_alias_$env:Build_BuildId"
8286
$BaseBranch = "dev"
8387
$Description = "This PR synchronizes the task: 'Triage issues to the service team' part of resourceManagement.yml from table of Service Contact List in ADO wiki page"
8488
@@ -88,5 +92,5 @@ jobs:
8892
8993
Invoke-WebRequest -Uri $Uri -Method POST -Headers $Headers -Body ($RequestBody | ConvertTo-Json)
9094
91-
displayName: Create PR to dev branch
95+
displayName: Create PR to azure/azure-cli dev branch
9296
condition: and(succeeded(), eq(variables['ChangesDetected'], 'true'))
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
variables:
2-
ubuntu_pool: 'pool-ubuntu-2004'
3-
ubuntu_multi_core_pool: 'pool-ubuntu-2004-multi-core'
2+
ubuntu_pool: 'pool-ubuntu-2204'
3+
ubuntu_multi_core_pool: 'pool-ubuntu-latest-multi-core'
44
windows_pool: 'pool-windows-2019'
55
ubuntu_arm64_pool: 'ubuntu-arm64-2004-pool'
66
macos_pool: 'macOS-14'

.github/workflows/TriggerReferenceDocsCI.yml

Lines changed: 9 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -25,56 +25,24 @@ jobs:
2525
env:
2626
AdoOrg: ${{secrets.ADO_DocsReference_Organization}}
2727
AdoProject: ${{secrets.ADO_DocsReference_Project}}
28-
AdoPipelineId: ${{secrets.ADO_DocsReference_JumpPipeline_ID}}
29-
CheckInterval: 60
28+
AdoLatestPipelineId: ${{secrets.ADO_DocsReference_Latest_Pipeline_ID}}
29+
AdoLtsPipelineId: ${{secrets.ADO_DocsReference_LTS_Pipeline_ID}}
30+
ReleaseBranch: ${{ github.event.release.target_commitish }}
3031
run: |
3132
$organization = $env:AdoOrg
3233
$project = $env:AdoProject
33-
$definitionId = $env:AdoPipelineId
34-
$checkInterval = $env:CheckInterval
34+
$thisRepoLink = "${{ github.server_url }}/${{ github.repository }}"
3535
$thisRunLink = "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
36-
$triggerBranch = 'main'
37-
$variables = @('commitAuthor=azcli', 'triggerFromRepo=https://github.com/Azure/azure-cli', "triggerBranch=$triggerBranch", "triggerByPipeline=$thisRunLink")
36+
$triggerBranch = $env:ReleaseBranch
37+
$definitionId = $triggerBranch -eq 'release' ? $env:AdoLatestPipelineId : $env:AdoLtsPipelineId
38+
$variables = @("triggerBranch=$triggerBranch", "triggerFromRepo=$thisRepoLink", "triggerByPipeline=$thisRunLink")
3839
3940
$output = az pipelines build queue --definition-id $definitionId --project $project --organization $organization --variables @variables | ConvertFrom-Json -AsHashtable
4041
if ($? -eq $false)
4142
{
4243
$pipelineDefinitionLink = $organization + [uri]::EscapeDataString($project) + "/_build?definitionId=$definitionId"
4344
Write-Error "Failed to queue the pipeline run for $pipelineDefinitionLink, please check above error message."
4445
}
45-
$runIdInJumpPipeline = $output.id
46-
Write-Host "runIdInJumpPipeline: $runIdInJumpPipeline"
47-
do
48-
{
49-
Start-Sleep -Seconds $checkInterval
50-
$status = az pipelines runs show --query status --id $runIdInJumpPipeline --project $project --organization $organization --output tsv
51-
$currentTime = (Get-Date -AsUTC).ToString('yyyy-MM-dd HH:mm:ss')
52-
Write-Host "[UTC $currentTime] apidrop shared jump pipeline run status: $status"
53-
} while ($status -ne 'completed')
54-
$jumpOutput = az pipelines runs show --id $runIdInJumpPipeline --project $project --organization $organization | ConvertFrom-Json -AsHashtable
55-
56-
$targetPipelineResult = ($jumpOutput.tags -Match 'jump_return_result_(canceled|failed|partiallySucceeded|succeeded)')[0] -replace 'jump_return_result_', ''
57-
$runId = ($jumpOutput.tags -Match 'jump_return_id_\d+')[0] -replace 'jump_return_id_', ''
58-
$triggeredTargetPipeline = $runId ? $true : $false
59-
if ($triggeredTargetPipeline)
60-
{
61-
# apidrop shared jump pipeline triggered target pipeline
62-
$printMessage = 'Triggered reference pipeline run'
63-
$printMessage += $targetPipelineResult ? " with its result $targetPipelineResult" : '' # waited for completion or not
64-
}
65-
else
66-
{
67-
# apidrop shared jump pipeline may fail to trigger target pipeline
68-
$runId = $runIdInJumpPipeline
69-
$printMessage = "Jump pipeline run with $($jumpOutput.result) state may fail to trigger reference pipeline"
70-
}
46+
$runId = $output.id
7147
$runLink = $organization + [uri]::EscapeDataString($project) + "/_build/results?buildId=$runId"
72-
$printMessage += ", for details please check: $runLink"
73-
if ($triggeredTargetPipeline)
74-
{
75-
Write-Host $printMessage
76-
}
77-
else
78-
{
79-
Write-Error $printMessage
80-
}
48+
Write-Host "Triggered reference pipeline run, for details please check: $runLink"

azure-pipelines.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ parameters:
2727
default:
2828
- name: AMD64
2929
value: amd64
30-
pool: pool-ubuntu-2004-multi-core
30+
pool: pool-ubuntu-latest-multi-core
3131
- name: ARM64
3232
value: arm64
3333
pool: ubuntu-arm64-2004-pool

doc/how_to_bump_SDK_version_in_cli.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

33
This article aims to provide a guide for CLI developers and contributors to bump SDK version in Azure CLI.
44

5+
## Prerequisites
6+
7+
We assume the [swagger](https://github.com/Azure/azure-rest-api-specs) has been updated and the related Python SDK has been generated.
8+
59
## Overview
610

711
Developers need to do several things for bumping version:
@@ -52,6 +56,7 @@ For scenario b, variables `PACKAGE`, `TARGET_PACKAGE_VERSION`, `RESOURCE_TYPE` a
5256
- TARGET_PACKAGE_VERSION: The SDK new version, e.g., `19.3.0`. **Required for scenario b**. Leave it as empty for scenario a.
5357
- RESOURCE_TYPE: The resource type enum name define in [CLI Core](https://github.com/Azure/azure-cli/blob/ce74ae358b51aedfdfb6c32042b515d949618e33/src/azure-cli-core/azure/cli/core/profiles/_shared.py#L38), e.g., `MGMT_NETWORK`. Required if you want to update the API version definition in CLI Core. Usually used for multi-API SDKs. Leave it as empty for scenario a.
5458
- TARGET_API_VERSION: The new API version(s):
59+
- Leave this variable as empty if the SDK contains single target API version, else
5560
- If the AZURE_API_PROFILES['latest'][RESOURCE_TYPE] definition is `str` type, then just fulfill this variable with new API version. For example, to update API version for [ResourceType.MGMT_NETWORK](https://github.com/Azure/azure-cli/blob/ce74ae358b51aedfdfb6c32042b515d949618e33/src/azure-cli-core/azure/cli/core/profiles/_shared.py#L150), use `2021-10-01` as variable value.
5661
- If the AZURE_API_PROFILES['latest'][RESOURCE_TYPE] definition is `SDKProfile` type, then fulfill this variable with 'operation=version' pairs separated by space. For example, to update API version for [ResourceType.MGMT_COMPUTE](https://github.com/Azure/azure-cli/blob/ce74ae358b51aedfdfb6c32042b515d949618e33/src/azure-cli-core/azure/cli/core/profiles/_shared.py#L151-L164), use `default=2022-05-01 snapshots=2022-03-01 gallery_images=2021-12-01` as variable value. `default` means other operations except for explicitly listed ones.
5762

0 commit comments

Comments
 (0)