From 02672f8c53f34eda13526f8d4f0e8b2e3bfc2211 Mon Sep 17 00:00:00 2001 From: Daniel Chao Date: Mon, 5 Nov 2018 20:23:28 -0700 Subject: [PATCH 1/2] Run dry-run deploy of graphcool deploy on pull requests --- .travis.yml | 3 ++- bin/deploy_prod_backend.sh | 15 ++++++++++++--- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index 608d5c8..5b96735 100644 --- a/.travis.yml +++ b/.travis.yml @@ -9,10 +9,11 @@ cache: script: - npm run lint - npm test + - bin/deploy_prod_backend.sh --dry-run deploy: - provider: script skip_cleanup: true - script: bin/deploy_prod_backend.sh + script: bin/deploy_prod_backend.sh --actually-deploy-graphcool on: branch: master diff --git a/bin/deploy_prod_backend.sh b/bin/deploy_prod_backend.sh index 6230a4d..7dad2df 100755 --- a/bin/deploy_prod_backend.sh +++ b/bin/deploy_prod_backend.sh @@ -79,8 +79,17 @@ platformToken: >- $GRAPHCOOL_TOKEN EOF -if [ "$GRAPHCOOL_FORCE_DEPLOY" == true ]; then - npm run deployProdBackend -- --force +additional_flags='--dry-run' + +if [ "$1" == "--actually-deploy-graphcool" ]; then + green "Deploying the graphcool backend" + additional_flags='' else - npm run deployProdBackend + yellow "Running a dry run of the graphcool backend deploy" fi + +if [ "$GRAPHCOOL_FORCE_DEPLOY" == true ]; then + npm run deployProdBackend -- --force $additional_flags +else + npm run deployProdBackend -- $additional_flags +fi \ No newline at end of file From 1b5a5e29e7933da32e455644582e32517b287599 Mon Sep 17 00:00:00 2001 From: Daniel Chao Date: Mon, 5 Nov 2018 20:50:08 -0700 Subject: [PATCH 2/2] Add target to graphcool dry-run --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 5b96735..1c2a658 100644 --- a/.travis.yml +++ b/.travis.yml @@ -9,7 +9,7 @@ cache: script: - npm run lint - npm test - - bin/deploy_prod_backend.sh --dry-run + - bin/deploy_prod_backend.sh --dry-run --target $GRAPHCOOL_TARGET deploy: - provider: script