2015-06-19 22:19:20 +03:00
|
|
|
image: crhym3/ci
|
|
|
|
git:
|
|
|
|
depth: 1
|
2015-06-24 18:37:02 +03:00
|
|
|
env:
|
|
|
|
- DRONE_ACCOUNT=996714972814-7q585hf42vmouqkfdbccsnrc6jgclfm1@developer.gserviceaccount.com
|
2015-06-19 22:19:20 +03:00
|
|
|
script:
|
|
|
|
# workaround for cache, see https://github.com/drone/drone/issues/147
|
|
|
|
- mkdir -p /cache/node_modules
|
|
|
|
- rm -rf node_modules
|
|
|
|
- ln -s /cache/node_modules node_modules
|
|
|
|
# install dependencies
|
2015-07-06 17:39:27 +03:00
|
|
|
- npm install
|
2015-07-06 17:57:16 +03:00
|
|
|
- node_modules/napa/bin/napa mojombo/clippy
|
2015-06-19 22:19:20 +03:00
|
|
|
# ensure the build works
|
|
|
|
# this will also run gulp test
|
|
|
|
- gulp
|
2015-06-24 18:37:02 +03:00
|
|
|
# publish to staging if this is master branch
|
|
|
|
- if [ "$CI_BRANCH" != "master" ]; then exit 0; fi
|
|
|
|
- apt-get install -y python-openssl
|
|
|
|
- openssl aes-256-cbc -d -in .drone.p12.enc -out .drone.p12 -pass env:DRONE_PASS
|
|
|
|
- /gcloud/bin/gcloud components update -q gsutil
|
|
|
|
- /gcloud/bin/gcloud auth activate-service-account $DRONE_ACCOUNT --key-file .drone.p12
|
|
|
|
- gulp publish:staging
|
2015-06-19 22:19:20 +03:00
|
|
|
cache:
|
|
|
|
- /cache
|