extollo-cli/.drone.yml

96 lines
2.3 KiB
YAML
Raw Normal View History

2021-03-29 16:24:01 +00:00
kind: pipeline
name: default
type: docker
steps:
2021-03-29 17:01:43 +00:00
- name: post build in progress comment to PR
image: tsakidev/giteacomment:latest
settings:
gitea_token:
from_secret: gitea_token
gitea_base_url: https://code.garrettmills.dev
comment: "Build ${DRONE_BUILD_NUMBER} started."
when:
event: pull_request
2021-03-29 16:24:01 +00:00
- name: build module
image: glmdev/node-pnpm:latest
commands:
- pnpm i
- pnpm build
- tar czf build.tar.gz lib
- name: send build success notifications
image: plugins/webhook
settings:
urls:
from_secret: notify_webhook_url
content_type: application/json
template: |
{
"title": "Drone-CI [extollo/cli @ ${DRONE_BUILD_NUMBER}]",
"message": "Build completed successfully.",
"priority": 4
}
when:
status: success
2021-03-29 17:04:38 +00:00
event:
exclude:
- pull_request
2021-03-29 16:24:01 +00:00
2021-03-29 17:01:43 +00:00
- name: post build success comment to PR
image: tsakidev/giteacomment:latest
settings:
gitea_token:
from_secret: gitea_token
gitea_base_url: https://code.garrettmills.dev
comment: "Build ${DRONE_BUILD_NUMBER} completed successfully."
when:
status: success
event: pull_request
2021-03-29 16:24:01 +00:00
- name: send build error notifications
image: plugins/webhook
settings:
urls:
from_secret: notify_webhook_url
content_type: application/json
template: |
{
"title": "Drone-CI [extollo/cli @ ${DRONE_BUILD_NUMBER}]",
"message": "Build failed!",
"priority": 6
}
when:
status: failure
2021-03-29 17:04:38 +00:00
event:
exclude:
- pull_request
2021-03-29 16:24:01 +00:00
2021-03-29 17:01:43 +00:00
- name: post build error comment to PR
image: tsakidev/giteacomment:latest
settings:
gitea_token:
from_secret: gitea_token
gitea_base_url: https://code.garrettmills.dev
comment: "Build ${DRONE_BUILD_NUMBER} failed!"
when:
status: failure
event: pull_request
2021-03-29 16:24:01 +00:00
- name: trigger documentation build
image: plugins/downstream
settings:
2021-03-29 16:27:54 +00:00
server: https://ci.garrettmills.dev
2021-03-29 16:24:01 +00:00
token:
from_secret: drone_token
fork: false
last_successful: true
deploy: production
repositories:
2021-03-29 16:26:53 +00:00
- Extollo/docs@master
2021-03-29 16:24:01 +00:00
when:
status: success
2021-03-29 17:04:38 +00:00
event:
exclude:
- pull_request