From fdfaf7f160deb93f40bdbf369dc8f3d0ab001659 Mon Sep 17 00:00:00 2001 From: hanhxiao Date: Fri, 27 Sep 2019 16:05:46 +0800 Subject: [PATCH 1/9] feat(cd): adding benchmark to cd pipeline --- .drone-cd.yml | 83 +++++++++++++++++++++++++++++++++++++ Dockerfiles/dind.Dockerfile | 2 +- 2 files changed, 84 insertions(+), 1 deletion(-) diff --git a/.drone-cd.yml b/.drone-cd.yml index 5668de8a..a3ebebc7 100644 --- a/.drone-cd.yml +++ b/.drone-cd.yml @@ -154,6 +154,89 @@ trigger: event: - tag +volumes: +- name: docker + host: + path: /var/run/docker.sock + +--- + +kind: pipeline +name: master-docker-benchmark + +clone: + depth: 10 + +steps: +- name: notify the start on wechat work + image: byrnedo/alpine-curl + environment: + BOT_URL: + from_secret: BOT_URL + commands: + - export MSG_LINK=${DRONE_BUILD_LINK} + - export MSG_TITLE="⌛🗳 Start to benchmark new master \`$DRONE_SOURCE_BRANCH\`(\`${DRONE_BUILD_NUMBER}\`)" + - export MSG_CONTENT="click the link below to see the status" + - ./shell/push-wechatwork.sh + +- name: build and push docker images + image: gnes/dind + privileged: true + volumes: + - name: docker + path: /var/run/docker.sock + environment: + TCLOUD_USER: + from_secret: TCLOUD_USER + TCLOUD_PWD: + from_secret: TCLOUD_PWD + HUB_USER: + from_secret: HUB_USER + HUB_PWD: + from_secret: HUB_PWD + BADGE_WEBHOOK: + from_secret: BADGE_WEBHOOK + BOT_URL: + from_secret: BOT_URL + GITHUB_USER: + from_secret: GITHUB_USER + GITHUB_PWD: + from_secret: GITHUB_PWD + commands: + - ./docker-build.sh + - docker system prune -a -f + +- name: notify the sucess on wechat work + image: byrnedo/alpine-curl + environment: + BOT_URL: + from_secret: BOT_URL + commands: + - export MSG_LINK=$DRONE_REPO_LINK + - export MSG_TITLE="✅🎁 All images are successfully delivered!" + - export MSG_CONTENT="" + - ./shell/push-wechatwork.sh + +- name: notify the failure on wechat work + image: byrnedo/alpine-curl + environment: + BOT_URL: + from_secret: BOT_URL + commands: + - export MSG_LINK=$DRONE_BUILD_LINK + - export MSG_TITLE="❌🎁 fail to build docker image!" + - export MSG_CONTENT="please inform [$DRONE_COMMIT_AUTHOR]($DRONE_COMMIT_AUTHOR_EMAIL) to modify and fix [\`$DRONE_SOURCE_BRANCH\`]($DRONE_COMMIT_LINK). click the link below to see the details." + - ./shell/push-wechatwork.sh + when: + status: + - failure + +trigger: + branch: + - master + event: + - push + volumes: - name: docker host: diff --git a/Dockerfiles/dind.Dockerfile b/Dockerfiles/dind.Dockerfile index 6f1b8289..b46f2bd9 100644 --- a/Dockerfiles/dind.Dockerfile +++ b/Dockerfiles/dind.Dockerfile @@ -1,5 +1,5 @@ FROM docker:git -RUN apk update && apk upgrade && apk --no-cache add curl bash +RUN apk update && apk upgrade && apk --no-cache add curl bash make CMD ["bash"] \ No newline at end of file From 675b013bec4bdbe0a04d6d88ae29d711180e425a Mon Sep 17 00:00:00 2001 From: hanhxiao Date: Fri, 27 Sep 2019 17:31:04 +0800 Subject: [PATCH 2/9] feat(cd): adding benchmark to cd pipeline --- .drone-cd.yml | 21 ++++++++++++++------- README.md | 5 +++++ benchmark-eval.sh | 31 +++++++++++++++++++++++++++++++ 3 files changed, 50 insertions(+), 7 deletions(-) create mode 100755 benchmark-eval.sh diff --git a/.drone-cd.yml b/.drone-cd.yml index a3ebebc7..c3e28b65 100644 --- a/.drone-cd.yml +++ b/.drone-cd.yml @@ -175,7 +175,7 @@ steps: from_secret: BOT_URL commands: - export MSG_LINK=${DRONE_BUILD_LINK} - - export MSG_TITLE="⌛🗳 Start to benchmark new master \`$DRONE_SOURCE_BRANCH\`(\`${DRONE_BUILD_NUMBER}\`)" + - export MSG_TITLE="🏎️🐎 Start to benchmark the new master \`$DRONE_SOURCE_BRANCH\`(\`${DRONE_BUILD_NUMBER}\`)" - export MSG_CONTENT="click the link below to see the status" - ./shell/push-wechatwork.sh @@ -185,6 +185,8 @@ steps: volumes: - name: docker path: /var/run/docker.sock + - name: cache + path: /workspace environment: TCLOUD_USER: from_secret: TCLOUD_USER @@ -202,8 +204,10 @@ steps: from_secret: GITHUB_USER GITHUB_PWD: from_secret: GITHUB_PWD + BENCHMARK_DIR: /workspace/benchmark/ + SHARED_HOST_PATH: /tmp/ commands: - - ./docker-build.sh + - ./benchmark-eval.sh - docker system prune -a -f - name: notify the sucess on wechat work @@ -213,7 +217,7 @@ steps: from_secret: BOT_URL commands: - export MSG_LINK=$DRONE_REPO_LINK - - export MSG_TITLE="✅🎁 All images are successfully delivered!" + - export MSG_TITLE="✅🏍️ New benchmark is updated!" - export MSG_CONTENT="" - ./shell/push-wechatwork.sh @@ -223,8 +227,8 @@ steps: BOT_URL: from_secret: BOT_URL commands: - - export MSG_LINK=$DRONE_BUILD_LINK - - export MSG_TITLE="❌🎁 fail to build docker image!" + - export MSG_LINK="https://github.com/gnes-ai/benchmark" + - export MSG_TITLE="❌🏍 fail to benchmark GNES!" - export MSG_CONTENT="please inform [$DRONE_COMMIT_AUTHOR]($DRONE_COMMIT_AUTHOR_EMAIL) to modify and fix [\`$DRONE_SOURCE_BRANCH\`]($DRONE_COMMIT_LINK). click the link below to see the details." - ./shell/push-wechatwork.sh when: @@ -235,9 +239,12 @@ trigger: branch: - master event: - - push + - pull_request volumes: - name: docker host: - path: /var/run/docker.sock \ No newline at end of file + path: /var/run/docker.sock +- name: cache + host: + path: /tmp/ \ No newline at end of file diff --git a/README.md b/README.md index 74385a4f..b2692692 100644 --- a/README.md +++ b/README.md @@ -648,6 +648,11 @@ The official documentation of GNES is hosted on [doc.gnes.ai](https://doc.gnes.a - Migrating from [`bert-as-service`](https://github.com/hanxiao/bert-as-service) +

Benchmark

+ +We have setup [this repository](https://github.com/gnes-ai/benchmark) to track the network latency over different GNES versions. As a part of CICD pipeline, this repo gets automatically updated when the [GNES master](https://github.com/gnes-ai/gnes) is updated or a new [GNES version is released](https://github.com/gnes-ai/gnes/releases). + +

Contributing

Thanks for your interest in contributing! GNES always welcome the contribution from the open-source community, individual committers and other partners. Without you, GNES can't be successful. diff --git a/benchmark-eval.sh b/benchmark-eval.sh new file mode 100755 index 00000000..edb04907 --- /dev/null +++ b/benchmark-eval.sh @@ -0,0 +1,31 @@ +#!/usr/bin/env bash + +cd /workspace && rm -rf benchmark && git clone https://github.com/gnes-ai/benchmark.git && cd benchmark + +git remote rm origin && git remote add origin https://$GITHUB_USER:$GITHUB_PWD@github.com/gnes-ai/benchmark.git +git config --global user.email "artex.xh@gmail.com" && git config --global user.name "Han Xiao" + +export GNES_IMG_TAG=latest-alpine + + +for EXP_ID in 1 2 3 4 ; +do + export GNES_BENCHMARK_ID=$EXP_ID + make pull && make build && make test d=1000 b=10 s=1000000 && make clean + make wait t=20 +done + +# faster for debugging CICD +#for EXP_ID in 1 2 ; +#do +# export GNES_BENCHMARK_ID=$EXP_ID +# make pull && make build && make test d=100 b=10 s=10 && make clean +# make wait t=20 +#done + +cat $BENCHMARK_DIR/.data/history*.json +make run_summary +cat $BENCHMARK_DIR/README.md + +git add -u && git status && git commit -m "auto eval the benchmark due to gnes update" +git push --set-upstream origin master \ No newline at end of file From c860bf3d73a8c3d8a7abcdf416537965f9c4bde0 Mon Sep 17 00:00:00 2001 From: hanhxiao Date: Fri, 27 Sep 2019 17:38:45 +0800 Subject: [PATCH 3/9] feat(cd): adding benchmark to cd pipeline --- .drone-cd.yml | 2 ++ benchmark-eval.sh | 9 ++++++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/.drone-cd.yml b/.drone-cd.yml index c3e28b65..d986cc4a 100644 --- a/.drone-cd.yml +++ b/.drone-cd.yml @@ -204,6 +204,8 @@ steps: from_secret: GITHUB_USER GITHUB_PWD: from_secret: GITHUB_PWD + DO_BENCHMARK: + from_secret: DO_BENCHMARK BENCHMARK_DIR: /workspace/benchmark/ SHARED_HOST_PATH: /tmp/ commands: diff --git a/benchmark-eval.sh b/benchmark-eval.sh index edb04907..b2a28a9f 100755 --- a/benchmark-eval.sh +++ b/benchmark-eval.sh @@ -1,5 +1,11 @@ #!/usr/bin/env bash +# prevent duplicate evaluation over multiple CICD machines +if [[ -z "${DO_BENCHMARK}" ]]; then + printf "\$DO_BENCHMARK not set, exit\n" + exit 1 +fi + cd /workspace && rm -rf benchmark && git clone https://github.com/gnes-ai/benchmark.git && cd benchmark git remote rm origin && git remote add origin https://$GITHUB_USER:$GITHUB_PWD@github.com/gnes-ai/benchmark.git @@ -7,6 +13,7 @@ git config --global user.email "artex.xh@gmail.com" && git config --global user. export GNES_IMG_TAG=latest-alpine +docker swarm join for EXP_ID in 1 2 3 4 ; do @@ -27,5 +34,5 @@ cat $BENCHMARK_DIR/.data/history*.json make run_summary cat $BENCHMARK_DIR/README.md -git add -u && git status && git commit -m "auto eval the benchmark due to gnes update" +git add -u && git status && git commit -m "auto eval the benchmark due to gnes update (${DRONE_TAG})" git push --set-upstream origin master \ No newline at end of file From af507e8a070c45a57e0ef6e78694e5c311467c01 Mon Sep 17 00:00:00 2001 From: hanhxiao Date: Fri, 27 Sep 2019 17:40:02 +0800 Subject: [PATCH 4/9] feat(cd): adding benchmark to cd pipeline --- benchmark-eval.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/benchmark-eval.sh b/benchmark-eval.sh index b2a28a9f..381fdc0e 100755 --- a/benchmark-eval.sh +++ b/benchmark-eval.sh @@ -13,7 +13,7 @@ git config --global user.email "artex.xh@gmail.com" && git config --global user. export GNES_IMG_TAG=latest-alpine -docker swarm join +docker swarm init for EXP_ID in 1 2 3 4 ; do From 3974a1ba9d151238c33be577621452883e97d3a2 Mon Sep 17 00:00:00 2001 From: hanhxiao Date: Fri, 27 Sep 2019 17:45:08 +0800 Subject: [PATCH 5/9] feat(cd): adding benchmark to cd pipeline --- benchmark-eval.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/benchmark-eval.sh b/benchmark-eval.sh index 381fdc0e..a8c88bf7 100755 --- a/benchmark-eval.sh +++ b/benchmark-eval.sh @@ -14,12 +14,13 @@ git config --global user.email "artex.xh@gmail.com" && git config --global user. export GNES_IMG_TAG=latest-alpine docker swarm init +make pull && make build for EXP_ID in 1 2 3 4 ; do export GNES_BENCHMARK_ID=$EXP_ID - make pull && make build && make test d=1000 b=10 s=1000000 && make clean - make wait t=20 + make clean && make test d=1000 b=10 s=1000000 && make clean + make wait t=40 done # faster for debugging CICD From 54e705316547b21df5992c73d1a8ce87178a9451 Mon Sep 17 00:00:00 2001 From: hanhxiao Date: Fri, 27 Sep 2019 18:27:54 +0800 Subject: [PATCH 6/9] feat(cd): smaller num document for benchmarking --- benchmark-eval.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/benchmark-eval.sh b/benchmark-eval.sh index a8c88bf7..cfa5412d 100755 --- a/benchmark-eval.sh +++ b/benchmark-eval.sh @@ -19,7 +19,7 @@ make pull && make build for EXP_ID in 1 2 3 4 ; do export GNES_BENCHMARK_ID=$EXP_ID - make clean && make test d=1000 b=10 s=1000000 && make clean + make clean && make test d=500 b=10 s=1000000 && make clean make wait t=40 done From f8b9e00ed04cc4061b915d169ed61f11e3b26e64 Mon Sep 17 00:00:00 2001 From: hanhxiao Date: Fri, 27 Sep 2019 18:42:02 +0800 Subject: [PATCH 7/9] feat(cd): smaller num document for benchmarking --- .drone-cd.yml | 2 +- benchmark-eval.sh | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.drone-cd.yml b/.drone-cd.yml index d986cc4a..63be78d5 100644 --- a/.drone-cd.yml +++ b/.drone-cd.yml @@ -218,7 +218,7 @@ steps: BOT_URL: from_secret: BOT_URL commands: - - export MSG_LINK=$DRONE_REPO_LINK + - export MSG_LINK="https://github.com/gnes-ai/benchmark" - export MSG_TITLE="✅🏍️ New benchmark is updated!" - export MSG_CONTENT="" - ./shell/push-wechatwork.sh diff --git a/benchmark-eval.sh b/benchmark-eval.sh index cfa5412d..d92b6230 100755 --- a/benchmark-eval.sh +++ b/benchmark-eval.sh @@ -11,7 +11,13 @@ cd /workspace && rm -rf benchmark && git clone https://github.com/gnes-ai/benchm git remote rm origin && git remote add origin https://$GITHUB_USER:$GITHUB_PWD@github.com/gnes-ai/benchmark.git git config --global user.email "artex.xh@gmail.com" && git config --global user.name "Han Xiao" -export GNES_IMG_TAG=latest-alpine +if [[ -z "${DRONE_TAG}" ]]; then + VER_TAG="latest" +else + VER_TAG=${DRONE_TAG} +fi + +export GNES_IMG_TAG=${VER_TAG}-alpine docker swarm init make pull && make build From fdc38d5706aaeab48a0181fc90ead1e07339e19d Mon Sep 17 00:00:00 2001 From: hanhxiao Date: Fri, 27 Sep 2019 18:46:27 +0800 Subject: [PATCH 8/9] feat(cd): trigger benchmark in push and tag --- .drone-cd.yml | 92 ++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 91 insertions(+), 1 deletion(-) diff --git a/.drone-cd.yml b/.drone-cd.yml index 63be78d5..7f5dfaa7 100644 --- a/.drone-cd.yml +++ b/.drone-cd.yml @@ -241,7 +241,97 @@ trigger: branch: - master event: - - pull_request + - push + +volumes: +- name: docker + host: + path: /var/run/docker.sock +- name: cache + host: + path: /tmp/ + +--- + +kind: pipeline +name: release-docker-benchmark + +clone: + depth: 10 + +steps: +- name: notify the start on wechat work + image: byrnedo/alpine-curl + environment: + BOT_URL: + from_secret: BOT_URL + commands: + - export MSG_LINK=${DRONE_BUILD_LINK} + - export MSG_TITLE="🏎️🐎 Start to benchmark the new master \`$DRONE_SOURCE_BRANCH\`(\`${DRONE_TAG}\`)" + - export MSG_CONTENT="click the link below to see the status" + - ./shell/push-wechatwork.sh + +- name: build and push docker images + image: gnes/dind + privileged: true + volumes: + - name: docker + path: /var/run/docker.sock + - name: cache + path: /workspace + environment: + TCLOUD_USER: + from_secret: TCLOUD_USER + TCLOUD_PWD: + from_secret: TCLOUD_PWD + HUB_USER: + from_secret: HUB_USER + HUB_PWD: + from_secret: HUB_PWD + BADGE_WEBHOOK: + from_secret: BADGE_WEBHOOK + BOT_URL: + from_secret: BOT_URL + GITHUB_USER: + from_secret: GITHUB_USER + GITHUB_PWD: + from_secret: GITHUB_PWD + DO_BENCHMARK: + from_secret: DO_BENCHMARK + BENCHMARK_DIR: /workspace/benchmark/ + SHARED_HOST_PATH: /tmp/ + commands: + - ./benchmark-eval.sh + - docker system prune -a -f + +- name: notify the sucess on wechat work + image: byrnedo/alpine-curl + environment: + BOT_URL: + from_secret: BOT_URL + commands: + - export MSG_LINK="https://github.com/gnes-ai/benchmark" + - export MSG_TITLE="✅🏍️ New benchmark is updated!" + - export MSG_CONTENT="" + - ./shell/push-wechatwork.sh + +- name: notify the failure on wechat work + image: byrnedo/alpine-curl + environment: + BOT_URL: + from_secret: BOT_URL + commands: + - export MSG_LINK="https://github.com/gnes-ai/benchmark" + - export MSG_TITLE="❌🏍 fail to benchmark GNES!" + - export MSG_CONTENT="please inform [$DRONE_COMMIT_AUTHOR]($DRONE_COMMIT_AUTHOR_EMAIL) to modify and fix [\`$DRONE_SOURCE_BRANCH\`]($DRONE_COMMIT_LINK). click the link below to see the details." + - ./shell/push-wechatwork.sh + when: + status: + - failure + +trigger: + event: + - tag volumes: - name: docker From ccf4efc8897e4ab8ce144601f5cf63b0ab8924b0 Mon Sep 17 00:00:00 2001 From: hanhxiao Date: Fri, 27 Sep 2019 18:55:17 +0800 Subject: [PATCH 9/9] fix(cd): fix trigger in cd pipeline --- .drone-cd.yml | 134 +++++++++++++------------------------------------- 1 file changed, 34 insertions(+), 100 deletions(-) diff --git a/.drone-cd.yml b/.drone-cd.yml index 7f5dfaa7..1f2bc871 100644 --- a/.drone-cd.yml +++ b/.drone-cd.yml @@ -54,49 +54,15 @@ steps: - export MSG_CONTENT="" - ./shell/push-wechatwork.sh -- name: notify the failure on wechat work - image: byrnedo/alpine-curl - environment: - BOT_URL: - from_secret: BOT_URL - commands: - - export MSG_LINK=$DRONE_BUILD_LINK - - export MSG_TITLE="❌🎁 fail to build docker image!" - - export MSG_CONTENT="please inform [$DRONE_COMMIT_AUTHOR]($DRONE_COMMIT_AUTHOR_EMAIL) to modify and fix [\`$DRONE_SOURCE_BRANCH\`]($DRONE_COMMIT_LINK). click the link below to see the details." - - ./shell/push-wechatwork.sh - when: - status: - - failure - -trigger: - branch: - - master - event: - - push - -volumes: -- name: docker - host: - path: /var/run/docker.sock - ---- - -kind: pipeline -name: release-docker-build - -clone: - depth: 50 - -steps: -- name: notify the start on wechat work +- name: notify the start on benchmark work image: byrnedo/alpine-curl environment: BOT_URL: from_secret: BOT_URL commands: - - export MSG_LINK=$DRONE_BUILD_LINK - - export MSG_TITLE="⌛🗳 Start to build docker image for new release \`$DRONE_SOURCE_BRANCH\`(\`${DRONE_TAG}\`)" - - export MSG_CONTENT="[tag link](https://github.com/gnes-ai/gnes/tree/${DRONE_TAG}), click the link below to see the status" + - export MSG_LINK=${DRONE_BUILD_LINK} + - export MSG_TITLE="🏎️🐎 Start to benchmark the new master \`$DRONE_SOURCE_BRANCH\`(\`${DRONE_BUILD_NUMBER}\`)" + - export MSG_CONTENT="click the link below to see the status" - ./shell/push-wechatwork.sh - name: build and push docker images @@ -105,6 +71,8 @@ steps: volumes: - name: docker path: /var/run/docker.sock + - name: cache + path: /workspace environment: TCLOUD_USER: from_secret: TCLOUD_USER @@ -122,8 +90,13 @@ steps: from_secret: GITHUB_USER GITHUB_PWD: from_secret: GITHUB_PWD + DO_BENCHMARK: + from_secret: DO_BENCHMARK + BENCHMARK_DIR: /workspace/benchmark/ + SHARED_HOST_PATH: /tmp/ commands: - - ./docker-build.sh + - ./benchmark-eval.sh + - docker system prune -a -f - name: notify the sucess on wechat work image: byrnedo/alpine-curl @@ -131,8 +104,8 @@ steps: BOT_URL: from_secret: BOT_URL commands: - - export MSG_LINK="https://github.com/gnes-ai/gnes/tree/${DRONE_TAG}" - - export MSG_TITLE="✅🎁 All images are successfully delivered!" + - export MSG_LINK="https://github.com/gnes-ai/benchmark" + - export MSG_TITLE="✅🏍️ New benchmark is updated!" - export MSG_CONTENT="" - ./shell/push-wechatwork.sh @@ -143,29 +116,34 @@ steps: from_secret: BOT_URL commands: - export MSG_LINK=$DRONE_BUILD_LINK - - export MSG_TITLE="❌🎁 fail to build docker image!" - - export MSG_CONTENT="[tag link](https://github.com/gnes-ai/gnes/tree/${DRONE_TAG}) please inform [$DRONE_COMMIT_AUTHOR]($DRONE_COMMIT_AUTHOR_EMAIL) to modify and fix [\`$DRONE_SOURCE_BRANCH\`]($DRONE_COMMIT_LINK). click the link below to see the details." + - export MSG_TITLE="❌🎁🏍️ fail to build and benchmark the docker image!" + - export MSG_CONTENT="please inform [$DRONE_COMMIT_AUTHOR]($DRONE_COMMIT_AUTHOR_EMAIL) to modify and fix [\`$DRONE_SOURCE_BRANCH\`]($DRONE_COMMIT_LINK). click the link below to see the details." - ./shell/push-wechatwork.sh when: status: - failure trigger: + branch: + - master event: - - tag + - push volumes: - name: docker host: path: /var/run/docker.sock +- name: cache + host: + path: /tmp/ --- kind: pipeline -name: master-docker-benchmark +name: release-docker-build clone: - depth: 10 + depth: 50 steps: - name: notify the start on wechat work @@ -174,9 +152,9 @@ steps: BOT_URL: from_secret: BOT_URL commands: - - export MSG_LINK=${DRONE_BUILD_LINK} - - export MSG_TITLE="🏎️🐎 Start to benchmark the new master \`$DRONE_SOURCE_BRANCH\`(\`${DRONE_BUILD_NUMBER}\`)" - - export MSG_CONTENT="click the link below to see the status" + - export MSG_LINK=$DRONE_BUILD_LINK + - export MSG_TITLE="⌛🗳 Start to build docker image for new release \`$DRONE_SOURCE_BRANCH\`(\`${DRONE_TAG}\`)" + - export MSG_CONTENT="[tag link](https://github.com/gnes-ai/gnes/tree/${DRONE_TAG}), click the link below to see the status" - ./shell/push-wechatwork.sh - name: build and push docker images @@ -185,8 +163,6 @@ steps: volumes: - name: docker path: /var/run/docker.sock - - name: cache - path: /workspace environment: TCLOUD_USER: from_secret: TCLOUD_USER @@ -204,13 +180,8 @@ steps: from_secret: GITHUB_USER GITHUB_PWD: from_secret: GITHUB_PWD - DO_BENCHMARK: - from_secret: DO_BENCHMARK - BENCHMARK_DIR: /workspace/benchmark/ - SHARED_HOST_PATH: /tmp/ commands: - - ./benchmark-eval.sh - - docker system prune -a -f + - ./docker-build.sh - name: notify the sucess on wechat work image: byrnedo/alpine-curl @@ -218,49 +189,12 @@ steps: BOT_URL: from_secret: BOT_URL commands: - - export MSG_LINK="https://github.com/gnes-ai/benchmark" - - export MSG_TITLE="✅🏍️ New benchmark is updated!" + - export MSG_LINK="https://github.com/gnes-ai/gnes/tree/${DRONE_TAG}" + - export MSG_TITLE="✅🎁 All images are successfully delivered!" - export MSG_CONTENT="" - ./shell/push-wechatwork.sh -- name: notify the failure on wechat work - image: byrnedo/alpine-curl - environment: - BOT_URL: - from_secret: BOT_URL - commands: - - export MSG_LINK="https://github.com/gnes-ai/benchmark" - - export MSG_TITLE="❌🏍 fail to benchmark GNES!" - - export MSG_CONTENT="please inform [$DRONE_COMMIT_AUTHOR]($DRONE_COMMIT_AUTHOR_EMAIL) to modify and fix [\`$DRONE_SOURCE_BRANCH\`]($DRONE_COMMIT_LINK). click the link below to see the details." - - ./shell/push-wechatwork.sh - when: - status: - - failure - -trigger: - branch: - - master - event: - - push - -volumes: -- name: docker - host: - path: /var/run/docker.sock -- name: cache - host: - path: /tmp/ - ---- - -kind: pipeline -name: release-docker-benchmark - -clone: - depth: 10 - -steps: -- name: notify the start on wechat work +- name: notify the start on benchmark work image: byrnedo/alpine-curl environment: BOT_URL: @@ -321,9 +255,9 @@ steps: BOT_URL: from_secret: BOT_URL commands: - - export MSG_LINK="https://github.com/gnes-ai/benchmark" - - export MSG_TITLE="❌🏍 fail to benchmark GNES!" - - export MSG_CONTENT="please inform [$DRONE_COMMIT_AUTHOR]($DRONE_COMMIT_AUTHOR_EMAIL) to modify and fix [\`$DRONE_SOURCE_BRANCH\`]($DRONE_COMMIT_LINK). click the link below to see the details." + - export MSG_LINK=$DRONE_BUILD_LINK + - export MSG_TITLE="❌🎁🏍️ fail to build and benchmark the docker image!" + - export MSG_CONTENT="[tag link](https://github.com/gnes-ai/gnes/tree/${DRONE_TAG}) please inform [$DRONE_COMMIT_AUTHOR]($DRONE_COMMIT_AUTHOR_EMAIL) to modify and fix [\`$DRONE_SOURCE_BRANCH\`]($DRONE_COMMIT_LINK). click the link below to see the details." - ./shell/push-wechatwork.sh when: status: