grafana/wercker.yml

68 lines
1.7 KiB
YAML
Raw Normal View History

2015-03-03 10:56:08 -06:00
box: wercker/golang
2014-12-30 02:33:27 -06:00
2014-12-30 03:58:13 -06:00
steps:
- wercker/npm-install@0.9.3
2014-12-30 04:09:50 -06:00
- wercker/step-grunt
2015-03-03 12:58:57 -06:00
- wercker/s3sync
2014-12-30 03:58:13 -06:00
2014-12-30 03:48:46 -06:00
build:
steps:
# Workspace
2015-03-03 13:17:13 -06:00
- setup-go-workspace
2015-03-03 13:35:42 -06:00
- script:
name: build setup
code: |
go run build.go setup
# Build the project
- script:
name: build
code: |
go run build.go clean test build
# frontend
- npm-install
- grunt:
tasks: release
# create packages
2015-03-03 11:11:16 -06:00
- script:
name: create packages
code: |
2015-03-03 13:35:42 -06:00
sudo gem install fpm
sudo apt-get update
sudo apt-get install -y rpm
go run build.go package
# save packages
- script:
name: copy output
code: |-
cp -r $WERCKER_SOURCE_DIR/dist/ $WERCKER_ROOT/
2015-03-03 13:35:42 -06:00
rsync -rv "$WERCKER_SOURCE_DIR/dist/" "$WERCKER_OUTPUT_DIR"
2015-03-03 11:11:16 -06:00
2015-03-03 12:59:53 -06:00
- s3sync:
2015-03-03 12:58:57 -06:00
key-id: $AWS_S3_KEY
key-secret: $AWS_S3_SECRET
bucket-url: $AWS_S3_BUCKET
2015-03-03 13:26:39 -06:00
source-dir: dist/
2015-03-03 12:58:57 -06:00
delete-removed: false
2015-01-04 08:05:40 -06:00
deploy:
steps:
2015-01-04 08:13:43 -06:00
- add-to-known_hosts:
hostname: play.grafana.org
- mktemp:
envvar: PRIVATEKEY_PATH
- create-file:
name: write key
filename: $PRIVATEKEY_PATH
content: $GRAFANA_PLAY_PRIVATE
overwrite: true
hide-from-log: true
- script:
name: transfer application
code: |
pwd
ls -la
2015-01-04 11:14:28 -06:00
scp -i $PRIVATEKEY_PATH -o StrictHostKeyChecking=no -o UserKnownHostsFile=no * deploy@play.grafana.org:/home/deploy/
2015-01-04 10:52:10 -06:00
- script:
name: deploy application
2015-01-04 11:37:45 -06:00
code: ssh -i $PRIVATEKEY_PATH -l deploy -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no play.grafana.org ./wercker_deploy.sh
2015-01-04 10:52:10 -06:00