Skip to content

Commit

Permalink
EN-38189 - freeze reqs in container not jenkins
Browse files Browse the repository at this point in the history
  • Loading branch information
Brandon Webster committed Mar 30, 2020
1 parent 2c6189c commit 46c90a6
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 15 deletions.
5 changes: 4 additions & 1 deletion Dockerfile
Expand Up @@ -9,7 +9,10 @@ RUN mkdir -p /app/carto_renderer

ENV LOG_LEVEL INFO

ADD frozen.txt /app/
COPY bin/freeze-reqs.sh /app/
COPY dev-requirements.txt /app/
RUN chmod +x /app/freeze-reqs.sh
RUN /app/freeze-reqs.sh
RUN pip install -r /app/frozen.txt

COPY ship.d /etc/ship.d/
Expand Down
1 change: 0 additions & 1 deletion bin/dockerize.sh
Expand Up @@ -3,6 +3,5 @@
set -e

cd "$(git rev-parse --show-toplevel 2>/dev/null)"
bin/freeze-reqs.sh
docker build --rm -t carto-renderer .

12 changes: 1 addition & 11 deletions bin/freeze-reqs.sh
Expand Up @@ -3,17 +3,7 @@
set -ev

# Change to the project root.
cd "$(git rev-parse --show-toplevel 2>/dev/null)"

VENV_DIR="venv"
if [ "${HUDSON_HOME}" ]; then
VENV_DIR="${HUDSON_HOME}/carto-renderer/${VENV_DIR}"
fi

if [ ! -d "${VENV_DIR}" ]; then
virtualenv "${VENV_DIR}"
fi
source "${VENV_DIR}"/bin/activate
cd /app

DEV_FILE='dev-requirements.txt'
FROZEN_FILE='frozen.txt'
Expand Down
3 changes: 1 addition & 2 deletions bin/start-renderer.sh
Expand Up @@ -19,8 +19,7 @@ if [ '--dev' = "$1" ]; then
PYTHONPATH=. carto_renderer/service.py
else
bin/dockerize.sh
rm frozen.txt


if [ 'Darwin' = "$(uname)" ]; then
OPTS=(-p 4096:4096 -e 'STYLE_HOST=docker.for.mac.localhost')
else
Expand Down

0 comments on commit 46c90a6

Please sign in to comment.