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