awx/tools/ansible/build.yml
Jesse Wattenbarger 765487390f Fallback on PYTHON path in Makefile
- Change default PYTHON in Makefile to be ranked choice
- Fix `PYTHON_VERSION` target that expects just a word
- Use native GNU Make `$(subst ,,)` instead of `sed`
- Add 'version-for-buildyml' target to simplify ci

If I understand correctly, this change should make
'$(PYTHON)' work how we want it to everywhere. Before
this change, on develpers' machines that don't have
a 'python3.9' in their path, make would fail. With this
change, we will prefer python3.9 if it's available, but
we'll take python3 otherwise.
2023-04-21 09:50:05 -04:00

26 lines
641 B
YAML

---
- 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