Move requirements build to unittest Dockerfile

Previously, the requirements were built during compose runtime.
This commit is contained in:
James Laska
2016-09-20 16:24:29 -04:00
parent dcf127ac6d
commit 5b6f610970
2 changed files with 26 additions and 5 deletions

View File

@@ -29,12 +29,34 @@ RUN yum install -y \
# Remove the 2 lines below and uncomment the 3 lines above to build # Remove the 2 lines below and uncomment the 3 lines above to build
# RPMs with the old JS build system. # RPMs with the old JS build system.
RUN curl --silent --location https://rpm.nodesource.com/setup_6.x | bash - 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" 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"] ENTRYPOINT ["/bin/bash", "-c"]
CMD ["bash"] CMD ["bash"]

View File

@@ -8,7 +8,6 @@ services:
environment: environment:
SWIG_FEATURES: "-cpperraswarn -includeall -I/usr/include/openssl" SWIG_FEATURES: "-cpperraswarn -includeall -I/usr/include/openssl"
TEST_DIRS: "awx/main/tests/unit" TEST_DIRS: "awx/main/tests/unit"
command: ["make requirements_test test"] command: ["make test"]
volumes: volumes:
- ../../../:/ansible-tower - ../../../:/ansible-tower