Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
17 changes: 0 additions & 17 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -344,12 +344,6 @@ jobs:
strategy:
matrix:
${{ each arch in parameters.architectures }}:
Mariner 2.0 ${{ arch.name }}:
pool: ${{ arch.pool }}
artifactName: docker-mariner2.0-${{ arch.value }}
dockerfile: azure-linux.dockerfile
packageArtifactName: rpm-mariner2.0-${{ arch.value }}
image: mcr.microsoft.com/cbl-mariner/base/core:2.0
Azure Linux 3.0 ${{ arch.name }}:
pool: ${{ arch.pool }}
artifactName: docker-azurelinux3.0-${{ arch.value }}
Expand Down Expand Up @@ -394,9 +388,6 @@ jobs:
strategy:
matrix:
${{ each arch in parameters.architectures }}:
Mariner 2.0 ${{ arch.name }}:
pool: ${{ arch.pool }}
artifactName: docker-mariner2.0-${{ arch.value }}
Azure Linux 3.0 ${{ arch.name }}:
pool: ${{ arch.pool }}
artifactName: docker-azurelinux3.0-${{ arch.value }}
Expand Down Expand Up @@ -720,10 +711,6 @@ jobs:
strategy:
matrix:
${{ each arch in parameters.architectures }}:
Mariner 2.0 ${{ arch.name }}:
image: mcr.microsoft.com/cbl-mariner/base/core:2.0
artifact: rpm-mariner2.0-${{ arch.value }}
pool: ${{ arch.pool }}
Azure Linux 3.0 ${{ arch.name }}:
image: mcr.microsoft.com/azurelinux/base/core:3.0
artifact: rpm-azurelinux3.0-${{ arch.value }}
Expand Down Expand Up @@ -770,10 +757,6 @@ jobs:
strategy:
matrix:
${{ each arch in parameters.architectures }}:
Mariner 2.0 ${{ arch.name }}:
image: mcr.microsoft.com/cbl-mariner/base/core:2.0
artifact: rpm-mariner2.0-${{ arch.value }}
pool: ${{ arch.pool }}
Azure Linux 3.0 ${{ arch.name }}:
image: mcr.microsoft.com/azurelinux/base/core:3.0
artifact: rpm-azurelinux3.0-${{ arch.value }}
Expand Down
8 changes: 4 additions & 4 deletions scripts/release/rpm/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ _Fedora:_
docker build --target build-env -f ./scripts/release/rpm/fedora.dockerfile -t azure/azure-cli:fedora29-builder .
```

_Mariner:_
_Azure Linux:_

```bash
docker build --target build-env -f ./scripts/release/rpm/mariner.dockerfile -t azure/azure-cli:mariner-builder .
docker build --target build-env -f ./scripts/release/rpm/azurelinux.dockerfile -t azure/azure-cli:azurelinux-builder .
```

After several minutes, this will have created a Docker image named `azure/azure-cli:centos7-builder` containing an
Expand All @@ -34,9 +34,9 @@ _Fedora:_
docker run azure/azure-cli:fedora29-builder cat /root/rpmbuild/RPMS/x86_64/azure-cli-dev-1.fc29.x86_64.rpm > ./bin/azure-cli-dev-1.fc29.x86_64.rpm
```

_Mariner:_
_Azure Linux:_
```bash
docker run azure/azure-cli:mariner-builder cat /usr/src/mariner/RPMS/x86_64/azure-cli-dev-1.cm1.x86_64.rpm > ./bin/azure-cli-dev-1.cm1.x86_64.rpm
docker run azure/azure-cli:azurelinux-builder cat /usr/src/azl/RPMS/x86_64/azure-cli-dev-1.azl3.x86_64.rpm > ./bin/azure-cli-dev-1.azl3.x86_64.rpm
```

This launches a container running from the image built and tagged by the previous command, prints the contents of the
Expand Down
2 changes: 1 addition & 1 deletion scripts/release/rpm/azure-cli.spec
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ for d in %{buildroot}%{cli_lib_dir}/bin/*; do perl -p -i -e "s#%{buildroot}##g"
# - We also can't use %{_lib}, because %{_lib} expands to different values on difference OSes:
# https://github.com/Azure/azure-cli/pull/20061
# - Fedora/CentOS/RedHat: relative path 'lib64'
# - Mariner: abolute path '/usr/lib'
# - Azure Linux: absolute path '/usr/lib'
# The only solution left is to hard-code 'lib64' as we only release 64-bit RPM packages.
mkdir -p %{buildroot}%{_bindir}
python_version=$(ls %{buildroot}%{cli_lib_dir}/lib/ | head -n 1)
Expand Down
7 changes: 2 additions & 5 deletions scripts/release/rpm/azurelinux.dockerfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
ARG image=mcr.microsoft.com/cbl-mariner/base/core:2.0
ARG image=mcr.microsoft.com/azurelinux/base/core:3.0

FROM ${image} AS build-env
ARG cli_version=dev

RUN tdnf update -y

# kernel-headers, glibc-devel, binutils are needed to install psutil python package on ARM64
# ca-certificates: Mariner by default only adds a very minimal set of root certs to trust certain Microsoft
# ca-certificates: Azure Linux by default only adds a very minimal set of root certs to trust certain Microsoft
# resources (primarily packages.microsoft.com). ca-certificates contains the official Microsoft curated set of
# trusted root certificates. It has replaced the set of Mozilla Trusted Root Certificates.
RUN tdnf install -y binutils file rpm-build gcc libffi-devel python3-devel openssl-devel make diffutils patch \
Expand All @@ -16,9 +16,6 @@ WORKDIR /azure-cli

COPY . .

# Mariner 2.0's python3 is 3.9, the rpm paths are
# /usr/src/mariner/RPMS/x86_64/azure-cli-2.63.0-1.cm2.x86_64.rpm
# /usr/src/mariner/RPMS/aarch64/azure-cli-2.63.0-1.cm2.aarch64.rpm
# Azure Linux 3's python3 is 3.12, the rpm paths are
# /usr/src/azl/RPMS/x86_64/azure-cli-2.63.0-1.azl3.x86_64.rpm
# /usr/src/azl/RPMS/aarch64/azure-cli-2.63.0-1.azl3.aarch64.rpm
Expand Down
2 changes: 1 addition & 1 deletion scripts/release/rpm/pipeline_azurelinux.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ set -exv

: "${BUILD_STAGINGDIRECTORY:?BUILD_STAGINGDIRECTORY environment variable not set.}"

# IMAGE should be Azure Linux docker image url, such as mcr.microsoft.com/cbl-mariner/base/core:2.0
# IMAGE should be Azure Linux docker image url, such as mcr.microsoft.com/azurelinux/base/core:3.0
: "${IMAGE:?IMAGE environment variable not set.}"

CLI_VERSION=`cat src/azure-cli/azure/cli/__main__.py | grep __version__ | sed s/' '//g | sed s/'__version__='// | sed s/\"//g`
Expand Down