Skip to content

Instantly share code, notes, and snippets.

@javaguirre
Created May 17, 2018 08:19
Show Gist options
  • Save javaguirre/74eee425aeafce184cc29f1a2d2dd031 to your computer and use it in GitHub Desktop.
Save javaguirre/74eee425aeafce184cc29f1a2d2dd031 to your computer and use it in GitHub Desktop.
# CI
build:golang:
image: golang:1.9
script:
- go get -v -u github.com/hyperledger/fabric-sdk-go
- go get -v -u github.com/stretchr/testify/assert
- mkdir -p $GOPATH/src/gitlab.com/kafkian/ngo
- cp -r /builds/kafkian/ngo/chaincode/ngo/* $GOPATH/src/gitlab.com/kafkian/ngo
# Build hyperledger fabric
- apt-get update && apt-get install -y libltdl-dev
- mkdir -p $GOPATH/src/github.com/hyperledger
- cd $GOPATH/src/github.com/hyperledger
- git clone -b master https://github.com/hyperledger/fabric.git
- cd $GOPATH/src/gitlab.com/kafkian/ngo
- go test -v .
build:node:
image: node:8.7.0
variables:
REDIS_URL: redis://redis:6379
services:
- redis:latest
script:
- npm install
- npm run test
# CD
staging:
type: deploy
script:
- apt-get update -qy
- apt-get install -y ruby ruby-dev
- gem install dpl -v 1.8.47
- dpl --provider=heroku --app=kafkian-ngo-staging --api-key=$HEROKU_API_KEY
only:
- master
production:
type: deploy
script:
- apt-get update -qy
- apt-get install -y ruby ruby-dev
- gem install dpl -v 1.8.47
- dpl --provider=heroku --app=kafkian-ngo --api-key=$HEROKU_API_KEY
only:
- tags
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment