Skip to content

Commit

Permalink
[DDS-1845] Updated awx-ee independent workflow.
Browse files Browse the repository at this point in the history
For speed comparison.
  • Loading branch information
GROwen committed Jan 19, 2024
1 parent 6aa4b4a commit 618f5ca
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 14 deletions.
24 changes: 15 additions & 9 deletions .github/workflows/build-deploy-awx-ee.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,24 +46,30 @@ jobs:
type=ref,event=pr,enable=${{ github.event.pull_request.merged == false }}
type=raw,value=${{ github.event.pull_request.base.ref }},enable=${{ github.event.pull_request.merged == true }}
type=ref,event=branch,enable=${{ contains(fromJson('["schedule", "workflow_dispatch"]'), github.event_name) }}
labels: |
maintainer=Digital Transformation
repository=${{ github.repositoryUrl }}
org.opencontainers.image.authors=Digital Victoria
org.opencontainers.image.source=https://github.com/${{ github.repository }}/tree/${{ (contains(fromJson('["opened","synchronize"]'), github.event.action)) && github.head_ref || github.event.action == 'closed' && github.base_ref || github.ref_name }}/images/${{ matrix.images }}/Dockerfile
org.opencontainers.image.title=AWX Execution Environment image.
org.opencontainers.image.description=AWX Execution Environment image.
- name: Create context and build instruction file
run: |
pip install --upgrade ansible-builder
ansible-builder build \
--container-runtime=docker \
--container-runtime docker \
--tag ${{ steps.meta.outputs.tags }}
--build-arg PKGMGR="/usr/bin/apt-get" \
--build-arg PYCMD="/usr/local/bin/python3" \
--output-filename Dockerfile \
--verbosity 3
# Refactored to use bake but it's substantially slower so we'll do a push instead
# see https://github.com/docker/build-push-action/issues/538#issuecomment-1869681934
# However this approach may be at the cost of multi-arch support.
- name: Test
run: |
docker images
- name: Push
run: |
docker push --all-tags ${{ env.REGISTRY }}/${{ github.repository }}/awx-ee
# - name: Build and push the AWX-EE image
# uses: docker/bake-action@v4
# with:
Expand Down
4 changes: 2 additions & 2 deletions images/awx-ee/docker-bake.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ variable "IMAGE_TAG" {
}

group "default" {
targets = ["ee"]
targets = ["awx-ee"]
}

target "docker-metadata-action" {}

target "ee" {
target "awx-ee" {
inherits = ["docker-metadata-action"]
context = "./context"
platforms = ["linux/amd64", "linux/arm64"]
Expand Down
8 changes: 5 additions & 3 deletions images/awx-ee/execution-environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,11 @@ additional_build_steps:
append_base: []

prepend_final:
- LABEL org.opencontainers.image.authors="Digital Victoria"
- LABEL org.opencontainers.image.description="Provides an AWX execution environment image optimised for use with SDP."
- LABEL org.opencontainers.image.source="https://github.com/dpc-sdp/bay/blob/6.x/images/awx-ee/context/Dockerfile"
- LABEL maintainer=Digital Transformation
- LABEL org.opencontainers.image.authors=Digital Transformation
- LABEL org.opencontainers.image.title=SDP AWX Execution Environment image.
- LABEL org.opencontainers.image.description="Provides an AWX execution environment image optimised for use with SDP. Built with ansible-builder."
- LABEL org.opencontainers.image.source="https://github.com/dpc-sdp/bay/blob/6.x/images/awx-ee/"
- ARG LAGOON_CLI_VERSION=v0.15.4
- ARG NVM_INSTALL_VERSION=v0.39.1
- ARG NODE_VERSION=v14.15.1
Expand Down

0 comments on commit 618f5ca

Please sign in to comment.