vbv/bitbucket-pipelines.yml

79 lines
2.8 KiB
YAML

# this test is based on the docker image described in env/bitbucket/Dockerfile
image: iterativ/vbv-lernwelt-bitbucket
pipelines:
default:
- parallel:
- step:
name: python tests
max-time: 15
services:
- postgres
caches:
- pip
- cypress
script:
- source ./env/bitbucket/prepare_for_test.sh
- pip3 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
- trufflehog --exclude_paths trufflehog-exclude-patterns.txt --allow trufflehog-allow.json --entropy=True --max_depth=100 .
# - ./src/run_pylint.sh
# - ./src/run_unittests_coverage.sh
- step:
name: cypress tests
max-time: 45
services:
- postgres
artifacts:
- cypress/**/*.png
- cypress/**/*.mp4
caches:
- node
- pip
- cypress
script:
- source ./env/bitbucket/prepare_for_test.sh
- pip3 install -r server/requirements/requirements-dev.txt
# - npm install
# - export SWISSCOM_CUSTOMER_LOGIN_BASE_URL='http://localhost:8001/apiclient/fakeswisscomapi/login'
# - npm run build
# - ./run_jshint.sh
# # - npm test
# - (cd landingpage && npm install && echo "{}" > ./src/translations/translations.json && npm run build)
# - ./prepare_server_cypress.sh --start-background
# - npm run cypress:ci
tags:
v202*:
- step:
name: Hello world
script:
- echo "Release ready!"
- step:
name: Deploy to PROD
deployment: prod
trigger: manual
script:
- ./deploy.sh --commit "$BITBUCKET_COMMIT" --token "$DEPLOY_TOKEN" --url https://myservicecrm.swisscom.ch/deploy-iesc-bKVAkQguPDVi
custom:
deploy-preprod:
- step:
name: Deploy to PREPROD
deployment: preprod
script:
- ./deploy.sh --commit "$BITBUCKET_COMMIT" --token "$DEPLOY_TOKEN" --url https://preprod.myservicecrm.ch/deploy-iesc-bKVAkQguPDVi
deploy-api:
- step:
name: Deploy to API
deployment: api
script:
- ./deploy.sh --commit "$BITBUCKET_COMMIT" --token "$DEPLOY_TOKEN" --url https://api.myservicecrm.ch/deploy-iesc-bKVAkQguPDVi
definitions:
caches:
cypress: /root/.cache/Cypress
services:
postgres:
image: postgres
memory: 512
variables:
POSTGRES_HOST_AUTH_METHOD: trust