Jelajahi Sumber

添加 '.drone.yml'

robert 5 tahun lalu
induk
melakukan
569b9f404d
1 mengubah file dengan 62 tambahan dan 0 penghapusan
  1. 62 0
      .drone.yml

+ 62 - 0
.drone.yml

@@ -0,0 +1,62 @@
+---
+kind: pipeline
+name: zbx-tools
+
+steps:
+ - name: build
+   image: hub.evbj.easou.com/dev/drone-agent-custom:v2.0.0
+  #  pull: always
+   privileged: true
+   environment:
+     JNLP_ENV: op
+     JNLP_REPO: hub.evbj.easou.com
+     JNLP_TAG: v1.0.6
+     JNLP_CONTAINER_PORT: 8080
+     JNLP_INGRESS: nginx
+     JNLP_SVC_MODE: http
+     JNLP_STORAGE_CLASS: ceph
+     JNLP_DOMAIN: .appeasou.com
+     JNLP_CONTROL: StatefulSet
+     JNLP_REPLICAS: 1
+     JNLP_STORAGE_CAPACITY: 100Gi
+     JNLP_MOUNT_PATH: /data
+     JNLP_LIVENESS_INIT: 60
+     JNLP_LIVENESS_PER: 10
+     JNLP_READINESS_INIT: 60
+     JNLP_READINESS_PER: 10
+   commands:
+     - wrapper.sh  /bin/sh
+     - docker --config /etc/docker build -t "$JNLP_REPO/$JNLP_ENV/$DRONE_REPO_NAME:$JNLP_TAG" . -f Dockerfile
+     - docker --config /etc/docker push "$JNLP_REPO/$JNLP_ENV/$DRONE_REPO_NAME:$JNLP_TAG"
+     - python ppctl.py -b
+     - python ppctl.py -a
+     - python ppctl.py -d
+     - python ppctl.py -c
+
+ - name: success
+   image: clem109/drone-wechat
+   settings:
+     corpid: ww419ee4063735e1c0
+     corp_secret: zpiRBLETH9eLwIMQ4eJ_r_dcm3BPSGeLHvTcft8Ot-M
+     agent_id: 1000004
+     title: "Pipeline ${DRONE_REPO_NAME} Success"
+     description: "${DRONE_BUILD_LINK} 部署完成"
+     msg_url: ${DRONE_BUILD_LINK}
+     btn_txt: "否"
+   when:
+     status:
+     - success
+
+ - name: failure
+   image: clem109/drone-wechat
+   settings:
+     corpid: ww419ee4063735e1c0
+     corp_secret: zpiRBLETH9eLwIMQ4eJ_r_dcm3BPSGeLHvTcft8Ot-M
+     agent_id: 1000004
+     title: "Pipeline ${DRONE_REPO_NAME} Failure"
+     description: "${DRONE_BUILD_LINK} 部署失败,请检查配置!"
+     msg_url: ${DRONE_BUILD_LINK}
+     btn_txt: "否"
+   when:
+     status:
+     - failure