| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071 |
- box: wercker/golang
- steps:
- - wercker/npm-install@0.9.3
- - wercker/step-grunt
- build:
- steps:
- script: |
- export RUBYVERSION=2.0.0-p594
- sudo apt-get update
- sudo apt-get install git zlib1g-dev libreadline-dev libqtwebkit-dev
- sudo apt-get remove ruby1.9.1
- cd $HOME
- mkdir rubyinstall
- cd rubyinstall
- wget ftp://ftp.ruby-lang.org/pub/ruby/2.0/ruby-$RUBYVERSION.tar.gz
- tar xzvf ruby-$RUBYVERSION.tar.gz
- cd ruby-$RUBYVERSION
- ./configure --with-readline-dir=/usr/include/readline --with-openssl-dir=/usr/include/openssl
- make
- make test
- sudo make install
- cd $HOME
- rm -fr rubyinstall
- # Workspace
- - setup-go-workspace
- - script:
- name: build setup
- code: |
- go run build.go setup
- # Build the project
- - script:
- name: build backend
- code: |
- go run build.go build
- # Test the project
- - script:
- name: test backend
- code: |
- go run build.go test
- # frontend
- - npm-install
- - grunt:
- tasks: release
- - script:
- name: copy output
- code: |-
- rsync -rv "$WERCKER_SOURCE_DIR/dist/" "$WERCKER_OUTPUT_DIR"
- deploy:
- steps:
- - 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
- scp -i $PRIVATEKEY_PATH -o StrictHostKeyChecking=no -o UserKnownHostsFile=no * deploy@play.grafana.org:/home/deploy/
- - script:
- name: deploy application
- code: ssh -i $PRIVATEKEY_PATH -l deploy -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no play.grafana.org ./wercker_deploy.sh
|