Skip to content

Conversation

@YanaXu
Copy link

@YanaXu YanaXu commented Oct 23, 2025

Related command

Description

Testing Guide

History Notes

[Component Name 1] BREAKING CHANGE: az command a: Make some customer-facing breaking change
[Component Name 2] az command b: Add some customer-facing feature


This checklist is used to make sure that common guidelines for a pull request are followed.

@azure-client-tools-bot-prd
Copy link

Validation for Azure CLI Full Test Starting...

Thanks for your contribution!

@azure-client-tools-bot-prd
Copy link

Hi @YanaXu,
Since the current milestone time is less than 7 days, this pr will be reviewed in the next milestone.

@azure-client-tools-bot-prd
Copy link

Validation for Breaking Change Starting...

Thanks for your contribution!

@yonzhan
Copy link
Collaborator

yonzhan commented Oct 23, 2025

Thank you for your contribution! We will review the pull request and get back to you soon.

@github-actions
Copy link

The git hooks are available for azure-cli and azure-cli-extensions repos. They could help you run required checks before creating the PR.

Please sync the latest code with latest dev branch (for azure-cli) or main branch (for azure-cli-extensions).
After that please run the following commands to enable git hooks:

pip install azdev --upgrade
azdev setup -c <your azure-cli repo path> -r <your azure-cli-extensions repo path>

script: |
export COPA_EXPERIMENTAL=1
export IMAGE=$(AzCliImageName):$(AzCliImageTag)
copa patch -i $IMAGE -r trivy-scan-before.json --pkg-types os,library --library-patch-level ${{parameters.PatchLevel}} --tag $(AzCliImagePatchedTag)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any doc for these options?

@YanaXu YanaXu marked this pull request as ready for review October 23, 2025 06:35
@YanaXu YanaXu requested a review from calvinhzy as a code owner October 23, 2025 06:35
Copilot AI review requested due to automatic review settings October 23, 2025 06:35
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds a CI pipeline to build and test Docker images with Copa (Container Patching) support. The pipeline builds Azure CLI Docker images, patches them using Copa to address vulnerabilities, and validates both original and patched images through comprehensive testing.

Key changes:

  • Adds Copa patching pipeline with multi-architecture support (AMD64/ARM64)
  • Implements smoke and unit testing framework for Docker images
  • Adds command-line argument support to test scripts for conditional RPM installation

Reviewed Changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
.azure-pipelines/test-with-copa.yml Main pipeline orchestrating build, Copa patching, and testing stages
.azure-pipelines/templates/test-docker-image-smoke.yml Template for smoke testing Docker images with Azure CLI commands
.azure-pipelines/templates/test-docker-image-unit.yml Template for unit testing Docker images
scripts/release/rpm/test_azurelinux_in_docker.sh Updated to support optional RPM installation via command-line flag
scripts/release/docker/test_az_cli_in_pipeline.sh Test script that executes and validates Azure CLI commands
scripts/release/docker/az_cli_commands.sh Collection of Azure CLI commands for smoke testing

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

set -exv

# Parse command line arguments
InstallRPM=true # Default value
Copy link

Copilot AI Oct 23, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Variable name should use snake_case instead of CamelCase. Rename 'InstallRPM' to 'install_rpm'.

Copilot uses AI. Check for mistakes.
Comment on lines +10 to +11
--InstallRPM)
InstallRPM="$2"
Copy link

Copilot AI Oct 23, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Parameter and variable names should use snake_case. Rename '--InstallRPM' to '--install-rpm' and 'InstallRPM' to 'install_rpm' for consistency with bash naming conventions.

Copilot uses AI. Check for mistakes.

# Set output file with timestamp
OUTPUT_FILE="/test/azure_cli_test_output.log"
OUTPUT_FILE_Result="/test/azure_cli_test_result.csv"
Copy link

Copilot AI Oct 23, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Variable name mixes snake_case and CamelCase. Rename 'OUTPUT_FILE_Result' to 'OUTPUT_FILE_RESULT' for consistency with constant naming conventions.

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Auto-Assign Auto assign by bot CI CI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants