Hi, i am using plugins/webhook for notification in Node-RED. For some reason the build.status is always success and i dont understand why. i read the following
The build status represents the overall status of all pipelines.
Is it a bug or am i doing something wrong?
.drone.yaml:
---
kind: pipeline
name: validate
steps:
- name: yamllint
image: sdesbure/yamllint:latest
commands:
- yamllint -c ./.yamllint .
- name: docker-compose
image: tmaier/docker-compose:latest
commands:
- docker-compose config -q
---
kind: pipeline
type: docker
name: build
depends_on:
- validate
steps:
- name: publish
image: plugins/docker
settings:
username:
from_secret: docker-registry-username
password:
from_secret: docker-registry-password
registry: docker-registry.theautomation.nl
repo: docker-registry.theautomation.nl/coen/prd-${DRONE_REPO_NAME}-app
auto_tag: true
---
kind: pipeline
type: docker
name: upgrade
depends_on:
- build
steps:
- name: git pull
image: appleboy/drone-ssh
settings:
host:
from_secret: ssh_host
username:
from_secret: ssh_user
password:
from_secret: ssh_password
script:
- cd /home/coen/docker-home-services/${DRONE_REPO_NAME}/
- git pull
- name: docker compose up
image: appleboy/drone-ssh
settings:
host:
from_secret: ssh_host
username:
from_secret: ssh_user
password:
from_secret: ssh_password
script:
- cd /home/coen/docker-home-services/${DRONE_REPO_NAME}/
- docker-compose up -d
- name: cleanup
image: appleboy/drone-ssh
settings:
host:
from_secret: ssh_host
username:
from_secret: ssh_user
password:
from_secret: ssh_password
script:
- cd /home/coen/docker-home-services/${DRONE_REPO_NAME}/
- docker image prune -f
---
kind: pipeline
name: notify webhook
steps:
- name: send
image: plugins/webhook
settings:
username:
from_secret: nodered_endpoint_username
password:
from_secret: nodered_endpoint_password
urls: http://***drone/notify
skip_verify: true
content_type: application/json
template: |
{
"owner": "{{ repo.owner }}",
"repo": "{{ repo.name }}",
"status": "{{ build.status }}",
"build number": "{{ build.number }}",
"build link": "{{ build.link }}"
}
when:
status:
- success
- failure
Webhook result:
payload: object
owner: "theautomation"
repo: "makemkv"
status: "success"
build number: "21"
build link: "https:/****"