Update deploy steps

This commit is contained in:
Ramon Wenger 2022-05-17 15:05:39 +02:00
parent fec8022f0f
commit 782cb50f92
1 changed files with 118 additions and 131 deletions

View File

@ -20,17 +20,15 @@ definitions:
npm: $HOME/.npm npm: $HOME/.npm
cypress: $HOME/.cache/Cypress cypress: $HOME/.cache/Cypress
clientmodules: client/node_modules clientmodules: client/node_modules
steps:
- &lint
aliases:
- &lint
name: lint name: lint
caches: caches:
- clientmodules - clientmodules
script: script:
- npm install --prefix client - npm install --prefix client
- npm run lint --prefix client - npm run lint --prefix client
- &unittest-python - &unittest-python
name: run python unit tests name: run python unit tests
caches: caches:
- pip - pip
@ -39,7 +37,7 @@ aliases:
script: # Modify the commands below to build your repository. script: # Modify the commands below to build your repository.
- &setup-tests source setup-for-tests.sh - &setup-tests source setup-for-tests.sh
- ./server/run_unittests_coverage.sh - ./server/run_unittests_coverage.sh
- &cypress-test - &cypress-test
name: run cypress end-to-end tests name: run cypress end-to-end tests
caches: caches:
- pip - pip
@ -63,7 +61,7 @@ aliases:
- npm run build --prefix client - npm run build --prefix client
- curl http://localhost:8000/beta-login - curl http://localhost:8000/beta-login
- npm run --prefix client test:cypress:e2e - npm run --prefix client test:cypress:e2e
- &frontend-test - &frontend-test
name: run cypress frontend tests name: run cypress frontend tests
caches: caches:
- node - node
@ -80,7 +78,7 @@ aliases:
- sleep 30 - sleep 30
- curl http://localhost:8080/beta-login - curl http://localhost:8080/beta-login
- npm run --prefix client test:cypress:frontend - npm run --prefix client test:cypress:frontend
- &frontend-test-parallel - &frontend-test-parallel
name: run cypress frontend tests name: run cypress frontend tests
caches: caches:
- node - node
@ -97,7 +95,7 @@ aliases:
- sleep 30 - sleep 30
- curl http://localhost:8080/beta-login - curl http://localhost:8080/beta-login
- source bin/run-cypress-parallel.sh - source bin/run-cypress-parallel.sh
- &jest-test - &jest-test
name: run jest tests name: run jest tests
caches: caches:
- node - node
@ -108,39 +106,35 @@ aliases:
- npm install --prefix client - npm install --prefix client
- cd client - cd client
- npm run test:unit - npm run test:unit
- &deploy-dev - &deploy-dev
name: deploy to dev on Heroku name: deploy to dev on Heroku
deployment: dev deployment: dev
trigger: manual trigger: manual
script: script:
- git push --force https://heroku:$HEROKU_API_KEY@git.heroku.com/skillbox-dev.git HEAD:master - git push --force https://heroku:$HEROKU_API_KEY@git.heroku.com/skillbox-dev.git HEAD:master
- &deploy-academy-manual - &deploy-academy
name: deploy to iterativ-academy on Heroku
deployment: academy-stage
trigger: manual
script:
- git push https://heroku:$HEROKU_API_KEY@git.heroku.com/iterativ-academy.git HEAD:master
- &deploy-academy
name: deploy to iterativ-academy on Heroku name: deploy to iterativ-academy on Heroku
deployment: academy-stage deployment: academy-stage
script: script:
- git push https://heroku:$HEROKU_API_KEY@git.heroku.com/iterativ-academy.git HEAD:master - git push https://heroku:$HEROKU_API_KEY@git.heroku.com/iterativ-academy.git HEAD:master
- &deploy-stage - &deploy-stage
name: deploy to stage on Heroku name: deploy to stage on Heroku
deployment: stage deployment: stage
script: script:
- git push https://heroku:$HEROKU_API_KEY@git.heroku.com/skillbox-stage.git develop:master - git push https://heroku:$HEROKU_API_KEY@git.heroku.com/skillbox-stage.git develop:master
- &deploy-prod-manual - &deploy-preprod-manual
name: deploy to skillbox-prod on Heroku name: deploy to prod environments on heroku
deployment: prod
trigger: manual trigger: manual
deployment: preprod
script:
- git push https://heroku:$HEROKU_API_KEY@git.heroku.com/skillbox-preprod.git master:master
- git push https://heroku:$HEROKU_API_KEY@git.heroku.com/my-kv-preprod.git master:master
- &deploy-prod-manual
name: deploy to prod environments on heroku
trigger: manual
deployment: prod
script: script:
- git push https://heroku:$HEROKU_API_KEY@git.heroku.com/skillbox-prod.git HEAD:master - git push https://heroku:$HEROKU_API_KEY@git.heroku.com/skillbox-prod.git HEAD:master
- &deploy-my-kv-prod-manual
name: deploy to my-kv-prod on Heroku
deployment: my-kv-prod
trigger: manual
script:
- git push https://heroku:$HEROKU_API_KEY@git.heroku.com/my-kv-prod.git HEAD:master - git push https://heroku:$HEROKU_API_KEY@git.heroku.com/my-kv-prod.git HEAD:master
pipelines: pipelines:
@ -158,7 +152,9 @@ pipelines:
- parallel: - parallel:
- step: *unittest-python - step: *unittest-python
- step: *cypress-test - step: *cypress-test
- step: *frontend-test
- step: *jest-test - step: *jest-test
- step: *deploy-preprod-manual
develop: develop:
- parallel: - parallel:
@ -170,6 +166,7 @@ pipelines:
- parallel: - parallel:
- step: *deploy-stage - step: *deploy-stage
- step: *deploy-academy - step: *deploy-academy
- step: *deploy-preprod-manual
tags: tags:
v202*: v202*:
@ -177,19 +174,9 @@ pipelines:
- step: *unittest-python - step: *unittest-python
- step: *cypress-test - step: *cypress-test
- step: *jest-test - step: *jest-test
- parallel:
- step: *deploy-prod-manual - step: *deploy-prod-manual
- step: *deploy-my-kv-prod-manual
custom: custom:
prod:
- parallel:
- step: *unittest-python
- step: *cypress-test
- step: *jest-test
- parallel:
- step: *deploy-prod-manual
cypress-parallel: cypress-parallel:
- parallel: - parallel:
- step: *frontend-test-parallel - step: *frontend-test-parallel