From 5b6f61097016ac74898b5bc165a77bae774f1ad1 Mon Sep 17 00:00:00 2001 From: James Laska Date: Tue, 20 Sep 2016 16:24:29 -0400 Subject: [PATCH] Move requirements build to unittest Dockerfile Previously, the requirements were built during compose runtime. --- tools/docker-compose/unit-tests/Dockerfile | 28 +++++++++++++++++-- .../unit-tests/docker-compose.yml | 3 +- 2 files changed, 26 insertions(+), 5 deletions(-) diff --git a/tools/docker-compose/unit-tests/Dockerfile b/tools/docker-compose/unit-tests/Dockerfile index 66f2c54558..decbf01374 100644 --- a/tools/docker-compose/unit-tests/Dockerfile +++ b/tools/docker-compose/unit-tests/Dockerfile @@ -29,12 +29,34 @@ RUN yum install -y \ # Remove the 2 lines below and uncomment the 3 lines above to build # RPMs with the old JS build system. RUN curl --silent --location https://rpm.nodesource.com/setup_6.x | bash - -RUN yum install -y nodejs -RUN npm set progress=false +RUN yum install -y nodejs WORKDIR "/ansible-tower" -ENV VENV_BASE="/venv" +# Copy requirements files +COPY requirements/*.txt requirements/ + +# Copy __init__.py so the Makefile can retrieve `awx.__version__` +COPY awx/__init__.py awx/ + +# Copy Makefile +COPY Makefile . + +# Make tower runtime virtualenvs +ENV SWIG_FEATURES="-cpperraswarn -includeall -I/usr/include/openssl" +RUN make requirements + +RUN pip install -r requirements/requirements_jenkins.txt +# ENV VENV_BASE="" +# RUN make requirements_jenkins + +# Build front-end deps +COPY awx/ui/package.json awx/ui/ + +RUN npm set progress=false + +RUN make ui-deps-built + ENTRYPOINT ["/bin/bash", "-c"] CMD ["bash"] diff --git a/tools/docker-compose/unit-tests/docker-compose.yml b/tools/docker-compose/unit-tests/docker-compose.yml index 4293aac28a..125f93c6d4 100644 --- a/tools/docker-compose/unit-tests/docker-compose.yml +++ b/tools/docker-compose/unit-tests/docker-compose.yml @@ -8,7 +8,6 @@ services: environment: SWIG_FEATURES: "-cpperraswarn -includeall -I/usr/include/openssl" TEST_DIRS: "awx/main/tests/unit" - command: ["make requirements_test test"] - + command: ["make test"] volumes: - ../../../:/ansible-tower