From 0970726fa6a2afc592cd13c16a4203e173b91228 Mon Sep 17 00:00:00 2001 From: Shane McDonald Date: Thu, 9 Mar 2017 18:53:21 -0500 Subject: [PATCH] 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. --- tools/docker-compose/unit-tests/Dockerfile | 19 ++----------------- tools/docker-compose/unit-tests/entrypoint | 7 ------- 2 files changed, 2 insertions(+), 24 deletions(-) delete mode 100644 tools/docker-compose/unit-tests/entrypoint diff --git a/tools/docker-compose/unit-tests/Dockerfile b/tools/docker-compose/unit-tests/Dockerfile index d1fec4e583..2de3715f7b 100644 --- a/tools/docker-compose/unit-tests/Dockerfile +++ b/tools/docker-compose/unit-tests/Dockerfile @@ -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"] diff --git a/tools/docker-compose/unit-tests/entrypoint b/tools/docker-compose/unit-tests/entrypoint deleted file mode 100644 index cb7fbe142e..0000000000 --- a/tools/docker-compose/unit-tests/entrypoint +++ /dev/null @@ -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 $@