Update drone config
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
Garrett Mills 2021-03-29 13:51:51 -05:00
parent e604b90d91
commit 32bec8d14f
Signed by: garrettmills
GPG Key ID: D2BF5FBA8298F246

View File

@ -2,12 +2,55 @@ kind: pipeline
name: default name: default
type: docker type: docker
steps: steps:
- 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
- name: build module - name: build module
image: glmdev/node-pnpm:latest image: glmdev/node-pnpm:latest
commands: commands:
- pnpm i - pnpm i
- pnpm build - pnpm build
- tar czf build.tar.gz lib - mkdir artifacts
- tar czf artifacts/extollo-lib.tar.gz lib
- name: create Gitea release
image: plugins/gitea-release
settings:
api_key:
from_secret: gitea_token
base_url: https://code.garrettmills.dev
checksum: md5
title: ${DRONE_TAG}
files: "artifacts/*"
when:
event: tag
status: success
- name: prepare NPM release
image: glmdev/node-pnpm:latest
commands:
- rm -rf artifacts
when:
event: tag
status: success
- name: create NPM release
image: plugins/npm
settings:
username: extollo_bot
password:
from_secret: npm_password
email: extollo@garrettmills.dev
when:
event: tag
status: success
- name: send build success notifications - name: send build success notifications
image: plugins/webhook image: plugins/webhook
@ -23,6 +66,37 @@ steps:
} }
when: when:
status: success status: success
event:
exclude:
- pull_request
- tag
- name: send publish success notifications
image: plugins/webhook
settings:
urls:
from_secret: notify_webhook_url
content_type: application/json
template: |
{
"title": "Drone-CI [extollo/lib @ ${DRONE_BUILD_NUMBER}]",
"message": "Successfully published tag ${DRONE_TAG}.",
"priority": 4
}
when:
status: success
event: tag
- 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
- name: send build error notifications - name: send build error notifications
image: plugins/webhook image: plugins/webhook
@ -38,6 +112,20 @@ steps:
} }
when: when:
status: failure status: failure
event:
exclude:
- pull_request
- 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
- name: trigger documentation build - name: trigger documentation build
image: plugins/downstream image: plugins/downstream
@ -52,3 +140,4 @@ steps:
- Extollo/docs@master - Extollo/docs@master
when: when:
status: success status: success
event: tag