.drone.yml 1.7 KB

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