mirror of
https://github.com/ansible/awx.git
synced 2026-02-03 18:48:12 -03:30
Allow for building headless mode
This will only be used in CI and maybe other places where we dont need a UI
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
---
|
||||
build_dev: false
|
||||
kube_dev: false
|
||||
headless: no
|
||||
dockerfile_dest: '../..'
|
||||
dockerfile_name: 'Dockerfile'
|
||||
template_dest: '_build'
|
||||
|
||||
@@ -17,6 +17,4 @@ set -e
|
||||
|
||||
wait-for-migrations
|
||||
|
||||
awx-manage collectstatic --noinput --clear
|
||||
|
||||
supervisord -c /etc/supervisord.conf
|
||||
|
||||
@@ -11,6 +11,7 @@ ENV LANG en_US.UTF-8
|
||||
ENV LANGUAGE en_US:en
|
||||
ENV LC_ALL en_US.UTF-8
|
||||
|
||||
|
||||
USER root
|
||||
|
||||
# Install build dependencies
|
||||
@@ -27,7 +28,9 @@ RUN dnf -y update && \
|
||||
libffi-devel \
|
||||
libtool-ltdl-devel \
|
||||
make \
|
||||
{% if not headless|bool %}
|
||||
nodejs \
|
||||
{% endif %}
|
||||
nss \
|
||||
openldap-devel \
|
||||
patch \
|
||||
@@ -44,6 +47,7 @@ RUN dnf -y update && \
|
||||
|
||||
RUN python3.8 -m ensurepip && pip3 install "virtualenv < 20"
|
||||
|
||||
|
||||
# Install & build requirements
|
||||
ADD Makefile /tmp/Makefile
|
||||
RUN mkdir /tmp/requirements
|
||||
@@ -56,19 +60,27 @@ RUN cd /tmp && make requirements_awx
|
||||
|
||||
ARG VERSION
|
||||
ARG SETUPTOOLS_SCM_PRETEND_VERSION
|
||||
ARG HEADLESS
|
||||
|
||||
{% if (build_dev|bool) or (kube_dev|bool) %}
|
||||
ADD requirements/requirements_dev.txt /tmp/requirements
|
||||
RUN cd /tmp && make requirements_awx_dev
|
||||
{% else %}
|
||||
# Use the distro provided npm to bootstrap our required version of node
|
||||
RUN npm install -g n && n 14.15.1 && dnf remove -y nodejs
|
||||
|
||||
{% if not headless|bool %}
|
||||
RUN npm install -g n && n 14.15.1
|
||||
{% endif %}
|
||||
|
||||
# Copy source into builder, build sdist, install it into awx venv
|
||||
COPY . /tmp/src/
|
||||
WORKDIR /tmp/src/
|
||||
RUN make sdist && \
|
||||
/var/lib/awx/venv/awx/bin/pip install dist/awx-$(cat VERSION).tar.gz
|
||||
RUN make sdist && /var/lib/awx/venv/awx/bin/pip install dist/awx.tar.gz
|
||||
|
||||
{% if not headless|bool %}
|
||||
RUN /var/lib/awx/venv/awx/bin/awx-manage collectstatic --noinput --clear
|
||||
{% endif %}
|
||||
|
||||
{% endif %}
|
||||
|
||||
# Final container(s)
|
||||
|
||||
@@ -2,4 +2,4 @@
|
||||
awx_image: ansible/awx
|
||||
awx_image_tag: "{{ awx_version }}"
|
||||
dockerfile_name: 'Dockerfile'
|
||||
|
||||
headless: no
|
||||
|
||||
Reference in New Issue
Block a user