Add venv cache to make pipelines faster

This commit is contained in:
Daniel Egger 2022-02-08 22:34:02 +01:00
parent 469f934fad
commit e2cfd19ca6
2 changed files with 11 additions and 5 deletions

View File

@ -9,11 +9,10 @@ pipelines:
services: services:
- postgres - postgres
caches: caches:
- pip - vbvpip
- cypress
script: script:
- source ./env/bitbucket/prepare_for_test.sh - source ./env/bitbucket/prepare_for_test.sh
- pip3 install -r server/requirements/requirements-dev.txt - pip install -r server/requirements/requirements-dev.txt
- git-crypt status -e | sort > git-crypt-encrypted-files-check.txt && diff git-crypt-encrypted-files.txt git-crypt-encrypted-files-check.txt - git-crypt status -e | sort > git-crypt-encrypted-files-check.txt && diff git-crypt-encrypted-files.txt git-crypt-encrypted-files-check.txt
- trufflehog --exclude_paths trufflehog-exclude-patterns.txt --allow trufflehog-allow.json --entropy=True --max_depth=100 . - trufflehog --exclude_paths trufflehog-exclude-patterns.txt --allow trufflehog-allow.json --entropy=True --max_depth=100 .
- ./server/run_tests_coverage.sh - ./server/run_tests_coverage.sh
@ -28,11 +27,13 @@ pipelines:
- cypress/**/*.mp4 - cypress/**/*.mp4
caches: caches:
- node - node
- pip - vbvpip
- cypress - cypress
script: script:
- source ./env/bitbucket/prepare_for_test.sh - source ./env/bitbucket/prepare_for_test.sh
- pip3 install -r server/requirements/requirements-dev.txt - python -m venv vbvvenv
- source vbvvenv/bin/activate
- pip install -r server/requirements/requirements-dev.txt
- npm install - npm install
- ./prepare_server_cypress.sh --start-background - ./prepare_server_cypress.sh --start-background
- npm run cypress:ci - npm run cypress:ci
@ -69,6 +70,7 @@ pipelines:
definitions: definitions:
caches: caches:
cypress: /root/.cache/Cypress cypress: /root/.cache/Cypress
vbvpip: /opt/atlassian/pipelines/agent/build/vbvvenv/
services: services:
postgres: postgres:
image: postgres image: postgres

View File

@ -8,3 +8,7 @@ export PG_USER="postgres"
export PG_PORT=5432 export PG_PORT=5432
export OPENSSL_CONF=/etc/ssl/ export OPENSSL_CONF=/etc/ssl/
python -m venv vbvvenv
source vbvvenv/bin/activate
export PATH="$PWD/vbvvenv/bin:$PATH"