Browse Source

cache pip maybe

David Burke 5 years ago
parent
commit
184b4b2f9f
2 changed files with 8 additions and 3 deletions
  1. 6 2
      .gitlab-ci.yml
  2. 2 1
      Dockerfile

+ 6 - 2
.gitlab-ci.yml

@@ -3,8 +3,8 @@ variables:
   COMPOSE: docker-compose -p glitchtip
   IMAGE_NAME: registry.gitlab.com/glitchtip/glitchtip-backend
   CONTAINER_TEST_IMAGE: registry.gitlab.com/glitchtip/glitchtip-backend:$CI_BUILD_REF_NAME
-  POETRY_VERSION: 1.0.0
-  POETRY_VIRTUALENVS_CREATE: 'false'
+  POETRY_VERSION: 1.0.5
+  PIP_DISABLE_PIP_VERSION_CHECK: "on"
   POSTGRES_HOST_AUTH_METHOD: "trust"
 
 test:
@@ -13,6 +13,10 @@ test:
     SECRET_KEY: testing
   services:
     - postgres
+  cache:
+    key: ${CI_COMMIT_REF_SLUG}
+    paths:
+      - .cache/pip
   script:
     - apt-get update && apt-get install -y gcc
     - pip install "poetry==$POETRY_VERSION"

+ 2 - 1
Dockerfile

@@ -3,7 +3,8 @@ ARG IS_CI
 ENV PYTHONUNBUFFERED=1 \
   PORT=8080 \
   POETRY_VERSION=1.0.5 \
-  POETRY_VIRTUALENVS_CREATE=false
+  POETRY_VIRTUALENVS_CREATE=false \
+  PIP_DISABLE_PIP_VERSION_CHECK=on
 
 RUN mkdir /code
 WORKDIR /code