Publish amd64 and arm64 awx image on release (#15053)

* Stage multi-arch awx image

- change CI to use `make awx-kube-build` instead of build playbook
- update staging CI to build and push multiarch awx image
- update doc to use `make awx-kube-build` to build awx image
- remove build playbook (no longer used)
This commit is contained in:
Hao Liu
2024-04-09 09:50:09 -04:00
committed by GitHub
parent 468949b899
commit 86204cf23b
8 changed files with 65 additions and 131 deletions

View File

@@ -1,25 +0,0 @@
---
- name: Build AWX Docker Images
hosts: localhost
gather_facts: true
tasks:
- name: Get version from SCM if not explicitly provided
command: make version-for-buildyml
args:
chdir: '../../'
register: scm_version
failed_when: not scm_version.stdout
when: awx_version is not defined
- name: Set awx_version
set_fact:
awx_version: "{{ scm_version.stdout }}"
when: awx_version is not defined
- include_role:
name: dockerfile
- include_role:
name: image_build
- include_role:
name: image_push
when: push | default(false) | bool

View File

@@ -1,5 +0,0 @@
---
awx_image: ansible/awx
awx_image_tag: "{{ awx_version }}"
dockerfile_name: 'Dockerfile'
headless: no

View File

@@ -1,30 +0,0 @@
---
- name: Verify awx-logos directory exists for official install
stat:
path: "../../../awx-logos"
register: logosdir
failed_when: logosdir.stat.isdir is not defined or not logosdir.stat.isdir
when: awx_official|default(false)|bool
- name: Copy logos for inclusion in sdist
copy:
src: "../../../awx-logos/awx/ui/client/assets/"
dest: "../../awx/ui/public/static/media/"
when: awx_official|default(false)|bool
- set_fact:
command_to_run: |
docker build -t {{ awx_image }}:{{ awx_image_tag }} \
-f {{ dockerfile_name }} \
--build-arg VERSION={{ awx_version }} \
--build-arg SETUPTOOLS_SCM_PRETEND_VERSION={{ awx_version }} \
--build-arg HEADLESS={{ headless }} \
.
# Calling Docker directly because docker-py doesnt support BuildKit
- name: Build AWX image
shell: "{{ command_to_run }}"
environment:
DOCKER_BUILDKIT: 1
args:
chdir: "{{ playbook_dir }}/../../"

View File

@@ -1,4 +0,0 @@
---
registry: quay.io
awx_image: ansible/awx
awx_image_tag: "{{ awx_version }}"

View File

@@ -1,22 +0,0 @@
---
- name: Authenticate with Docker registry if registry password given
docker_login:
registry: "{{ registry }}"
username: "{{ registry_username }}"
password: "{{ registry_password }}"
reauthorize: true
when:
- registry is defined
- registry_username is defined
- registry_password is defined
- name: Tag and Push Container Images
docker_image:
name: "{{ awx_image }}:{{ awx_image_tag }}"
repository: "{{ registry }}/{{ awx_image }}:{{ item }}"
force_tag: yes
push: true
source: local
with_items:
- "latest"
- "{{ awx_image_tag }}"