.drone.yml 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. workspace:
  2. base: /app
  3. path: .
  4. cache:
  5. - ".git"
  6. - "browser/vue-flow/node_modules"
  7. - "go/deps"
  8. pipeline:
  9. restore-cache:
  10. image: drillster/drone-volume-cache
  11. restore: true
  12. mount:
  13. - ./browser/vue-flow/node_modules
  14. - ./go/deps
  15. volumes:
  16. - /tmp/cache:/cache
  17. frontend:
  18. image: node:6
  19. commands:
  20. - cd browser/vue-flow
  21. - yarn
  22. - yarn build
  23. backend:
  24. image: golang
  25. environment:
  26. - GOPATH=/app/go/deps:/app/go
  27. commands:
  28. - go get github.com/axw/gocov/gocov
  29. - go get github.com/gohxs/folder2go
  30. - go get -d ./go/src/...
  31. - go get -d -t ./go/src/...
  32. - go/deps/bin/gocov test -v -race ./go/src/... | go/deps/bin/gocov report
  33. - go/deps/bin/folder2go -nobackup ./browser/vue-flow/dist webbin go/src/flow/cmd/demo/webbin/webbin.go
  34. - CGO_ENABLED=0 go build -o DIST/demo1 demos/cmd/demo1
  35. rebuild-cache:
  36. image: drillster/drone-volume-cache
  37. rebuild: true
  38. mount:
  39. - ./browser/vue-flow/node_modules
  40. - ./go/deps
  41. volumes:
  42. - /tmp/cache:/cache
  43. deploy:
  44. image: docker
  45. when:
  46. environment: staging
  47. event: deployment
  48. commands:
  49. - echo $HOME
  50. - mkdir -p DIST
  51. - cp -r browser/vue-flow/dist DIST/web
  52. - docker build --rm -t hexasoftware.com:5000/flow-proto -f ./docker/Dockerfile .
  53. - docker push hexasoftware.com:5000/flow-proto
  54. volumes:
  55. - /var/run/docker.sock:/var/run/docker.sock
  56. - /home/stdio/.docker/config.json:/root/.docker/config.json
  57. #check secrets
  58. notify:
  59. image: drillster/drone-email
  60. from: drone@hexasoftware.com
  61. skip_verify: true
  62. secrets: [email_password, email_recipients, email_host, email_username]
  63. when:
  64. status: [ failure, success ]