Skip to content

[DO NOT MERGE] feat: adding az CLI#263

Open
ibuziuk wants to merge 3 commits into
mainfrom
az
Open

[DO NOT MERGE] feat: adding az CLI#263
ibuziuk wants to merge 3 commits into
mainfrom
az

Conversation

@ibuziuk

@ibuziuk ibuziuk commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

Summary by CodeRabbit

  • New Features
    • Added Azure CLI support to the UBI 9 and UBI 10 images on supported architectures.
    • Added Azure CLI Bash tab completion on systems where the Azure CLI is present.
  • Bug Fixes
    • Builds now gracefully skip Azure CLI installation on unsupported architectures instead of failing.
    • Bash completion generation is now resilient and won’t break image builds if completion generation fails.

Signed-off-by: Ilya Buziuk <ibuziuk@redhat.com>
@ibuziuk
ibuziuk requested review from SDawley, dkwon17 and svor as code owners July 24, 2026 12:33
@openshift-ci

openshift-ci Bot commented Jul 24, 2026

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: ibuziuk

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@coderabbitai

coderabbitai Bot commented Jul 24, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 55aecbf4-77a2-42a6-b2ec-22b78943f9d4

📥 Commits

Reviewing files that changed from the base of the PR and between e3072b3 and 73a580e.

📒 Files selected for processing (2)
  • universal/ubi10/Dockerfile
  • universal/ubi9/Dockerfile
🚧 Files skipped from review as they are similar to previous changes (2)
  • universal/ubi9/Dockerfile
  • universal/ubi10/Dockerfile

📝 Walkthrough

Walkthrough

UBI9 and UBI10 now install Azure CLI on supported architectures, skip unsupported architectures, clean package caches, and generate az bash completion when available.

Changes

Azure CLI support

Layer / File(s) Summary
Architecture-aware Azure CLI installation
universal/ubi9/Dockerfile, universal/ubi10/Dockerfile
Build steps configure Microsoft’s RPM repository and install azure-cli on amd64 and arm64, while skipping unsupported architectures and cleaning dnf caches.
Azure CLI bash completion
universal/ubi9/Dockerfile, universal/ubi10/Dockerfile
Completion setup conditionally generates az completion, writes it to /usr/share/bash-completion/completions/az, and warns without failing when generation fails.

Estimated code review effort: 2 (Simple) | ~10 minutes

Sequence Diagram(s)

sequenceDiagram
  participant DockerBuild
  participant MicrosoftRepository
  participant Dnf
  DockerBuild->>MicrosoftRepository: Import RPM key and configure repository
  DockerBuild->>Dnf: Install azure-cli on amd64 or arm64
  DockerBuild->>Dnf: Clean package caches
Loading

