Update deploy steps
This commit is contained in:
parent
fec8022f0f
commit
782cb50f92
|
|
@ -20,128 +20,122 @@ 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:
|
name: lint
|
||||||
- &lint
|
caches:
|
||||||
name: lint
|
- clientmodules
|
||||||
caches:
|
script:
|
||||||
|
- npm install --prefix client
|
||||||
|
- npm run lint --prefix client
|
||||||
|
- &unittest-python
|
||||||
|
name: run python unit tests
|
||||||
|
caches:
|
||||||
|
- pip
|
||||||
|
services:
|
||||||
|
- postgres
|
||||||
|
script: # Modify the commands below to build your repository.
|
||||||
|
- &setup-tests source setup-for-tests.sh
|
||||||
|
- ./server/run_unittests_coverage.sh
|
||||||
|
- &cypress-test
|
||||||
|
name: run cypress end-to-end tests
|
||||||
|
caches:
|
||||||
|
- pip
|
||||||
|
- node
|
||||||
- clientmodules
|
- clientmodules
|
||||||
script:
|
- npm
|
||||||
|
- cypress
|
||||||
|
artifacts:
|
||||||
|
- client/cypress/**/*.png
|
||||||
|
- client/cypress/**/*.mp4
|
||||||
|
services:
|
||||||
|
- postgres
|
||||||
|
script:
|
||||||
|
- echo "This pipeline rules!"
|
||||||
|
- *setup-tests
|
||||||
|
- npm ci --prefix client
|
||||||
|
- npm run "install:cypress" --prefix client
|
||||||
|
- psql -U $DATABASE_USER -h $DATABASE_HOST -c "create database $DATABASE_NAME"
|
||||||
|
- python server/manage.py dummy_data
|
||||||
|
- python server/manage.py runserver 2>&1 > /dev/null &
|
||||||
|
- npm run build --prefix client
|
||||||
|
- curl http://localhost:8000/beta-login
|
||||||
|
- npm run --prefix client test:cypress:e2e
|
||||||
|
- &frontend-test
|
||||||
|
name: run cypress frontend tests
|
||||||
|
caches:
|
||||||
|
- node
|
||||||
|
- clientmodules
|
||||||
|
- npm
|
||||||
|
- cypress
|
||||||
|
artifacts:
|
||||||
|
- client/cypress/**/*.png
|
||||||
|
- client/cypress/**/*.mp4
|
||||||
|
script:
|
||||||
|
- npm ci --prefix client
|
||||||
|
- npm run "install:cypress" --prefix client
|
||||||
|
- npm run dev --prefix client 2>&1 > /dev/null &
|
||||||
|
- sleep 30
|
||||||
|
- curl http://localhost:8080/beta-login
|
||||||
|
- npm run --prefix client test:cypress:frontend
|
||||||
|
- &frontend-test-parallel
|
||||||
|
name: run cypress frontend tests
|
||||||
|
caches:
|
||||||
|
- node
|
||||||
|
- clientmodules
|
||||||
|
- npm
|
||||||
|
- cypress
|
||||||
|
artifacts:
|
||||||
|
- client/cypress/**/*.png
|
||||||
|
- client/cypress/**/*.mp4
|
||||||
|
script:
|
||||||
|
- npm ci --prefix client
|
||||||
|
- npm run "install:cypress" --prefix client
|
||||||
|
- npm run dev --prefix client 2>&1 > /dev/null &
|
||||||
|
- sleep 30
|
||||||
|
- curl http://localhost:8080/beta-login
|
||||||
|
- source bin/run-cypress-parallel.sh
|
||||||
|
- &jest-test
|
||||||
|
name: run jest tests
|
||||||
|
caches:
|
||||||
|
- node
|
||||||
|
- clientmodules
|
||||||
|
script:
|
||||||
|
- echo "This pipeline rules!"
|
||||||
|
- *setup-tests
|
||||||
- npm install --prefix client
|
- npm install --prefix client
|
||||||
- npm run lint --prefix client
|
- cd client
|
||||||
- &unittest-python
|
- npm run test:unit
|
||||||
name: run python unit tests
|
- &deploy-dev
|
||||||
caches:
|
name: deploy to dev on Heroku
|
||||||
- pip
|
deployment: dev
|
||||||
services:
|
trigger: manual
|
||||||
- postgres
|
script:
|
||||||
script: # Modify the commands below to build your repository.
|
- git push --force https://heroku:$HEROKU_API_KEY@git.heroku.com/skillbox-dev.git HEAD:master
|
||||||
- &setup-tests source setup-for-tests.sh
|
- &deploy-academy
|
||||||
- ./server/run_unittests_coverage.sh
|
name: deploy to iterativ-academy on Heroku
|
||||||
- &cypress-test
|
deployment: academy-stage
|
||||||
name: run cypress end-to-end tests
|
script:
|
||||||
caches:
|
- git push https://heroku:$HEROKU_API_KEY@git.heroku.com/iterativ-academy.git HEAD:master
|
||||||
- pip
|
- &deploy-stage
|
||||||
- node
|
name: deploy to stage on Heroku
|
||||||
- clientmodules
|
deployment: stage
|
||||||
- npm
|
script:
|
||||||
- cypress
|
- git push https://heroku:$HEROKU_API_KEY@git.heroku.com/skillbox-stage.git develop:master
|
||||||
artifacts:
|
- &deploy-preprod-manual
|
||||||
- client/cypress/**/*.png
|
name: deploy to prod environments on heroku
|
||||||
- client/cypress/**/*.mp4
|
trigger: manual
|
||||||
services:
|
deployment: preprod
|
||||||
- postgres
|
script:
|
||||||
script:
|
- git push https://heroku:$HEROKU_API_KEY@git.heroku.com/skillbox-preprod.git master:master
|
||||||
- echo "This pipeline rules!"
|
- git push https://heroku:$HEROKU_API_KEY@git.heroku.com/my-kv-preprod.git master:master
|
||||||
- *setup-tests
|
- &deploy-prod-manual
|
||||||
- npm ci --prefix client
|
name: deploy to prod environments on heroku
|
||||||
- npm run "install:cypress" --prefix client
|
trigger: manual
|
||||||
- psql -U $DATABASE_USER -h $DATABASE_HOST -c "create database $DATABASE_NAME"
|
deployment: prod
|
||||||
- python server/manage.py dummy_data
|
script:
|
||||||
- python server/manage.py runserver 2>&1 > /dev/null &
|
- git push https://heroku:$HEROKU_API_KEY@git.heroku.com/skillbox-prod.git HEAD:master
|
||||||
- npm run build --prefix client
|
- git push https://heroku:$HEROKU_API_KEY@git.heroku.com/my-kv-prod.git HEAD:master
|
||||||
- curl http://localhost:8000/beta-login
|
|
||||||
- npm run --prefix client test:cypress:e2e
|
|
||||||
- &frontend-test
|
|
||||||
name: run cypress frontend tests
|
|
||||||
caches:
|
|
||||||
- node
|
|
||||||
- clientmodules
|
|
||||||
- npm
|
|
||||||
- cypress
|
|
||||||
artifacts:
|
|
||||||
- client/cypress/**/*.png
|
|
||||||
- client/cypress/**/*.mp4
|
|
||||||
script:
|
|
||||||
- npm ci --prefix client
|
|
||||||
- npm run "install:cypress" --prefix client
|
|
||||||
- npm run dev --prefix client 2>&1 > /dev/null &
|
|
||||||
- sleep 30
|
|
||||||
- curl http://localhost:8080/beta-login
|
|
||||||
- npm run --prefix client test:cypress:frontend
|
|
||||||
- &frontend-test-parallel
|
|
||||||
name: run cypress frontend tests
|
|
||||||
caches:
|
|
||||||
- node
|
|
||||||
- clientmodules
|
|
||||||
- npm
|
|
||||||
- cypress
|
|
||||||
artifacts:
|
|
||||||
- client/cypress/**/*.png
|
|
||||||
- client/cypress/**/*.mp4
|
|
||||||
script:
|
|
||||||
- npm ci --prefix client
|
|
||||||
- npm run "install:cypress" --prefix client
|
|
||||||
- npm run dev --prefix client 2>&1 > /dev/null &
|
|
||||||
- sleep 30
|
|
||||||
- curl http://localhost:8080/beta-login
|
|
||||||
- source bin/run-cypress-parallel.sh
|
|
||||||
- &jest-test
|
|
||||||
name: run jest tests
|
|
||||||
caches:
|
|
||||||
- node
|
|
||||||
- clientmodules
|
|
||||||
script:
|
|
||||||
- echo "This pipeline rules!"
|
|
||||||
- *setup-tests
|
|
||||||
- npm install --prefix client
|
|
||||||
- cd client
|
|
||||||
- npm run test:unit
|
|
||||||
- &deploy-dev
|
|
||||||
name: deploy to dev on Heroku
|
|
||||||
deployment: dev
|
|
||||||
trigger: manual
|
|
||||||
script:
|
|
||||||
- git push --force https://heroku:$HEROKU_API_KEY@git.heroku.com/skillbox-dev.git HEAD:master
|
|
||||||
- &deploy-academy-manual
|
|
||||||
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
|
|
||||||
deployment: academy-stage
|
|
||||||
script:
|
|
||||||
- git push https://heroku:$HEROKU_API_KEY@git.heroku.com/iterativ-academy.git HEAD:master
|
|
||||||
- &deploy-stage
|
|
||||||
name: deploy to stage on Heroku
|
|
||||||
deployment: stage
|
|
||||||
script:
|
|
||||||
- git push https://heroku:$HEROKU_API_KEY@git.heroku.com/skillbox-stage.git develop:master
|
|
||||||
- &deploy-prod-manual
|
|
||||||
name: deploy to skillbox-prod on Heroku
|
|
||||||
deployment: prod
|
|
||||||
trigger: manual
|
|
||||||
script:
|
|
||||||
- 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
|
|
||||||
|
|
||||||
pipelines:
|
pipelines:
|
||||||
default:
|
default:
|
||||||
|
|
@ -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-my-kv-prod-manual
|
|
||||||
|
|
||||||
custom:
|
|
||||||
prod:
|
|
||||||
- parallel:
|
|
||||||
- step: *unittest-python
|
|
||||||
- step: *cypress-test
|
|
||||||
- step: *jest-test
|
|
||||||
- parallel:
|
|
||||||
- step: *deploy-prod-manual
|
- step: *deploy-prod-manual
|
||||||
|
|
||||||
|
custom:
|
||||||
cypress-parallel:
|
cypress-parallel:
|
||||||
- parallel:
|
- parallel:
|
||||||
- step: *frontend-test-parallel
|
- step: *frontend-test-parallel
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue