update step woodpecker
This commit is contained in:
141
.woodpecker.yml
141
.woodpecker.yml
@ -42,6 +42,33 @@ steps:
|
|||||||
branch:
|
branch:
|
||||||
- master
|
- master
|
||||||
|
|
||||||
|
- name: telegram failed setup
|
||||||
|
image: appleboy/drone-telegram
|
||||||
|
settings:
|
||||||
|
token: 7616010754:AAGXMf8x-roKozdT0j-bOZ1y9dmbulbKPbM
|
||||||
|
to: -4765409490
|
||||||
|
message: |
|
||||||
|
🚀 *Woodpecker CI Build Finish* 🚀
|
||||||
|
|
||||||
|
*Repo:* ${CI_REPO_OWNER}/${CI_REPO_NAME}
|
||||||
|
*Repo Link:* ${CI_REPO_URL}
|
||||||
|
*Branch:* ${CI_COMMIT_BRANCH}
|
||||||
|
|
||||||
|
*Build Status:* *Failed Setup*
|
||||||
|
*Build Link:* ${CI_PIPELINE_URL}
|
||||||
|
|
||||||
|
*Commit ID:* `${CI_COMMIT_SHA:0:8}`
|
||||||
|
*Commit By:* {{commit.author}}
|
||||||
|
*Commit Link:* {{commit.link}}
|
||||||
|
*Commit Msg:* {{commit.message}}
|
||||||
|
🙈 build failed. Fix me please, before client is aware.
|
||||||
|
when:
|
||||||
|
status:
|
||||||
|
- failure
|
||||||
|
- cancel
|
||||||
|
branch:
|
||||||
|
- master
|
||||||
|
|
||||||
- name: build-src
|
- name: build-src
|
||||||
image: node:22-alpine
|
image: node:22-alpine
|
||||||
environment:
|
environment:
|
||||||
@ -53,6 +80,34 @@ steps:
|
|||||||
when:
|
when:
|
||||||
branch:
|
branch:
|
||||||
- master
|
- master
|
||||||
|
depends_on: [setup]
|
||||||
|
|
||||||
|
- name: telegram failed notify
|
||||||
|
image: appleboy/drone-telegram
|
||||||
|
settings:
|
||||||
|
token: 7616010754:AAGXMf8x-roKozdT0j-bOZ1y9dmbulbKPbM
|
||||||
|
to: -4765409490
|
||||||
|
message: |
|
||||||
|
🚀 *Woodpecker CI Build Finish* 🚀
|
||||||
|
|
||||||
|
*Repo:* ${CI_REPO_OWNER}/${CI_REPO_NAME}
|
||||||
|
*Repo Link:* ${CI_REPO_URL}
|
||||||
|
*Branch:* ${CI_COMMIT_BRANCH}
|
||||||
|
|
||||||
|
*Build Status:* *Failed Build src*
|
||||||
|
*Build Link:* ${CI_PIPELINE_URL}
|
||||||
|
|
||||||
|
*Commit ID:* `${CI_COMMIT_SHA:0:8}`
|
||||||
|
*Commit By:* {{commit.author}}
|
||||||
|
*Commit Link:* {{commit.link}}
|
||||||
|
*Commit Msg:* {{commit.message}}
|
||||||
|
🙈 build failed. Fix me please, before client is aware.
|
||||||
|
when:
|
||||||
|
status:
|
||||||
|
- failure
|
||||||
|
- cancel
|
||||||
|
branch:
|
||||||
|
- master
|
||||||
|
|
||||||
- name: build-image
|
- name: build-image
|
||||||
image: docker
|
image: docker
|
||||||
@ -65,19 +120,9 @@ steps:
|
|||||||
when:
|
when:
|
||||||
branch:
|
branch:
|
||||||
- master
|
- master
|
||||||
|
depends_on: [setup, build-src]
|
||||||
|
|
||||||
- name: deploy
|
- name: telegram failed notify
|
||||||
image: docker
|
|
||||||
commands:
|
|
||||||
- docker-compose up -d --no-deps --remove-orphans
|
|
||||||
volumes:
|
|
||||||
- /var/run/docker.sock:/var/run/docker.sock
|
|
||||||
when:
|
|
||||||
branch:
|
|
||||||
- master
|
|
||||||
depends_on: [setup, build-src, build-image]
|
|
||||||
|
|
||||||
- name: telegram notify on pipeline completion
|
|
||||||
image: appleboy/drone-telegram
|
image: appleboy/drone-telegram
|
||||||
settings:
|
settings:
|
||||||
token: 7616010754:AAGXMf8x-roKozdT0j-bOZ1y9dmbulbKPbM
|
token: 7616010754:AAGXMf8x-roKozdT0j-bOZ1y9dmbulbKPbM
|
||||||
@ -89,18 +134,82 @@ steps:
|
|||||||
*Repo Link:* ${CI_REPO_URL}
|
*Repo Link:* ${CI_REPO_URL}
|
||||||
*Branch:* ${CI_COMMIT_BRANCH}
|
*Branch:* ${CI_COMMIT_BRANCH}
|
||||||
|
|
||||||
*Build Status:* *{{ pipeline.status == 'success' ? 'Success' : 'Failed' }}*
|
*Build Status:* *Failed Build Image*
|
||||||
*Build Link:* ${CI_PIPELINE_URL}
|
*Build Link:* ${CI_PIPELINE_URL}
|
||||||
|
|
||||||
*Commit ID:* `${CI_COMMIT_SHA:0:8}`
|
*Commit ID:* `${CI_COMMIT_SHA:0:8}`
|
||||||
*Commit By:* {{commit.author}}
|
*Commit By:* {{commit.author}}
|
||||||
*Commit Link:* {{commit.link}}
|
*Commit Link:* {{commit.link}}
|
||||||
*Commit Msg:* {{commit.message}}
|
*Commit Msg:* {{commit.message}}
|
||||||
{{ pipeline.status == 'success' ? '😎 build succeeded. Good job ' + commit.author : '🙈 build failed. Fix me please, before client is aware.' }}
|
🙈 build failed. Fix me please, before client is aware.
|
||||||
|
when:
|
||||||
|
status:
|
||||||
|
- failure
|
||||||
|
- cancel
|
||||||
|
branch:
|
||||||
|
- master
|
||||||
|
|
||||||
|
- name: deploy
|
||||||
|
image: docker
|
||||||
|
commands:
|
||||||
|
- docker-compose up -d --no-deps --remove-orphans
|
||||||
|
volumes:
|
||||||
|
- /var/run/docker.sock:/var/run/docker.sock
|
||||||
|
when:
|
||||||
|
branch:
|
||||||
|
- main
|
||||||
|
depends_on: [setup, build-src, build-image]
|
||||||
|
|
||||||
|
- name: telegram failed notify
|
||||||
|
image: appleboy/drone-telegram
|
||||||
|
settings:
|
||||||
|
token: 7616010754:AAGXMf8x-roKozdT0j-bOZ1y9dmbulbKPbM
|
||||||
|
to: -4765409490
|
||||||
|
message: |
|
||||||
|
🚀 *Woodpecker CI Build Finish* 🚀
|
||||||
|
|
||||||
|
*Repo:* ${CI_REPO_OWNER}/${CI_REPO_NAME}
|
||||||
|
*Repo Link:* ${CI_REPO_URL}
|
||||||
|
*Branch:* ${CI_COMMIT_BRANCH}
|
||||||
|
|
||||||
|
*Build Status:* *Failed Deploy*
|
||||||
|
*Build Link:* ${CI_PIPELINE_URL}
|
||||||
|
|
||||||
|
*Commit ID:* `${CI_COMMIT_SHA:0:8}`
|
||||||
|
*Commit By:* {{commit.author}}
|
||||||
|
*Commit Link:* {{commit.link}}
|
||||||
|
*Commit Msg:* {{commit.message}}
|
||||||
|
🙈 build failed. Fix me please, before client is aware.
|
||||||
|
when:
|
||||||
|
status:
|
||||||
|
- failure
|
||||||
|
- cancel
|
||||||
|
branch:
|
||||||
|
- master
|
||||||
|
|
||||||
|
- name: telegram success notify
|
||||||
|
image: appleboy/drone-telegram
|
||||||
|
settings:
|
||||||
|
token: 7616010754:AAGXMf8x-roKozdT0j-bOZ1y9dmbulbKPbM
|
||||||
|
to: -4765409490
|
||||||
|
message: |
|
||||||
|
🚀 *Woodpecker CI Build Finish* 🚀
|
||||||
|
|
||||||
|
*Repo:* ${CI_REPO_OWNER}/${CI_REPO_NAME}
|
||||||
|
*Repo Link:* ${CI_REPO_URL}
|
||||||
|
*Branch:* ${CI_COMMIT_BRANCH}
|
||||||
|
|
||||||
|
*Build Status:* *Success*
|
||||||
|
*Build Link:* ${CI_PIPELINE_URL}
|
||||||
|
|
||||||
|
*Commit ID:* `${CI_COMMIT_SHA:0:8}`
|
||||||
|
*Commit By:* {{commit.author}}
|
||||||
|
*Commit Link:* {{commit.link}}
|
||||||
|
*Commit Msg:* {{commit.message}}
|
||||||
|
😎 build succeeded. Good job {{commit.author}}
|
||||||
when:
|
when:
|
||||||
status:
|
status:
|
||||||
- success
|
- success
|
||||||
- failure
|
|
||||||
- cancelled
|
|
||||||
branch:
|
branch:
|
||||||
- master
|
- master
|
||||||
|
depends_on: [setup, build-src, build-image, deploy]
|
||||||
|
|||||||
Reference in New Issue
Block a user