.drone.yml 2.0 KB

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