.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: false
  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 flowserver/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. #volumes:
  43. #- /tmp/cache:/cache
  44. deploy:
  45. image: docker
  46. when:
  47. event: deployment
  48. environment: staging
  49. commands:
  50. - echo $HOME
  51. - mkdir -p DIST
  52. - cp -r browser/vue-flow/dist DIST/web
  53. - docker build --rm -t hexasoftware.com:5000/flow-proto -f ./docker/Dockerfile .
  54. - docker push hexasoftware.com:5000/flow-proto
  55. volumes:
  56. - /var/run/docker.sock:/var/run/docker.sock
  57. - /home/stdio/.docker/config.json:/root/.docker/config.json
  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 ]