Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

{Packaging} Fix CI job "Test Yum Package" by using centos7 #21207

Merged
merged 3 commits into from
Feb 7, 2022
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
7 changes: 4 additions & 3 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -743,9 +743,10 @@ jobs:
YUM_FILE=$SYSTEM_ARTIFACTSDIRECTORY/yum/$YUM_NAME

echo "== Test yum package on CentOS =="

docker pull centos:centos8
docker run --rm -e YUM_NAME=$YUM_NAME -v $SYSTEM_ARTIFACTSDIRECTORY/yum:/mnt/yum -v $(pwd):/azure-cli centos:centos8 /bin/bash "/azure-cli/scripts/release/rpm/test_rpm_in_docker.sh"

IMAGE=centos:centos7
docker pull $IMAGE
docker run --rm -e YUM_NAME=$YUM_NAME -v $SYSTEM_ARTIFACTSDIRECTORY/yum:/mnt/yum -v $(pwd):/azure-cli $IMAGE /bin/bash "/azure-cli/scripts/release/rpm/test_rpm_in_docker.sh"

displayName: 'Test Yum Package'

Expand Down
6 changes: 3 additions & 3 deletions scripts/release/rpm/test_rpm_in_docker.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env bash

# This script should be run in a centos8 docker.
# This script should be run in a centos7 docker.
set -exv

export USERNAME=azureuser
Expand All @@ -9,8 +9,8 @@ yum --nogpgcheck localinstall /mnt/yum/$YUM_NAME -y

yum install git gcc python3-devel -y

ln -s /usr/bin/python3 /usr/bin/python
ln -s /usr/bin/pip3 /usr/bin/pip
ln -s -f /usr/bin/python3 /usr/bin/python
ln -s -f /usr/bin/pip3 /usr/bin/pip
time az self-test
time az --version

Expand Down