Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
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
11 changes: 11 additions & 0 deletions .github/workflows/devel_images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ name: Build/Push Development Images
env:
LC_ALL: "C.UTF-8" # prevent ERROR: Ansible could not initialize the preferred locale: unsupported locale setting
DOCKER_CACHE: "--no-cache" # using the cache will not rebuild git requirements and other things
DOWNSTREAM_REPO: "ansible-automation-platform/tower"
on:
workflow_dispatch:
push:
Expand Down Expand Up @@ -59,6 +60,11 @@ jobs:
run: |
echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin

- name: Log in to Quay
run: |
echo "${{ secrets.QUAY_TOKEN }}" | docker login quay.io -u ${{ secrets.QUAY_USER }} --password-stdin
if: github.repository == env.DOWNSTREAM_REPO

- name: Setup node and npm for the new UI build
uses: actions/setup-node@v2
with:
Expand All @@ -77,3 +83,8 @@ jobs:
- name: Build and push AWX devel images
run: |
make ${{ matrix.build-targets.make-target }}

- name: Build and push AWX devel image to Quay
run: |
make docker-compose-buildx-quay
if: github.repository == env.DOWNSTREAM_REPO && matrix.build-targets.image-name == 'awx_devel'
20 changes: 20 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,11 @@ DEVEL_IMAGE_NAME ?= $(DEV_DOCKER_TAG_BASE)/$(GIT_REPO_NAME)_devel:$(COMPOSE_TAG)
IMAGE_KUBE_DEV=$(DEV_DOCKER_TAG_BASE)/$(GIT_REPO_NAME)_kube_devel:$(COMPOSE_TAG)
IMAGE_KUBE=$(DEV_DOCKER_TAG_BASE)/$(GIT_REPO_NAME):$(COMPOSE_TAG)

# quay.io
QUAY_OWNER ?= aap
QUAY_TAG_BASE ?= quay.io/$(QUAY_OWNER)
QUAY_DEVEL_IMAGE_NAME ?= $(QUAY_TAG_BASE)/$(GIT_REPO_NAME)_devel:$(COMPOSE_TAG)

# Common command to use for running ansible-playbook
ANSIBLE_PLAYBOOK ?= ansible-playbook -e ansible_python_interpreter=$(PYTHON)

Expand Down Expand Up @@ -620,6 +625,21 @@ docker-compose-buildx: Dockerfile.dev
-f Dockerfile.dev .
- docker buildx rm docker-compose-buildx

.PHONY: docker-compose-buildx-quay
## Build image and push to quay.io only (reuse ghcr.io image)
docker-compose-buildx-quay: Dockerfile.dev
- docker buildx create --name docker-compose-buildx-quay
docker buildx use docker-compose-buildx-quay
docker buildx build \
--ssh default=$(SSH_AUTH_SOCK) \
--push \
--build-arg BUILDKIT_INLINE_CACHE=1 \
--cache-from=$(DEVEL_IMAGE_NAME) \
--platform=$(PLATFORMS) \
--tag $(QUAY_DEVEL_IMAGE_NAME) \
-f Dockerfile.dev .
- docker buildx rm docker-compose-buildx-quay

docker-clean:
-$(foreach container_id,$(shell docker ps -f name=tools_awx -aq && docker ps -f name=tools_receptor -aq),docker stop $(container_id); docker rm -f $(container_id);)
-$(foreach image_id,$(shell docker images --filter=reference='*/*/*awx_devel*' --filter=reference='*/*awx_devel*' --filter=reference='*awx_devel*' -aq),docker rmi --force $(image_id);)
Expand Down
Loading