1
0
mirror of https://github.com/ansible/awx.git synced 2024-10-27 17:55:10 +03:00

Don't pre-build UI deps for unit tests

I know, this sucks. I spent all day trying to get to the bottom of the CI failures that started happening the other day with no luck.

There is something going on with how we were moving the node_modules directory into the source tree from the pre-built location in /tmp. This was working, but then it broke. I hope to cycle back on this sometime next week if I have the time.
This commit is contained in:
Shane McDonald 2017-03-09 18:53:21 -05:00
parent bce7f0678f
commit 0970726fa6
2 changed files with 2 additions and 24 deletions

View File

@ -1,26 +1,11 @@
FROM gcr.io/ansible-tower-engineering/tower_devel:latest
# For UI tests
RUN yum install -y bzip2 gcc-c++
# We need to install dependencies somewhere other than /ansible-tower.
# Anything in /ansible-tower will be overwritten by the bind-mount.
# We switch the WORKDIR to /ansible-tower further down.
WORKDIR "/tmp/"
COPY awx/ui/package.json awx/ui/
RUN npm set progress=false
# Copy __init__.py so the Makefile can retrieve `awx.__version__`
COPY awx/__init__.py awx/
RUN make ui-deps
WORKDIR "/tower_devel"
# This entrypoint script takes care of moving the node_modules
# into the bind-mount, then exec's to whatever was passed as the CMD.
ADD tools/docker-compose/unit-tests/entrypoint /usr/bin/
RUN chmod +x /usr/bin/entrypoint
ENTRYPOINT ["entrypoint"]
ENTRYPOINT ["/bin/bash", "-c"]
CMD ["bash"]

View File

@ -1,7 +0,0 @@
#!/bin/bash
set -e
mkdir -p /tower_devel/awx/ui/
mv -n /tmp/awx/ui/node_modules /tmp/awx/ui/.deps_built /tower_devel/awx/ui
exec $@