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