.drone.yml 2.0 KB

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