grafana/wercker.yml

58 lines
1.4 KiB
YAML
Raw Normal View History

2014-12-30 02:33:27 -06:00
box: wercker/golang
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
2014-12-30 03:58:13 -06:00
2014-12-30 03:48:46 -06:00
build:
steps:
# Workspace
- setup-go-workspace
- script:
2014-12-30 04:09:50 -06:00
name: install godep
2014-12-30 04:11:49 -06:00
code: |
2014-12-30 04:09:50 -06:00
go get -u github.com/tools/godep
go install github.com/tools/godep
2014-12-30 03:48:46 -06:00
# Build the project
- script:
name: build backend
2014-12-30 03:48:46 -06:00
code: |
go run build.go build
2014-12-30 03:48:46 -06:00
# Test the project
- script:
name: test backend
2014-12-30 03:48:46 -06:00
code: |
go run build.go test
2014-12-30 04:09:50 -06:00
# frontend
2014-12-30 03:48:46 -06:00
- npm-install:
2014-12-30 03:58:13 -06:00
cwd: grafana/
2014-12-30 04:09:50 -06:00
- grunt:
cwd: grafana/
2015-01-04 07:44:22 -06:00
tasks: release --mode=backend
2015-01-04 10:52:10 -06:00
- script:
name: copy output
code: |-
2015-01-04 11:08:43 -06:00
rsync -rv "$WERCKER_SOURCE_DIR/grafana/dist/" "$WERCKER_OUTPUT_DIR"
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