Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
b08a6b4
[Service Fabric] Add managed application cli commands (#17404)
LukeSlev Apr 2, 2021
7ec9e7c
{Misc.} Update Track2 status (#17541)
yungezz Apr 2, 2021
29767d7
{Compute} Update description of license_msg (#17427)
BigCat20196 Apr 2, 2021
07595c1
Remove preview for Python 3.9 in Azure Functions (#17546)
stefanushinardi Apr 6, 2021
64847ce
{KeyVault} Fix #17461: Add some examples for 'keyvault/_help.py' (#17…
BigCat20196 Apr 6, 2021
9c8554c
fixing policy create with rgNamePrefix and rgNameSuffix (#17571)
hiaga Apr 6, 2021
bf08c94
{CI} Use `azdev` and `pytest` for full test (#17383)
jiasli Apr 6, 2021
cbd54d5
{Core} Fix test_open_page_in_browser on WSL (#17475)
jiasli Apr 6, 2021
12be822
{Core} Fix: test_credscache_good_error_on_file_corruption fails when …
jiasli Apr 6, 2021
6225ca5
{Role} az ad sp create-for-rbac: Fix "One or more properties contains…
jiasli Apr 6, 2021
8aa6d18
[AppService] Bugfix: Handle if only single publish profile is returne…
calvinsID Apr 7, 2021
753a11c
{Packaging} Unblock installation in customized location for deb and R…
fengzhou-msft Apr 7, 2021
93f45fb
[CDN] Migrate azure-mgmt-cdn to track2 SDK (#17557)
t-bzhan Apr 7, 2021
9191211
{Network}`az network vnet update`: Update help message (#17363)
msyyc Apr 7, 2021
c18dc18
[ACR] 'az acr connected-registry install info/renew-credentials': Pro…
xyxyxyxyxyxy Apr 7, 2021
e695a01
fix handling of return value from netork_profiles.create_or_update() …
markrzasa Apr 7, 2021
c808ba4
Use English spelling of 'accessible' not Latin 😊 (#17534)
RaphHaddad Apr 7, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 22 additions & 5 deletions .azure-pipelines/templates/automation_test.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,16 @@
# Azure DevOps task for automation test using azdev and pytest

parameters:
pythonVersion: ''
profile: ''
- name: pythonVersion
type: string
default: 3.8
- name: profile
type: string
default: latest
- name: fullTest
displayName: 'Run full test?'
type: boolean
default: false

steps:
- task: UsePythonVersion@0
Expand All @@ -13,10 +23,17 @@ steps:

source env/bin/activate

if [[ "$(System.PullRequest.TargetBranch)" != "" ]]; then
azdev test --series --no-exitfirst --repo=./ --src=HEAD --tgt=origin/$(System.PullRequest.TargetBranch) --cli-ci --profile ${{ parameters.profile }}
echo pythonVersion: ${{ parameters.pythonVersion }}
echo profile: ${{ parameters.profile }}
echo fullTest: ${{ parameters.fullTest }}
echo Build.Reason: $(Build.Reason)

if [[ "$(Build.Reason)" == "PullRequest" && "${{ parameters.fullTest }}" == 'False' ]]; then
echo "Running incremental test"
azdev test --no-exitfirst --repo=./ --src=HEAD --tgt=origin/$(System.PullRequest.TargetBranch) --cli-ci --profile ${{ parameters.profile }} --verbose --series
else
azdev test --series --no-exitfirst --profile ${{ parameters.profile }}
echo "Running full test"
azdev test --no-exitfirst --profile ${{ parameters.profile }} --verbose --series
fi
displayName: "Test on Profile ${{ parameters.profile }}"
env:
Expand Down
6 changes: 3 additions & 3 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"name": "Azure CLI Debug (Integrated Console)",
"type": "python",
"request": "launch",
"pythonPath": "${command:python.interpreterPath}",
"python": "${command:python.interpreterPath}",
"program": "${workspaceRoot}/src/azure-cli/azure/cli/__main__.py",
"cwd": "${workspaceRoot}",
"args": [
Expand All @@ -24,7 +24,7 @@
"type": "python",
"request": "launch",
"stopOnEntry": true,
"pythonPath": "${command:python.interpreterPath}",
"python": "${command:python.interpreterPath}",
"program": "${workspaceRoot}/src/azure-cli/azure/cli/__main__.py",
"cwd": "${workspaceRoot}",
"args": [
Expand All @@ -40,7 +40,7 @@
"name": "Azdev Scripts",
"type": "python",
"request": "launch",
"pythonPath": "${command:python.interpreterPath}",
"python": "${command:python.interpreterPath}",
"program": "${workspaceRoot}/tools/automation/__main__.py",
"cwd": "${workspaceRoot}",
"args": [
Expand Down
206 changes: 68 additions & 138 deletions azure-pipelines-full-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,144 +13,74 @@ pr:
- '*'

jobs:
- job: ExtractMetadata
displayName: Extract Metadata
- job: AutomationTest
displayName: Automation Test (Profile Latest)
timeoutInMinutes: 120
pool:
vmImage: 'ubuntu-16.04'
strategy:
matrix:
Python36:
python.version: '3.6'
Python38:
python.version: '3.8'
steps:
- template: .azure-pipelines/templates/automation_test.yml
parameters:
pythonVersion: '$(python.version)'
profile: 'latest'
fullTest: true

condition: succeeded()
pool:
vmImage: 'ubuntu-16.04'
steps:
- task: Bash@3
displayName: 'Extract Version'
inputs:
targetType: 'filePath'
filePath: scripts/release/get_version.sh
- task: PublishPipelineArtifact@0
displayName: 'Publish Artifact: metadata'
inputs:
TargetPath: $(Build.ArtifactStagingDirectory)
ArtifactName: metadata
- job: AutomationTest20200901
displayName: Automation Test (Profile 2020-09-01)
timeoutInMinutes: 120
pool:
vmImage: 'ubuntu-16.04'
strategy:
matrix:
Python36:
python.version: '3.6'
Python38:
python.version: '3.8'
steps:
- template: .azure-pipelines/templates/automation_test.yml
parameters:
pythonVersion: '$(python.version)'
profile: '2020-09-01-hybrid'
fullTest: true

- job: BuildPythonWheel
displayName: Build Python Wheels
dependsOn: ExtractMetadata
condition: succeeded()
pool:
vmImage: 'ubuntu-16.04'
steps:
- task: UsePythonVersion@0
displayName: 'Use Python 3.7'
inputs:
versionSpec: 3.7
- job: AutomationTest20190301
displayName: Automation Test (Profile 2019-03-01)
timeoutInMinutes: 120
pool:
vmImage: 'ubuntu-16.04'
strategy:
matrix:
Python36:
python.version: '3.6'
Python38:
python.version: '3.8'
steps:
- template: .azure-pipelines/templates/automation_test.yml
parameters:
pythonVersion: '$(python.version)'
profile: '2019-03-01-hybrid'
fullTest: true

- script: |
if [[ "$(Build.Reason)" == "PullRequest" ]]; then
branch=$(System.PullRequest.TargetBranch)
else
branch=$(Build.SourceBranchName)
fi
scripts/release/pypi/build.sh $branch
displayName: 'Run Wheel Build Script'

- task: PublishPipelineArtifact@0
displayName: 'Publish Artifact: pypi'
inputs:
TargetPath: $(Build.ArtifactStagingDirectory)
ArtifactName: pypi

- job: AutomationTest
displayName: Automation Test
dependsOn: BuildPythonWheel
condition: succeeded()
timeoutInMinutes: 90

pool:
vmImage: 'ubuntu-16.04'
strategy:
matrix:
Python36:
python.version: '3.6'
Python38:
python.version: '3.8'
steps:
- task: UsePythonVersion@0
displayName: 'Use Python $(python.version)'
inputs:
versionSpec: '$(python.version)'
- task: DownloadPipelineArtifact@1
displayName: 'Download Python Wheels'
inputs:
TargetPath: '$(Build.ArtifactStagingDirectory)/pypi'
artifactName: pypi
- bash: |
pip install --force-reinstall wheel
- task: Bash@3
displayName: 'Run Test Automation'
inputs:
targetType: 'filePath'
filePath: ./scripts/ci/test_automation.sh

- job: RunAutomationReduced20190301
displayName: Run Automation Reduced, Profile 2019-03-01
dependsOn: BuildPythonWheel
condition: succeeded()
pool:
vmImage: 'ubuntu-16.04'
strategy:
matrix:
Python36:
python.version: '3.6'
Python38:
python.version: '3.8'
steps:
- task: UsePythonVersion@0
displayName: 'Use Python $(python.version)'
inputs:
versionSpec: '$(python.version)'
- task: DownloadPipelineArtifact@1
displayName: 'Download Python Wheels'
inputs:
TargetPath: '$(Build.ArtifactStagingDirectory)/pypi'
artifactName: pypi
- bash: |
pip install --force-reinstall wheel
- task: Bash@3
displayName: 'Run Test Automation'
inputs:
targetType: 'filePath'
filePath: ./scripts/ci/test_automation.sh
env:
REDUCE_SDK: 'True'
AZURE_CLI_TEST_TARGET_PROFILE: '2019-03-01'

- job: RunAutomation20180301
displayName: Run Automation, Profile 2018-03-01
dependsOn: BuildPythonWheel
condition: succeeded()
pool:
vmImage: 'ubuntu-16.04'
strategy:
matrix:
Python36:
python.version: '3.6'
Python38:
python.version: '3.8'
steps:
- task: UsePythonVersion@0
displayName: 'Use Python $(python.version)'
inputs:
versionSpec: '$(python.version)'
- task: DownloadPipelineArtifact@1
displayName: 'Download Python Wheels'
inputs:
TargetPath: '$(Build.ArtifactStagingDirectory)/pypi'
artifactName: pypi
- bash: |
pip install --force-reinstall wheel
- task: Bash@3
displayName: 'Run Test Automation'
inputs:
targetType: 'filePath'
filePath: ./scripts/ci/test_automation.sh
env:
AZURE_CLI_TEST_TARGET_PROFILE: '2018-03-01'
- job: AutomationTest20180301
displayName: Automation Test (Profile 2018-03-01)
timeoutInMinutes: 120
pool:
vmImage: 'ubuntu-16.04'
strategy:
matrix:
Python36:
python.version: '3.6'
Python38:
python.version: '3.8'
steps:
- template: .azure-pipelines/templates/automation_test.yml
parameters:
pythonVersion: '$(python.version)'
profile: '2018-03-01-hybrid'
fullTest: true
4 changes: 2 additions & 2 deletions doc/track_2_migration_roadmap.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ This document provides the roadmap for Track 2 SDK migration in Azure CLI. When
| KeyVault | Yes|**Completed** | 04/30/2021 |Catherine||GA (8.0.0) | GA (2.2.0) | Medium (Once three months) | Module |
| Monitor |Yes |**Completed** | 04/30/2021 |Yong||Monitor: GA (2.0.0)<br> LogAnalytics: GA (8.0.0) | Monitor: Preview (0.12.0)<br> LogAnalytics: GA (2.0.0) | Medium (Once two months) | Module |
| Resource | Yes |**Doing** | 04/30/2021 |Yong ||GA (15.0.0) | GA (12.0.0) | Medium (Once two months) | Module |
| AppService | Yes|Not Started | 04/30/2021 |Catherine||GA (1.0.0) | Preview (0.48.0) | Medium (Once three months) | Module |
| AppService | Yes | **In progress** | 04/30/2021 |Catherine||GA (1.0.0) | Preview (0.48.0) | Medium (Once three months) | Module |
| ACS | Yes |Not Started | 04/30/2021 |Catherine||ContainerService: GA (14.0.0)<br> ContainerInstance: GA (7.0.0) | ContainerService: GA (11.0.0)<br> ContainerInstance: GA (2.0.0) | Medium (Once two months) | Module |
| ACR | Yes |Not Started | 04/30/2021 |Catherine||Preview (8.0.0b1) | Preview (3.0.0rc16) | Medium (Once two months) | Module |
| CosmosDB | Yes |**Doing** | 04/30/2021 |Yong||GA (6.0.0) | Preview (2.0.0rc1) | Medium (Once two months) |Module|
Expand All @@ -59,7 +59,7 @@ This document provides the roadmap for Track 2 SDK migration in Azure CLI. When
| Synapse | |Not Started | N/A |||Preview (1.0.0b1) | Preview (0.6.0) | Medium (Once two months) | Module |
| EventHub | |Not Started | N/A |||GA (8.0.0) | GA (4.2.0) | Low (Once a year) | Module |
| Search | |**Completed** | N/A |||GA (8.0.0) | GA (3.0.0) | Low (Once a year) | Module |
| AppConfiguration | |Not Started | N/A |||GA (1.0.1) | Preview (0.6.0) | Medium (Once three months) | Module |
| AppConfiguration | |**Completed** | N/A |||GA (1.0.1) | Preview (0.6.0) | Medium (Once three months) | Module |
| Security | |Not Started | N/A |||GA (1.0.0) | Preview (0.6.0) | Medium (Once three months) | Module |
| Batch | |Not Started | N/A |||GA (14.0.0) | GA (9.0.0) | Low (Once half year) | Module |
| CognitiveServices | |Not Started | N/A ||| GA (11.0.0) | GA (6.3.0) | Low (Once half year) | Module |
Expand Down
57 changes: 0 additions & 57 deletions scripts/ci/test_automation.sh

This file was deleted.

2 changes: 1 addition & 1 deletion scripts/release/debian/prepare.sh
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ override_dh_install:
${TAB}mkdir -p debian/azure-cli/opt/az
${TAB}cp -a python_env/* debian/azure-cli/opt/az
${TAB}mkdir -p debian/azure-cli/usr/bin/
${TAB}echo "\043!/usr/bin/env bash\nAZ_INSTALLER=DEB /opt/az/bin/python3 -Im azure.cli \"\044\100\"" > debian/azure-cli/usr/bin/az
${TAB}echo "\043!/usr/bin/env bash\nbin_dir=\140cd \"\044(dirname \"\044BASH_SOURCE[0]\")\"; pwd\140\nAZ_INSTALLER=DEB \"\044bin_dir\"/../../opt/az/bin/python3 -Im azure.cli \"\044\100\"" > debian/azure-cli/usr/bin/az
${TAB}chmod 0755 debian/azure-cli/usr/bin/az
${TAB}mkdir -p debian/azure-cli/etc/bash_completion.d/
${TAB}cat ${completion_script} > debian/azure-cli/etc/bash_completion.d/azure-cli
Expand Down
4 changes: 3 additions & 1 deletion scripts/release/rpm/azure-cli.spec
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ Release: %{release}
Url: https://docs.microsoft.com/cli/azure/install-azure-cli
BuildArch: x86_64
Requires: %{python_cmd}
Prefix: /usr
Prefix: /etc

BuildRequires: gcc, libffi-devel, openssl-devel, perl
BuildRequires: %{python_cmd}-devel
Expand All @@ -52,7 +54,7 @@ for d in %{buildroot}%{cli_lib_dir}/bin/*; do perl -p -i -e "s#%{buildroot}##g"
# Create executable
mkdir -p %{buildroot}%{_bindir}
python_version=$(ls %{buildroot}%{cli_lib_dir}/lib/ | head -n 1)
printf "#!/usr/bin/env bash\nAZ_INSTALLER=RPM PYTHONPATH=%{cli_lib_dir}/lib/${python_version}/site-packages /usr/bin/%{python_cmd} -sm azure.cli \"\$@\"" > %{buildroot}%{_bindir}/az
printf "#!/usr/bin/env bash\nbin_dir=\`cd \"\$(dirname \"\$BASH_SOURCE[0]\")\"; pwd\`\nAZ_INSTALLER=RPM PYTHONPATH=\"\$bin_dir\"/../%{_lib}/az/lib/${python_version}/site-packages %{python_cmd} -sm azure.cli \"\$@\"" > %{buildroot}%{_bindir}/az
rm %{buildroot}%{cli_lib_dir}/bin/python* %{buildroot}%{cli_lib_dir}/bin/pip*

# Remove unused Network SDK API versions
Expand Down
1 change: 1 addition & 0 deletions src/azure-cli-core/azure/cli/core/_profile.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ def _load_tokens_from_file(file_path):
raise CLIError("Failed to load token files. If you have a repro, please log an issue at "
"https://github.com/Azure/azure-cli/issues. At the same time, you can clean "
"up by running 'az account clear' and then 'az login'. (Inner Error: {})".format(ex))
logger.debug("'%s' is not a file or doesn't exist.", file_path)
return []


Expand Down
Loading