mirror of
https://github.com/ansible/awx.git
synced 2026-03-19 01:47:31 -02:30
[CI][release_4.6] backport push development image base on repo name (#6837)
* Publish image base on git repo name instead of hard coded to AWX (#15828) * Fix git credential for devel_image build (#15834) * Continue if pre-warm cache fail in container build (#15835) * Use correct devel image for docker-compose (#15836)
This commit is contained in:
6
.github/actions/awx_devel_image/action.yml
vendored
6
.github/actions/awx_devel_image/action.yml
vendored
@@ -33,7 +33,11 @@ runs:
|
|||||||
|
|
||||||
- name: Pre-pull latest devel image to warm cache
|
- name: Pre-pull latest devel image to warm cache
|
||||||
shell: bash
|
shell: bash
|
||||||
run: docker pull -q ghcr.io/${OWNER_LC}/awx_devel:${{ github.base_ref }}
|
run: |
|
||||||
|
DEV_DOCKER_TAG_BASE=ghcr.io/${OWNER_LC} \
|
||||||
|
COMPOSE_TAG=${{ github.base_ref || github.ref_name }} \
|
||||||
|
docker pull -q `make print-DEVEL_IMAGE_NAME`
|
||||||
|
continue-on-error: true
|
||||||
|
|
||||||
- name: Build image for current source checkout
|
- name: Build image for current source checkout
|
||||||
shell: bash
|
shell: bash
|
||||||
|
|||||||
2
.github/workflows/devel_images.yml
vendored
2
.github/workflows/devel_images.yml
vendored
@@ -88,7 +88,7 @@ jobs:
|
|||||||
|
|
||||||
- name: Add private GitHub token to requirements_git.credentials.txt
|
- name: Add private GitHub token to requirements_git.credentials.txt
|
||||||
shell: bash
|
shell: bash
|
||||||
run: echo "https://x-access-token:${{ secrets.PRIVATE_GITHUB_TOKEN }}@github.com"" >> requirements/requirements_git.credentials.txt
|
run: echo "https://x-access-token:${{ secrets.PRIVATE_GITHUB_TOKEN }}@github.com" >> requirements/requirements_git.credentials.txt
|
||||||
if: ${{ env.CI_PRIVATE_GITHUB_TOKEN != '' }}
|
if: ${{ env.CI_PRIVATE_GITHUB_TOKEN != '' }}
|
||||||
|
|
||||||
- name: Build and push AWX devel images
|
- name: Build and push AWX devel images
|
||||||
|
|||||||
9
Makefile
9
Makefile
@@ -8,6 +8,7 @@ NODE ?= node
|
|||||||
NPM_BIN ?= npm
|
NPM_BIN ?= npm
|
||||||
KIND_BIN ?= $(shell which kind)
|
KIND_BIN ?= $(shell which kind)
|
||||||
CHROMIUM_BIN=/tmp/chrome-linux/chrome
|
CHROMIUM_BIN=/tmp/chrome-linux/chrome
|
||||||
|
GIT_REPO_NAME ?= $(shell basename `git rev-parse --show-toplevel`)
|
||||||
GIT_BRANCH ?= $(shell git rev-parse --abbrev-ref HEAD)
|
GIT_BRANCH ?= $(shell git rev-parse --abbrev-ref HEAD)
|
||||||
MANAGEMENT_COMMAND ?= awx-manage
|
MANAGEMENT_COMMAND ?= awx-manage
|
||||||
VERSION ?= $(shell $(PYTHON) tools/scripts/scm_version.py 2> /dev/null)
|
VERSION ?= $(shell $(PYTHON) tools/scripts/scm_version.py 2> /dev/null)
|
||||||
@@ -62,9 +63,9 @@ DEV_DOCKER_OWNER ?= ansible
|
|||||||
# Docker will only accept lowercase, so github names like Paul need to be paul
|
# Docker will only accept lowercase, so github names like Paul need to be paul
|
||||||
DEV_DOCKER_OWNER_LOWER = $(shell echo $(DEV_DOCKER_OWNER) | tr A-Z a-z)
|
DEV_DOCKER_OWNER_LOWER = $(shell echo $(DEV_DOCKER_OWNER) | tr A-Z a-z)
|
||||||
DEV_DOCKER_TAG_BASE ?= ghcr.io/$(DEV_DOCKER_OWNER_LOWER)
|
DEV_DOCKER_TAG_BASE ?= ghcr.io/$(DEV_DOCKER_OWNER_LOWER)
|
||||||
DEVEL_IMAGE_NAME ?= $(DEV_DOCKER_TAG_BASE)/awx_devel:$(COMPOSE_TAG)
|
DEVEL_IMAGE_NAME ?= $(DEV_DOCKER_TAG_BASE)/$(GIT_REPO_NAME)_devel:$(COMPOSE_TAG)
|
||||||
IMAGE_KUBE_DEV=$(DEV_DOCKER_TAG_BASE)/awx_kube_devel:$(COMPOSE_TAG)
|
IMAGE_KUBE_DEV=$(DEV_DOCKER_TAG_BASE)/$(GIT_REPO_NAME)_kube_devel:$(COMPOSE_TAG)
|
||||||
IMAGE_KUBE=$(DEV_DOCKER_TAG_BASE)/awx:$(COMPOSE_TAG)
|
IMAGE_KUBE=$(DEV_DOCKER_TAG_BASE)/$(GIT_REPO_NAME):$(COMPOSE_TAG)
|
||||||
|
|
||||||
# Common command to use for running ansible-playbook
|
# Common command to use for running ansible-playbook
|
||||||
ANSIBLE_PLAYBOOK ?= ansible-playbook -e ansible_python_interpreter=$(PYTHON)
|
ANSIBLE_PLAYBOOK ?= ansible-playbook -e ansible_python_interpreter=$(PYTHON)
|
||||||
@@ -543,7 +544,7 @@ docker-compose-sources: .git/hooks/pre-commit
|
|||||||
fi;
|
fi;
|
||||||
|
|
||||||
$(ANSIBLE_PLAYBOOK) -i tools/docker-compose/inventory tools/docker-compose/ansible/sources.yml \
|
$(ANSIBLE_PLAYBOOK) -i tools/docker-compose/inventory tools/docker-compose/ansible/sources.yml \
|
||||||
-e awx_image=$(DEV_DOCKER_TAG_BASE)/awx_devel \
|
-e awx_image=$(DEV_DOCKER_TAG_BASE)/$(GIT_REPO_NAME)_devel \
|
||||||
-e awx_image_tag=$(COMPOSE_TAG) \
|
-e awx_image_tag=$(COMPOSE_TAG) \
|
||||||
-e receptor_image=$(RECEPTOR_IMAGE) \
|
-e receptor_image=$(RECEPTOR_IMAGE) \
|
||||||
-e control_plane_node_count=$(CONTROL_PLANE_NODE_COUNT) \
|
-e control_plane_node_count=$(CONTROL_PLANE_NODE_COUNT) \
|
||||||
|
|||||||
Reference in New Issue
Block a user