|
@@ -9,69 +9,69 @@ metadata:
|
|
namespace: ci
|
|
namespace: ci
|
|
|
|
|
|
steps:
|
|
steps:
|
|
- - name: clone
|
|
|
|
- image: hub.evbj.easou.com/dev/alpine-git:20200622
|
|
|
|
- commands:
|
|
|
|
- - git clone $DRONE_GIT_HTTP_URL .
|
|
|
|
|
|
+- name: clone
|
|
|
|
+ image: hub.evbj.easou.com/dev/alpine-git:20200622
|
|
|
|
+ commands:
|
|
|
|
+ - git clone $DRONE_GIT_HTTP_URL .
|
|
|
|
|
|
- - name: deployment
|
|
|
|
- image: hub.evbj.easou.com/dev/drone-agent:v3.0.1
|
|
|
|
- pull: always
|
|
|
|
- # privileged: true
|
|
|
|
- environment:
|
|
|
|
- JNLP_ENV: pro
|
|
|
|
- JNLP_REPLICAS: 2
|
|
|
|
- JNLP_TAG: 1.0
|
|
|
|
- JNLP_VERSION: v1 # default v1, v2 for canary
|
|
|
|
- DEPLOY_ENV: k8s-1 # 可以选择把应用部署到集群:k8s-1 or k8s-2
|
|
|
|
- JNLP_REPO: hub.evbj.easou.com
|
|
|
|
- JNLP_CONTAINER_PORT: 80
|
|
|
|
- JNLP_INGRESS: nginx
|
|
|
|
- JNLP_SVC_MODE: http
|
|
|
|
- JNLP_STORAGE_CLASS: rbd
|
|
|
|
- JNLP_DOMAIN: .ieasou.cn
|
|
|
|
- JNLP_CONTROL: StatefulSet
|
|
|
|
- JNLP_STORAGE_CAPACITY: 100Gi
|
|
|
|
- JNLP_MOUNT_PATH: /data
|
|
|
|
- JNLP_LIVENESS_INIT: 30
|
|
|
|
- JNLP_LIVENESS_PER: 15
|
|
|
|
- JNLP_READINESS_INIT: 30
|
|
|
|
- JNLP_READINESS_PER: 15
|
|
|
|
- JNLP_INGRESS_PUB: [EXPOSE]
|
|
|
|
- commands:
|
|
|
|
- # 切换目标集群
|
|
|
|
- - kubecm s $DEPLOY_ENV
|
|
|
|
- # 生成配置YAML文件
|
|
|
|
- - python3 /root/tools.py -b
|
|
|
|
- # 部署服务到kubernetes上
|
|
|
|
- - python3 /root/tools.py -a
|
|
|
|
- # 添加dns解析记录,生成访问域名
|
|
|
|
- - python3 /root/tools.py -d
|
|
|
|
|
|
+- name: deployment
|
|
|
|
+ image: hub.evbj.easou.com/dev/drone-agent:v3.0.1
|
|
|
|
+ pull: always
|
|
|
|
+ # privileged: true
|
|
|
|
+ environment:
|
|
|
|
+ JNLP_ENV: pro
|
|
|
|
+ JNLP_REPLICAS: 2
|
|
|
|
+ JNLP_TAG: 1.0
|
|
|
|
+ JNLP_VERSION: v1 # default v1, v2 for canary
|
|
|
|
+ DEPLOY_ENV: k8s-1 # 可以选择把应用部署到集群:k8s-1 or k8s-2
|
|
|
|
+ JNLP_REPO: hub.evbj.easou.com
|
|
|
|
+ JNLP_CONTAINER_PORT: 80
|
|
|
|
+ JNLP_INGRESS: nginx
|
|
|
|
+ JNLP_SVC_MODE: http
|
|
|
|
+ JNLP_STORAGE_CLASS: rbd
|
|
|
|
+ JNLP_DOMAIN: .ieasou.cn
|
|
|
|
+ JNLP_CONTROL: StatefulSet
|
|
|
|
+ JNLP_STORAGE_CAPACITY: 100Gi
|
|
|
|
+ JNLP_MOUNT_PATH: /data
|
|
|
|
+ JNLP_LIVENESS_INIT: 30
|
|
|
|
+ JNLP_LIVENESS_PER: 15
|
|
|
|
+ JNLP_READINESS_INIT: 30
|
|
|
|
+ JNLP_READINESS_PER: 15
|
|
|
|
+ JNLP_INGRESS_PUB: [EXPOSE]
|
|
|
|
+ commands:
|
|
|
|
+ # 切换目标集群
|
|
|
|
+ - kubecm s $DEPLOY_ENV
|
|
|
|
+ # 生成配置YAML文件
|
|
|
|
+ - python3 /root/tools.py -b
|
|
|
|
+ # 部署服务到kubernetes上
|
|
|
|
+ - python3 /root/tools.py -a
|
|
|
|
+ # 添加dns解析记录,生成访问域名
|
|
|
|
+ - python3 /root/tools.py -d
|
|
|
|
|
|
- - name: success
|
|
|
|
- image: hub.evbj.easou.com/dev/drone-wechat:20200622
|
|
|
|
- settings:
|
|
|
|
- corpid: ww419ee4063735e1c0
|
|
|
|
- corp_secret: zpiRBLETH9eLwIMQ4eJ_r_dcm3BPSGeLHvTcft8Ot-M
|
|
|
|
- agent_id: 1000004
|
|
|
|
- title: "Pipeline pro/abroadpay:1.0 Success"
|
|
|
|
- description: "${DRONE_BUILD_LINK} pro/abroadpay:1.0 部署完成 [DEPLOY_MSG]"
|
|
|
|
- msg_url: ${DRONE_BUILD_LINK}
|
|
|
|
- btn_txt: "否"
|
|
|
|
- when:
|
|
|
|
- status:
|
|
|
|
- - success
|
|
|
|
|
|
+- name: success
|
|
|
|
+ image: hub.evbj.easou.com/dev/drone-wechat:20200622
|
|
|
|
+ settings:
|
|
|
|
+ corpid: ww419ee4063735e1c0
|
|
|
|
+ corp_secret: zpiRBLETH9eLwIMQ4eJ_r_dcm3BPSGeLHvTcft8Ot-M
|
|
|
|
+ agent_id: 1000004
|
|
|
|
+ title: "Pipeline pro/abroadpay:1.0 Success"
|
|
|
|
+ description: "${DRONE_BUILD_LINK} pro/abroadpay:1.0 部署完成 [DEPLOY_MSG]"
|
|
|
|
+ msg_url: ${DRONE_BUILD_LINK}
|
|
|
|
+ btn_txt: "否"
|
|
|
|
+ when:
|
|
|
|
+ status:
|
|
|
|
+ - success
|
|
|
|
|
|
- - name: failure
|
|
|
|
- image: hub.evbj.easou.com/dev/drone-wechat:20200622
|
|
|
|
- settings:
|
|
|
|
- corpid: ww419ee4063735e1c0
|
|
|
|
- corp_secret: zpiRBLETH9eLwIMQ4eJ_r_dcm3BPSGeLHvTcft8Ot-M
|
|
|
|
- agent_id: 1000004
|
|
|
|
- title: "Pipeline pro/abroadpay:1.0 Failure"
|
|
|
|
- description: "${DRONE_BUILD_LINK} 部署失败,请检查配置![DEPLOY_MSG]"
|
|
|
|
- msg_url: ${DRONE_BUILD_LINK}
|
|
|
|
- btn_txt: "否"
|
|
|
|
- when:
|
|
|
|
- status:
|
|
|
|
- - failure
|
|
|
|
|
|
+- name: failure
|
|
|
|
+ image: hub.evbj.easou.com/dev/drone-wechat:20200622
|
|
|
|
+ settings:
|
|
|
|
+ corpid: ww419ee4063735e1c0
|
|
|
|
+ corp_secret: zpiRBLETH9eLwIMQ4eJ_r_dcm3BPSGeLHvTcft8Ot-M
|
|
|
|
+ agent_id: 1000004
|
|
|
|
+ title: "Pipeline pro/abroadpay:1.0 Failure"
|
|
|
|
+ description: "${DRONE_BUILD_LINK} 部署失败,请检查配置![DEPLOY_MSG]"
|
|
|
|
+ msg_url: ${DRONE_BUILD_LINK}
|
|
|
|
+ btn_txt: "否"
|
|
|
|
+ when:
|
|
|
|
+ status:
|
|
|
|
+ - failure
|