Suggested reviewers: svor, dkwon17, sdawley

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly matches the main change by describing the Azure CLI addition.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch az

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@universal/ubi10/Dockerfile`:
- Around line 520-523: Update the Azure CLI installation block to use the RHEL
10 Microsoft signing key before installing the repository package, or remove the
explicit key import if packages-microsoft-prod.rpm reliably installs the newer
key. Ensure the subsequent dnf install of azure-cli uses the RHEL 10 repository
configuration.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 84e403fa-08a3-4dd9-8e1b-9ebe8a3dbbc0

📥 Commits

Reviewing files that changed from the base of the PR and between 131c397 and e3072b3.

📒 Files selected for processing (2)
  • universal/ubi10/Dockerfile
  • universal/ubi9/Dockerfile

Comment on lines +520 to +523
# Azure CLI installation for amd64 and arm64
rpm --import https://packages.microsoft.com/keys/microsoft.asc
dnf install -y https://packages.microsoft.com/config/rhel/10/packages-microsoft-prod.rpm
dnf install -y azure-cli

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🔒 Security & Privacy | 🟡 Minor | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/usr/bin/env bash
set -euo pipefail

for key in \
  https://packages.microsoft.com/keys/microsoft.asc \
  https://packages.microsoft.com/keys/microsoft-2025.asc \
  https://packages.microsoft.com/rhel/10/prod/repodata/repomd.xml.key
do
  echo "== ${key} =="
  curl -fsSL "${key}" | gpg --show-keys --with-colons | awk -F: '$1=="pub" {print}'
done

Repository: devfile/developer-images

Length of output: 291


🏁 Script executed:

#!/usr/bin/env bash
set -euo pipefail

echo "Dockerfile context:"
sed -n '510,530p' universal/ubi10/Dockerfile

echo
echo "Check package availability:"
command -v curl || true
command -v rpm || true
command -v gpg || true

echo
echo "Public key fetch and fingerprint headers without local gpg:"
for key in \
  https://packages.microsoft.com/keys/microsoft.asc \
  https://packages.microsoft.com/keys/microsoft-2025.asc \
  https://packages.microsoft.com/rhel/10/prod/repodata/repomd.xml.key
do
  echo "== ${key} =="
  curl -fsSL "${key}" | od -An -tx1 -N256 | tr -d ' \n' | sed 's/^/'"${key}"': /'
  echo
done

echo
echo "Fetch Microsoft Rhel 10 repo RPM metadata key and inspect with rpm if available:"
rm -f /tmp/microsoft-rhel-10.gpg
curl -fsSL https://packages.microsoft.com/rhel/10/prod/repodata/repomd.xml.key -o /tmp/microsoft-rhel10-repomd.xml.key
if command -v rpm >/dev/null 2>&1; then
  rpm -qip /tmp/microsoft-rhel10-repomd.xml.key 2>/dev/null || true
else
  echo "rpm not available"
fi

Repository: devfile/developer-images

Length of output: 1042


🌐 Web query:

Microsoft Azure CLI RHEL 10 install DNF microsoft.asc microsoft-2025.asc

💡 Result:

To install the Azure CLI on Red Hat Enterprise Linux (RHEL) 10, you must use the Microsoft repository key specifically designated for repositories created after April 2025, which is microsoft-2025.asc [1][2]. As of July 2026, the official installation process involves the following steps [3][4]: 1. Import the correct Microsoft repository GPG key for RHEL 10 [3][4]: sudo rpm --import https://packages.microsoft.com/keys/microsoft-2025.asc 2. Install the Microsoft repository configuration package for RHEL 10 to enable the required package source [3]: sudo dnf install -y https://packages.microsoft.com/config/rhel/10/packages-microsoft-prod.rpm 3. Install the Azure CLI package using dnf [3][4]: sudo dnf install azure-cli Regarding the GPG keys: - microsoft-2025.asc: This is the required key for RHEL 10 repositories [1][2]. It corresponds to the public key fingerprint AA86 F75E 427A 19DD 3334 6403 EE4D 7792 F748 182B [1][2]. - microsoft.asc: This is the original key used for older distributions (e.g., RHEL 9 and earlier) created before May 2025 and should not be used for RHEL 10 [1][2]. Always prefer using the configuration package (packages-microsoft-prod.rpm) from https://packages.microsoft.com/config/rhel/10/ to ensure the repository is configured with the correct GPG key and base URLs automatically [1].

Citations:


🌐 Web query:

packages.microsoft.com github RHEL 10 packages-microsoft-prod RPM GPG key

💡 Result:

RHEL 10 is supported by Microsoft's Linux package repositories [1][2]. Unlike earlier RHEL versions, RHEL 10 requires a newer GPG signing key due to updated security requirements [3][2]. Repository Configuration Microsoft provides a specific repository configuration package for RHEL 10. You can download and install it using the following commands: # Download the RHEL 10 repository configuration package curl -sSL -O https://packages.microsoft.com/config/rhel/10/packages-microsoft-prod.rpm # Install the repository configuration package sudo rpm -i packages-microsoft-prod.rpm GPG Keys for RHEL 10 RHEL 10 packages are signed with a newer Microsoft GPG key (RSA-4096), which is distinct from the older microsoft.asc key used for RHEL 8 and RHEL 9 [3][2]. 1. New RHEL 10 Key: The key for RHEL 10 is typically imported automatically when using the repository configuration package above. If you need to import it manually, it is available at: https://packages.microsoft.com/rhel/10/prod/repodata/repomd.xml.key 2. Legacy Key: The legacy key (microsoft.asc) is still required for certain products (such as Microsoft Edge) that have not yet migrated to the new signing infrastructure [3]. - Legacy Key URL: https://packages.microsoft.com/keys/microsoft.asc - Command: sudo rpm --import https://packages.microsoft.com/keys/microsoft.asc Key Details for Verification - New GPG Public Key (for repositories created after April 2025): - URL: https://packages.microsoft.com/keys/microsoft-2025.asc - Fingerprint: AA86 F75E 427A 19DD 3334 6403 EE4D 7792 F748 182B [4][5] For further details on repository structure, you can browse the official RHEL 10 repository index at https://packages.microsoft.com/rhel/10/prod/ [6].

Citations:


🏁 Script executed:

#!/usr/bin/env bash
set -euo pipefail

echo "Fetch keys with HTTP headers/length:"
for key in \
  https://packages.microsoft.com/keys/microsoft.asc \
  https://packages.microsoft.com/keys/microsoft-2025.asc \
  https://packages.microsoft.com/rhel/10/prod/repodata/repomd.xml.key
do
  echo "== ${key} =="
  (timeout 20 curl -sSIL "${key}" || true | sed -n '1,20p')
  (timeout 20 curl -fsSL "${key}" >/tmp/key.bin 2>/tmp/key.err && wc -c /tmp/key.bin && hexdump -C /tmp/key.bin | sed -n '1,20p') || echo "curl failed: $(cat /tmp/key.err)"
  echo
done

echo "Locate related documentation/config in repo for expected signature keys:"
rg -n "microsoft-(2025|asc)|packages-microsoft-prod|rpm --import|repomd.xml" . || true

Repository: devfile/developer-images

Length of output: 1447


🌐 Web query:

site:learn.microsoft.com/en-us/cli/azure/install-azure-cli-linux pivots=dnf RHEL 10 microsoft.asc microsoft-2025.asc

💡 Result:

For RHEL 10, the correct GPG key to import for Microsoft repositories is microsoft-2025.asc [1]. You should import this key using the following command: sudo rpm --import https://packages.microsoft.com/keys/microsoft-2025.asc The older microsoft.asc key is used for lower versions of RHEL, not RHEL 10 [1]. To add the Microsoft repository for RHEL 10, use the official packages-microsoft-prod.rpm file rather than manual configuration files [1]: sudo dnf install -y https://packages.microsoft.com/config/rhel/10/packages-microsoft-prod.rpm There is no documented usage of a pivots=dnf configuration parameter in standard RHEL 10 dnf repository setups or Microsoft repository installation instructions.

Citations:


Use the RHEL 10 Microsoft signing key.

The Azure CLI RHEL 10 dnf install path imports microsoft.asc, which is the legacy key. Import the RHEL 10 key before installing the Microsoft repo, or omit the explicit import if the packages-microsoft-prod.rpm installs/importing the newer key.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@universal/ubi10/Dockerfile` around lines 520 - 523, Update the Azure CLI
installation block to use the RHEL 10 Microsoft signing key before installing
the repository package, or remove the explicit key import if
packages-microsoft-prod.rpm reliably installs the newer key. Ensure the
subsequent dnf install of azure-cli uses the RHEL 10 repository configuration.

Source: MCP tools

@tolusha

tolusha commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

Hi! I'm che-ai-assistant — I help with your pull requests.

Available commands:

  • /che-ai-assistant generate-che-doc — Generate a documentation PR based on this PR's changes
  • /che-ai-assistant ok-pr-review — Run a comprehensive PR review (summary, code review, deep review, impact analysis)
  • /che-ai-assistant check-pr-test-failures — Analyze failing CI checks, identify root causes, and suggest fixes
  • /che-ai-assistant update-che-e2e-tests — Update Eclipse Che e2e tests
  • /che-ai-assistant claude — Run a free-form instruction on this PR
  • /che-ai-assistant help — Show this help message

ibuziuk added 2 commits July 24, 2026 15:17
Signed-off-by: Ilya Buziuk <ibuziuk@redhat.com>
Signed-off-by: Ilya Buziuk <ibuziuk@redhat.com>
@github-actions

Copy link
Copy Markdown

Pull Request images published ✨

Base: quay.io/devfile/base-developer-image:pr-263
UDI: quay.io/devfile/universal-developer-image:pr-263

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants