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
2 changes: 1 addition & 1 deletion scripts/release/rpm/Dockerfile.centos
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ COPY . .

RUN dos2unix ./scripts/release/rpm/azure-cli.spec && \
REPO_PATH=$(pwd) CLI_VERSION=$cli_version rpmbuild -v -bb --clean scripts/release/rpm/azure-cli.spec && \
cp /root/rpmbuild/RPMS/x86_64/azure-cli-${cli_version}-1.el7.x86_64.rpm /azure-cli-dev.rpm
cp /root/rpmbuild/RPMS/x86_64/azure-cli-${cli_version}-1.*.x86_64.rpm /azure-cli-dev.rpm

FROM centos:${tag} AS execution-env

Expand Down
24 changes: 0 additions & 24 deletions scripts/release/rpm/Dockerfile.centos8

This file was deleted.

2 changes: 1 addition & 1 deletion scripts/release/rpm/azure-cli.spec
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,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\nPYTHONPATH=%{cli_lib_dir}/lib/${python_version}/site-packages ${python_version} -sm azure.cli \"\$@\"" > %{buildroot}%{_bindir}/az
printf "#!/usr/bin/env bash\nPYTHONPATH=%{cli_lib_dir}/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*

# Set up tab completion
Expand Down
23 changes: 0 additions & 23 deletions scripts/release/rpm/pipeline.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,34 +29,11 @@ docker run \
cat /root/rpmbuild/RPMS/x86_64/azure-cli-${CLI_VERSION}-1.el7.x86_64.rpm \
> ${BUILD_STAGINGDIRECTORY}/azure-cli-${CLI_VERSION}-1.el7.x86_64.rpm

# Create a container image that includes the source code and a built RPM using this file for el8.
docker build \
--target build-env \
--build-arg cli_version=${CLI_VERSION} \
-f ./scripts/release/rpm/Dockerfile.centos8 \
-t microsoft/azure-cli:centos8-builder \
.

# Continue the previous build, and create a container that has the current azure-cli build but not the source code for el8.
docker build \
--build-arg cli_version=${CLI_VERSION} \
-f ./scripts/release/rpm/Dockerfile.centos8 \
-t microsoft/azure-cli:centos8 \
.

# Extract the built RPM so that it can be distributed independently for el8.
docker run \
microsoft/azure-cli:centos8-builder \
cat /root/rpmbuild/RPMS/x86_64/azure-cli-${CLI_VERSION}-1.el8.x86_64.rpm \
> ${BUILD_STAGINGDIRECTORY}/azure-cli-${CLI_VERSION}-1.el8.x86_64.rpm

# Save these too a staging directory so that later build phases can choose to save them as Artifacts or publish them to
# a registry.
#
# The products of `docker save` can be rehydrated using `docker load`.
mkdir -p ${BUILD_STAGINGDIRECTORY}/docker
docker save microsoft/azure-cli:centos7-builder | gzip > ${BUILD_STAGINGDIRECTORY}/docker/microsoft_azure-cli_centos7-builder.tar.gz &
docker save microsoft/azure-cli:centos7 | gzip > ${BUILD_STAGINGDIRECTORY}/docker/microsoft_azure-cli_centos7.tar.gz &
docker save microsoft/azure-cli:centos8-builder | gzip > ${BUILD_STAGINGDIRECTORY}/docker/microsoft_azure-cli_centos8-builder.tar.gz &
docker save microsoft/azure-cli:centos8 | gzip > ${BUILD_STAGINGDIRECTORY}/docker/microsoft_azure-cli_centos8.tar.gz &
wait
1 change: 1 addition & 0 deletions src/azure-cli/HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ Release History
**Packaging**

* Rewrite the az wrapper in python
* Use Python 3 for RPM package

**Profile**

Expand Down