From 5b8285a897351f556aafe5080006118774dace92 Mon Sep 17 00:00:00 2001 From: Brandon Clayton <bclayton@usgs.gov> Date: Thu, 25 Feb 2021 15:53:00 -0700 Subject: [PATCH] add python cache --- .gitlab-ci.yml | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index b59deda..30d81bd 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -5,6 +5,7 @@ variables: JACOCO_HTML_DIR: ${REPORTS_DIR}/jacoco/test/html JUNIT_FILES: build/test-results/test/TEST-*.xml REPORTS_DIR: build/reports + POETRY_CACHE_DIR: ${CI_PROJECT_DIR}/cache # TODO: Remove hard coded url S3_BUCKET: https://nshmp-netcdf-lp-development-rbucket-1of3d1x45yfd9.s3-us-west-2.amazonaws.com DATA_URL: ${S3_BUCKET}/nshmp_2018a_v1.1-CONUS-hazards-with-preliminary-PGV-fv0.3-1x1.nc @@ -24,6 +25,7 @@ include: stages: - image + - init - build - database - deploy @@ -41,7 +43,6 @@ stages: .python: before_script: - source $HOME/.poetry/env - - poetry install extends: - .tags::development image: ${PIPELINE_IMAGE_NAME} @@ -122,6 +123,20 @@ Image: tags: - build + +#### +# Stage: init +#### + +Init: + artifacts: + paths: + - '${POETRY_CACHE_DIR}' + extends: + - .python + script: + - poetry install + #### # Stage: build #### -- GitLab