.drone.yml 2.0 KB

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