Skip to content

Commit

Permalink
feat: add azure flavor
Browse files Browse the repository at this point in the history
  • Loading branch information
eliecharra committed Aug 8, 2024
1 parent 0db8f6b commit 5dd6c8f
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 1 deletion.
9 changes: 9 additions & 0 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ jobs:
- base
- aws
- gcp
- azure
platform:
- linux/amd64
- linux/arm64
Expand Down Expand Up @@ -97,6 +98,7 @@ jobs:
- base
- aws
- gcp
- azure
platform:
- linux/amd64
versions: ${{ fromJson(needs.matrix.outputs.matrix) }}
Expand Down Expand Up @@ -136,6 +138,11 @@ jobs:
run: |
docker run --rm ${{ env.IMAGE }} sh -c "python3 -c \"import google.auth; print(google.auth.__version__)\""
- name: Test azure flavor
if: matrix.target == 'azure'
run: |
docker run --rm ${{ env.IMAGE }} az --version
deploy:
name: Push image ${{ matrix.versions.ansible }}
needs: [ matrix, test ]
Expand All @@ -149,6 +156,7 @@ jobs:
- base
- aws
- gcp
- azure
versions: ${{ fromJson(needs.matrix.outputs.matrix) }}
if: ${{ github.ref == 'refs/heads/main' }}
permissions:
Expand Down Expand Up @@ -294,6 +302,7 @@ jobs:
- base
- aws
- gcp
- azure
platform:
- linux/amd64
- linux/arm64
Expand Down
8 changes: 8 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,11 @@ USER 1983
FROM ansible AS aws
RUN pip install --no-cache-dir boto3==1.*
USER 1983

FROM ansible AS azure
RUN apk add --virtual=build --no-cache gcc musl-dev linux-headers &&\
pip install --no-cache-dir azure-cli==2.* &&\
# Cleanup package manager cache and remove build deps
apk del build &&\
rm -rf /var/cache/apk/*
USER 1983
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,12 @@ to use `public.ecr.aws/spacelift/runner-ansible` as the runner image for the sta
The image is pushed to the `public.ecr.aws/spacelift/runner-ansible` public repository. It is also pushed to the
`ghcr.io/spacelift-io/runner-ansible` repository as a backup in case of issues with ECR.

Altogether we have 3 flavors of the image:
Altogether we have 4 flavors of the image:

- `runner-ansible:${ANSIBLE_VERSION}` - built on top of `python:3.12-alpine` base image, with `ansible` and `ansible-runner` installed.
- `runner-ansible:${ANSIBLE_VERSION}-aws` - built on top of `runner-ansible`, with `boto3` installed.
- `runner-ansible:${ANSIBLE_VERSION}-gcp` - built on top of `runner-ansible`, with `google-auth` installed.
- `runner-ansible:${ANSIBLE_VERSION}-azure` - built on top of `runner-ansible`, with `azure-cli` installed.

Every image is available for the following architectures:

Expand Down

0 comments on commit 5dd6c8f

Please sign in to comment.