.drone.yml.bak 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. ---
  2. kind: pipeline
  3. type: kubernetes
  4. name: dashouye
  5. clone:
  6. disable: true
  7. steps:
  8. - name: clone
  9. image: hub.evbj.easou.com/dev/alpine-git:20200622
  10. commands:
  11. - git clone $DRONE_GIT_HTTP_URL .
  12. - name: build
  13. image: hub.evbj.easou.com/dev/drone-agent-custom:v6.0.0
  14. # pull: always
  15. privileged: true
  16. environment:
  17. JNLP_ENV: qa
  18. JNLP_REPO: hub.evbj.easou.com
  19. #JNLP_TAG: v2.0.20
  20. JNLP_TAG: v3base
  21. JNLP_VERSION: v1
  22. JNLP_CONTAINER_PORT: 80
  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: 1
  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