Skip to content

Commit

Permalink
Fix deploy error: need 'cd server' so requirements-core.txt can be fo…
Browse files Browse the repository at this point in the history
…und (#634)

* Fix staging deploy error: need 'cd server' so requirements-core.txt can be found

* comment

* Update package-lock.json

* clean

* clean

* fix

* fix test
  • Loading branch information
shifucun authored Oct 21, 2020
1 parent 9457c1a commit e17e655
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 9 deletions.
10 changes: 5 additions & 5 deletions cloudbuild.deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ steps:
args:
- -c
- |
set -x
./run_test.sh -lbc
- id: flask_test
Expand All @@ -28,7 +27,6 @@ steps:
args:
- -c
- |
set -x
./run_test.sh -p
- id: deploy
Expand All @@ -37,7 +35,7 @@ steps:
args:
- -c
- |
set -x
set -e
# Set project
gcloud config set project datcom-browser-staging
Expand All @@ -50,7 +48,8 @@ steps:
# Deploy flask app service
gcloud config set app/cloud_build_timeout 1200
gcloud app deploy server/app_staging.yaml -q --version=$SHORT_SHA
cd server
gcloud app deploy app_staging.yaml -q --version=$SHORT_SHA
# Keep at most 5 recent versions
if [[ "$(gcloud app versions list | wc -l)" -gt 6 ]]; then
Expand All @@ -65,7 +64,8 @@ steps:
args:
- -c
- |
set -x
set -e
gcloud source repos clone deployment --project=datcom-ci
cd deployment
# Configure Git to create commits with Cloud Build's service account
Expand Down
3 changes: 1 addition & 2 deletions cloudbuild.py.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ steps:
args:
- -c
- |
set -x
# ./run_test.sh -b can run npm run-script build command which can build all the js files.
# These js files generated will be necessery for the flask_webdriver_test task.
./run_test.sh -b
Expand All @@ -32,5 +31,5 @@ steps:
entrypoint: /bin/sh
args:
- -c
- set -x
- "cd tools/pv_tree_generator && pip install -r requirements.txt && python -m pytest"
# TODO: Add Python linter and any other useful code health tools.
2 changes: 1 addition & 1 deletion cloudbuild.screenshot.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ steps:
args:
- -c
- |
set -x
# ./run_test.sh -b can run npm run-script build command which can build all the js files.
# These js files generated will be necessery for the flask_webdriver_test task.
./run_test.sh -b
Expand All @@ -40,6 +39,7 @@ steps:
args:
- -c
- |
set -e
gsutil cp server/test_screenshots/*.png gs://datcom-browser-screenshot/$SHORT_SHA/
rm -rf server/test_screenshots
# # Fetch author email from git commit history
Expand Down
2 changes: 1 addition & 1 deletion server/webdriver_tests/screenshot/screenshot_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@
},
{
'url':
'/ranking/Count_Person_BelowPovertyLevelInThePast12Months_NativeHawaiianOrOtherPacificIslanderAlone/City/geoId/06085?h=geoId%2F0649670&pc=1&scaling=100&unit=%25',
'/ranking/Count_Person_BelowPovertyLevelInThePast12Months_AsianAlone/City/geoId/06085?h=geoId%2F0649670&pc=1&scaling=100&unit=%25',
'filename_suffix':
'ranking_poverty.png',
'test_class':
Expand Down
6 changes: 6 additions & 0 deletions static/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit e17e655

Please sign in to comment.