From 7b59c36263283fc20f7fd971dde52ebfe3412fc9 Mon Sep 17 00:00:00 2001 From: Shane McDonald Date: Mon, 18 Oct 2021 17:28:11 -0400 Subject: [PATCH] Allow for overriding default AWX version as env var --- Dockerfile | 3 +++ Makefile | 2 +- roles/installer/defaults/main.yml | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index af52815f..1db8fdaa 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,8 @@ FROM quay.io/operator-framework/ansible-operator:v1.12.0 +ARG DEFAULT_AWX_VERSION +ENV DEFAULT_AWX_VERSION=${DEFAULT_AWX_VERSION} + COPY requirements.yml ${HOME}/requirements.yml RUN ansible-galaxy collection install -r ${HOME}/requirements.yml \ && chmod -R ug+rwx ${HOME}/.ansible diff --git a/Makefile b/Makefile index 77cea147..54f7c73d 100644 --- a/Makefile +++ b/Makefile @@ -63,7 +63,7 @@ run: ansible-operator ## Run against the configured Kubernetes cluster in ~/.kub ANSIBLE_ROLES_PATH="$(ANSIBLE_ROLES_PATH):$(shell pwd)/roles" $(ANSIBLE_OPERATOR) run docker-build: ## Build docker image with the manager. - docker build -t ${IMG} . + docker build $(BUILD_ARGS) -t ${IMG} . docker-push: ## Push docker image with the manager. docker push ${IMG} diff --git a/roles/installer/defaults/main.yml b/roles/installer/defaults/main.yml index c166aecd..e9da2435 100644 --- a/roles/installer/defaults/main.yml +++ b/roles/installer/defaults/main.yml @@ -108,7 +108,7 @@ extra_volumes: '' # Use these image versions for Ansible AWX. image: quay.io/ansible/awx -image_version: 19.4.0 +image_version: "{{ lookup('env', 'DEFAULT_AWX_VERSION') or 'latest' }}" redis_image: docker.io/redis redis_image_version: latest postgres_image: postgres