.drone.yml 1.7 KB

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