Skip to content

Commit

Permalink
{Release} Fix CI issue for release branch (#21277)
Browse files Browse the repository at this point in the history
* [Packaging] BREAKING CHANGE: Drop `jmespath-terminal` from docker image (#21206)

* {Packaging} Fix CI job "Test Yum Package" by using `centos7` (#21207)

* Update azure-pipelines.yml for Azure Pipelines (#21230)

Pin version for cred scan

Co-authored-by: Jiashuo Li <4003950+jiasli@users.noreply.github.com>
  • Loading branch information
zhoxing-ms and jiasli committed Feb 14, 2022
1 parent d281041 commit e861f13
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
3 changes: 1 addition & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,7 @@ RUN apk add --no-cache bash openssh ca-certificates jq curl openssl perl git zip
ARG JP_VERSION="0.1.3"

RUN curl -L https://github.com/jmespath/jp/releases/download/${JP_VERSION}/jp-linux-amd64 -o /usr/local/bin/jp \
&& chmod +x /usr/local/bin/jp \
&& pip install --no-cache-dir --upgrade jmespath-terminal
&& chmod +x /usr/local/bin/jp

WORKDIR azure-cli
COPY . /azure-cli
Expand Down
8 changes: 5 additions & 3 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ jobs:
inputs:
toolMajorVersion: V2
suppressionsFile: './scripts/ci/credscan/CredScanSuppressions.json'
toolVersionV2: '2.1.17'
- task: ms-codeanalysis.vss-microsoft-security-code-analysis-devops.build-task-postanalysis.PostAnalysis@1
displayName: 'Post Analysis'
inputs:
Expand Down Expand Up @@ -743,9 +744,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

0 comments on commit e861f13

Please sign in to comment.