Skip to content

Commit

Permalink
Minimal Python container to build az aro extension (#3490)
Browse files Browse the repository at this point in the history
* Add build container for az aro extension
  • Loading branch information
tsatam authored Jun 7, 2024
1 parent 62253dd commit 1a7df46
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
12 changes: 12 additions & 0 deletions Dockerfile.ci-azext-aro
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
FROM mcr.microsoft.com/azure-cli:2.61.0 AS builder

RUN pip install pytest
COPY /python /data/

WORKDIR /data/az/aro
RUN pytest --ignore=azext_aro/tests/latest/integration
RUN python3 setup.py bdist_wheel

FROM mcr.microsoft.com/azure-cli:2.61.0-cbl-mariner2.0 AS final
COPY --from=builder /data/az/aro/dist /opt/az
RUN az extension add --yes --source /opt/az/aro-*-py2.py3-none-any.whl
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,10 @@ az: pyenv
python3 ./setup.py bdist_wheel || true && \
rm -f ~/.azure/commandIndex.json # https://github.com/Azure/azure-cli/issues/14997

.PHONY: azext-aro
azext-aro:
docker build --platform=linux/amd64 . -f Dockerfile.ci-azext-aro --no-cache=$(NO_CACHE) -t azext-aro:latest

clean:
rm -rf python/az/aro/{aro.egg-info,build,dist} aro
find python -type f -name '*.pyc' -delete
Expand Down

0 comments on commit 1a7df46

Please sign in to comment.