Uses git branch for backend and pb containers for e2e testing
This commit is contained in:
parent
2b9e99a3db
commit
99ac282dc2
|
@ -14,6 +14,15 @@ services:
|
|||
- docker
|
||||
- xvfb
|
||||
|
||||
before_install:
|
||||
- |
|
||||
branches=('dev' 'testing' 'demo' 'training' 'staging')
|
||||
if [[ " ${arr[@]} " =~ " ${TRAVIS_BRANCH} " ]]; then
|
||||
export E2E_TAG="$TRAVIS_BRANCH"
|
||||
else
|
||||
export E2E_TAG="latest"
|
||||
fi
|
||||
|
||||
install:
|
||||
- npm install
|
||||
|
||||
|
|
|
@ -20,19 +20,20 @@ services:
|
|||
container_name: backend
|
||||
depends_on:
|
||||
- db
|
||||
image: sartography/cr-connect-workflow
|
||||
image: sartography/cr-connect-workflow:$E2E_TAG
|
||||
volumes:
|
||||
- ./flask-config/config.py:/crc-workflow/instance/config.py
|
||||
environment:
|
||||
- FLASK_APP=./crc/__init__.py
|
||||
- RESET_DB=true
|
||||
- LDAP_URL=ldap
|
||||
ports:
|
||||
- "5000:5000"
|
||||
command: ./wait-for-it.sh db:5432 -t 0 -- ./docker_run.sh
|
||||
|
||||
pb:
|
||||
container_name: pb
|
||||
image: sartography/protocol-builder-mock
|
||||
image: sartography/protocol-builder-mock:$E2E_TAG
|
||||
volumes:
|
||||
- ./flask-config/config_pb.py:/protocol-builder-mock/instance/config.py
|
||||
environment:
|
||||
|
@ -41,3 +42,8 @@ services:
|
|||
- "5001:5001"
|
||||
command: ./wait-for-it.sh db:5432 -t 0 -- ./docker_run.sh
|
||||
|
||||
ldap:
|
||||
container_name: ldap
|
||||
image: tuxmonteiro/ldap-mock
|
||||
ports:
|
||||
- "3890"
|
||||
|
|
|
@ -6,4 +6,10 @@ CORS_ENABLED = False
|
|||
DEVELOPMENT = True
|
||||
SQLALCHEMY_DATABASE_URI = "postgresql://crc_user:crc_pass@db:5432/crc_dev"
|
||||
|
||||
# %s/%i placeholders expected for uva_id and study_id in various calls.
|
||||
PB_USER_STUDIES_URL = "http://pb:5001/pb/user_studies?uva_id=%s"
|
||||
PB_INVESTIGATORS_URL = "http://pb:5001/pb/investigators?studyid=%i"
|
||||
PB_REQUIRED_DOCS_URL = "http://pb:5001/pb/required_docs?studyid=%i"
|
||||
PB_STUDY_DETAILS_URL = "http://pb:5001/pb/study?studyid=%i"
|
||||
|
||||
print('\n\n*** USING INSTANCE CONFIG ***\n\n')
|
||||
|
|
|
@ -13,11 +13,14 @@
|
|||
"lint": "ng lint",
|
||||
"e2e": "./node_modules/protractor/bin/webdriver-manager update && ng e2e",
|
||||
"e2e:with-wf": "npm run e2e-wf && ng e2e && npm run e2e-wf:stop && npm run e2e-wf:clean",
|
||||
"e2e-wf:stop": "docker stop db || true && docker stop backend || true",
|
||||
"e2e-wf:stop": "docker stop db || true && docker stop backend || true && docker stop pb || true",
|
||||
"e2e-wf:clean": "docker system prune -f && cd docker && docker-compose rm -f -v -s && cd ..",
|
||||
"e2e-wf:build": "cd docker && docker-compose pull && docker-compose build --no-cache && cd ..",
|
||||
"e2e-wf:start": "cd docker && docker-compose up -d && cd ..",
|
||||
"e2e-wf": "npm run e2e-wf:stop && npm run e2e-wf:clean && npm run e2e-wf:build && npm run e2e-wf:start",
|
||||
"e2e-wf:db-upgrade": "docker exec -it backend pipenv run flask db upgrade",
|
||||
"e2e-wf:db-setup": "docker exec -it backend pipenv run flask load-example-data",
|
||||
"e2e-wf:pb-setup": "docker exec -it pb pipenv run flask db upgrade",
|
||||
"e2e-wf": "npm run e2e-wf:stop && npm run e2e-wf:clean && npm run e2e-wf:build && npm run e2e-wf:start && npm run e2e-wf:db-upgrade && npm run e2e-wf:db-setup && npm run e2e-wf:pb-setup",
|
||||
"ci": "npm run lint && npm run test:coverage && npm run e2e:with-wf && sonar-scanner"
|
||||
},
|
||||
"private": true,
|
||||
|
|
Loading…
Reference in New Issue