ci: GCP deploy (#810)

* ci: test docs-publish

* Require unit tests for dry run

* ci: Make sure our docs publish is executable

* Try to correct path issue

* Try repo prefix

* Try as yarn command

* Need a workspace to attach to from previous step

* Add before we call our bash script

* See if we can enforce commands being available -- or just install locally?

* Try again

* Try SSH

* Include username in gh https url

* Note regarding failure on PR branches

* Remove docs publish from PR workflow

* chore: ability to specify an alternative html-template at build time

* chore: add command to build demo PWA website output

* chore: remove unused CI code

* Testing GCP capabilities

* syntax

* Naming

* naming

* chore: WebPack output progress that we care about

* chore: Only publish the app config we care about

* PWA should publish source map

* Unused index.html file

* chore: Remove unused copy-webpack-plugin ignore

* Don't generate source map until we resolve memory issue

* ci: attempt to publish with GCP bucket deploy
This commit is contained in:
Danny Brown authored and GitHub committed 2019-08-27 14:43:44 -04:00
1 parent 073c0af7f7
commit 619d363243
5 files changed
+28 -64

No files matched your search

+9 -13
View File
@@ -231,7 +231,6 @@ jobs:
name: 'Build Demo Site, Upload SourceMaps, Send Deploy Notification'
command: |
npx lerna run build:viewer:demo --stream
# perl -i -pe 's#</head>#`cat .circleci/rollbar.html` #e' build/index.html
# export FILE_1=$(find ./build/static/js -type f -name "2.*.js" -exec basename {} \;)
# export FILE_MAIN=$(find ./build/static/js -type f -name "main.*.js" -exec basename {} \;)
# export FILE_RUNTIME_MAIN=$(find ./build/static/js -type f -name "runtime~main.*.js" -exec basename {} \;)
@@ -254,18 +253,15 @@ jobs:
- setup_remote_docker:
docker_layer_caching: true
- run:
name: Node Test
command: npx lerna run build:viewer:demo --stream
# - run:
# name: Deploy latest version to viewer.ohif.org
# command: |
# # https://circleci.com/docs/2.0/google-auth/#authorization
# echo $GCLOUD_SERVICE_KEY | gcloud auth activate-service-account --key-file=-
# gcloud --quiet config set project ${GOOGLE_PROJECT_ID}
# gcloud --quiet config set compute/zone ${GOOGLE_COMPUTE_ZONE}
# # Remove all files in Storage Bucket; Push latest
# gsutil -m rm gs://$GOOGLE_STORAGE_BUCKET/**
# gsutil -m rsync -R platform/viewer/dist gs://$GOOGLE_STORAGE_BUCKET
name: Deploy latest version to viewer.ohif.org
command: |
# https://circleci.com/docs/2.0/google-auth/#authorization
echo $GCLOUD_SERVICE_KEY | gcloud auth activate-service-account --key-file=-
gcloud --quiet config set project ${GOOGLE_PROJECT_ID}
gcloud --quiet config set compute/zone ${GOOGLE_COMPUTE_ZONE}
# Remove all files in Storage Bucket; Push latest
gsutil -m rm gs://$GOOGLE_STORAGE_BUCKET/**
gsutil -m rsync -R platform/viewer/dist gs://$GOOGLE_STORAGE_BUCKET
workflows:
version: 2