.drone.yml 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. ---
  2. kind: pipeline
  3. type: kubernetes
  4. name: dashouye
  5. clone:
  6. disable: true
  7. steps:
  8. - name: clone
  9. image: hub.evbj.easou.com/dev/alpine-git:20200622
  10. commands:
  11. - git clone $DRONE_GIT_HTTP_URL .
  12. - name: build
  13. image: hub.evbj.easou.com/dev/drone-agent-custom:v6.0.0
  14. # pull: always
  15. privileged: true
  16. environment:
  17. JNLP_ENV: pro
  18. JNLP_REPO: hub.evbj.easou.com
  19. JNLP_TAG: v2.0.7
  20. JNLP_VERSION: v1
  21. JNLP_CONTAINER_PORT: 80
  22. JNLP_INGRESS: nginx
  23. JNLP_SVC_MODE: http
  24. JNLP_STORAGE_CLASS: rbd
  25. JNLP_DOMAIN: .ieasou.cn
  26. JNLP_CONTROL: StatefulSet
  27. JNLP_REPLICAS: 4
  28. JNLP_STORAGE_CAPACITY: 100Gi
  29. JNLP_MOUNT_PATH: /data
  30. JNLP_LIVENESS_INIT: 60
  31. JNLP_LIVENESS_PER: 10
  32. JNLP_READINESS_INIT: 60
  33. JNLP_READINESS_PER: 10
  34. commands:
  35. - wrapper.sh /bin/sh
  36. - docker --config /etc/docker build -t "$JNLP_REPO/$JNLP_ENV/$DRONE_REPO_NAME:$JNLP_TAG" . -f Dockerfile
  37. - docker --config /etc/docker push "$JNLP_REPO/$JNLP_ENV/$DRONE_REPO_NAME:$JNLP_TAG"
  38. - python tools.py -b
  39. - python tools.py -a
  40. - python tools.py -c
  41. - python tools.py -d
  42. - name: success
  43. image: hub.evbj.easou.com/dev/drone-wechat:20200622
  44. settings:
  45. corpid: ww419ee4063735e1c0
  46. corp_secret: zpiRBLETH9eLwIMQ4eJ_r_dcm3BPSGeLHvTcft8Ot-M
  47. agent_id: 1000004
  48. title: "Pipeline ${DRONE_REPO_NAME} Success"
  49. description: "${DRONE_BUILD_LINK} 部署完成"
  50. msg_url: ${DRONE_BUILD_LINK}
  51. btn_txt: "否"
  52. when:
  53. status:
  54. - success
  55. - name: failure
  56. image: hub.evbj.easou.com/dev/drone-wechat:20200622
  57. settings:
  58. corpid: ww419ee4063735e1c0
  59. corp_secret: zpiRBLETH9eLwIMQ4eJ_r_dcm3BPSGeLHvTcft8Ot-M
  60. agent_id: 1000004
  61. title: "Pipeline ${DRONE_REPO_NAME} Failure"
  62. description: "${DRONE_BUILD_LINK} 部署失败,请检查配置!"
  63. msg_url: ${DRONE_BUILD_LINK}
  64. btn_txt: "否"
  65. when:
  66. status:
  67. - failure