.drone.yml 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  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. # Mount the cache volume, needs "Trusted"
  16. volumes:
  17. - /tmp/cache:/cache
  18. backend:
  19. image: golang
  20. environment:
  21. - GOPATH=/app/go/deps:/app/go
  22. commands:
  23. - go get github.com/axw/gocov/gocov
  24. - go get -d ./go/src/...
  25. - go get -d -t ./go/src/...
  26. - go/deps/bin/gocov test -v -race ./go/src/... | go/deps/bin/gocov report
  27. - CGO_ENABLED=0 go build -o DIST/flowserver flowserver/cmd/flowserver
  28. frontend:
  29. image: node:6
  30. commands:
  31. - cd browser/vue-flow
  32. - yarn
  33. - yarn build
  34. rebuild-cache:
  35. image: drillster/drone-volume-cache
  36. rebuild: true
  37. mount:
  38. - ./browser/vue-flow/node_modules
  39. - ./go/deps
  40. # Mount the cache volume, needs "Trusted"
  41. volumes:
  42. - /tmp/cache:/cache
  43. deploy:
  44. image: docker
  45. when:
  46. event: deployment
  47. environment: staging
  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. notify:
  58. image: drillster/drone-email
  59. from: drone@hexasoftware.com
  60. host: mail.hexasoftware.com
  61. skip_verify: true
  62. username: drone@hexasoftware.com
  63. recipients:
  64. - luisf@hexasoftware.com
  65. secrets: [email_password]
  66. when:
  67. status: [ failure, success ]