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

{CI} Use MCR docker mirror #29304

Merged
merged 3 commits into from
Jul 3, 2024
Merged
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
14 changes: 9 additions & 5 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -323,6 +323,7 @@ jobs:
filePath: build_scripts\windows\scripts\test_zip_installation.ps1

- job: BuildDockerImageAlpine
continueOnError: true
Copy link
Contributor Author

@bebound bebound Jul 3, 2024

Choose a reason for hiding this comment

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

By adding this, we can select the partially failed CI run in release pipeline.

displayName: Build Docker Image Alpine
strategy:
matrix:
Expand Down Expand Up @@ -355,6 +356,7 @@ jobs:
ArtifactName: $(artifactName)

- job: TestDockerImageAlpine
continueOnError: true
displayName: Test Docker Image Alpine
dependsOn:
- BuildDockerImageAlpine
Expand Down Expand Up @@ -547,12 +549,12 @@ jobs:

echo "== Testing pip install on Python 3.9 =="
docker run \
--rm -v $PYPI_FILES:/mnt/pypi python:3.9 \
--rm -v $PYPI_FILES:/mnt/pypi mcr.microsoft.com/mirror/docker/library/python:3.9-slim \
/bin/bash -c "cd /mnt/pypi && ls && pip install --find-links ./ azure_cli-$CLI_VERSION*whl && az self-test && az --version && sleep 5"

echo "== Testing pip install on Python 3.11 =="
docker run \
--rm -v $PYPI_FILES:/mnt/pypi python:3.11 \
--rm -v $PYPI_FILES:/mnt/pypi mcr.microsoft.com/mirror/docker/library/python:3.11-slim \
Copy link
Member

Choose a reason for hiding this comment

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

It looks like python:3.11 also exists and there is no need to change to python:3.11-slim:

https://mcr.microsoft.com/en-us/product/mirror/docker/library/python/tags

image

Copy link
Contributor Author

Choose a reason for hiding this comment

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

3.9 does not exists. Adding -slim to make sure they share the same format.

Copy link
Member

Choose a reason for hiding this comment

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

Well, MCR should contain python:3.9 as it is a popular image.

/bin/bash -c "cd /mnt/pypi && ls && pip install --find-links ./ azure_cli-$CLI_VERSION*whl && az self-test && az --version && sleep 5"

displayName: 'Test pip Install'
Expand Down Expand Up @@ -669,7 +671,7 @@ jobs:
-e CLI_VERSION=$CLI_VERSION \
-e HOMEBREW_UPSTREAM_URL=$HOMEBREW_UPSTREAM_URL \
--name azurecli \
python:3.11 \
mcr.microsoft.com/mirror/docker/library/python:3.11-slim \
/mnt/scripts/run.sh

# clean up
Expand Down Expand Up @@ -943,6 +945,7 @@ jobs:
displayName: 'Test Rpm Package'

- job: BuildDebPackages
continueOnError: true
displayName: Build Deb Packages
condition: and(succeeded(), in(variables['Build.Reason'], 'IndividualCI', 'BatchedCI', 'Manual', 'Schedule'))
pool:
Expand Down Expand Up @@ -999,7 +1002,7 @@ jobs:
targetType: 'filePath'
filePath: scripts/release/debian/pipeline.sh
env:
DISTRO_BASE_IMAGE: $(deb_system):$(distro)
DISTRO_BASE_IMAGE: mcr.microsoft.com/mirror/docker/library/$(deb_system):$(distro)

- task: AzureArtifacts.manifest-generator-task.manifest-generator-task.ManifestGeneratorTask@0
displayName: 'SBOM'
Expand All @@ -1013,6 +1016,7 @@ jobs:
ArtifactName: $(deb_system)-$(distro)-$(arch)

- job: TestDebPackages
continueOnError: true
timeoutInMinutes: 120
displayName: Test Deb Packages
dependsOn:
Expand Down Expand Up @@ -1071,7 +1075,7 @@ jobs:
- task: Bash@3
displayName: 'Test $(deb_system) $(distro) $(arch) Package'
env:
DISTRO_BASE_IMAGE: $(deb_system):$(distro)
DISTRO_BASE_IMAGE: mcr.microsoft.com/mirror/docker/library/$(deb_system):$(distro)
inputs:
targetType: 'inline'
script: |
Expand Down
Loading