add woodpecker pipeline
This commit is contained in:
25
.woodpecker.yml
Normal file
25
.woodpecker.yml
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
when:
|
||||||
|
- event: [push, pull_request]
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: test
|
||||||
|
image: node:22-alpine
|
||||||
|
commands:
|
||||||
|
- node -e "console.log('hello from woodpecker')"
|
||||||
|
- echo "all good"
|
||||||
|
|
||||||
|
# On failure, ask the AI bridge for a suggested fix.
|
||||||
|
# Add the ai_bridge_token secret in the Woodpecker UI first.
|
||||||
|
- name: ai-triage
|
||||||
|
image: curlimages/curl:latest
|
||||||
|
when:
|
||||||
|
status: [failure]
|
||||||
|
environment:
|
||||||
|
BRIDGE_TOKEN:
|
||||||
|
from_secret: ai_bridge_token
|
||||||
|
commands:
|
||||||
|
- |
|
||||||
|
curl -sS -X POST http://172.17.0.1:3001/webhook/job-failed \
|
||||||
|
-H "Content-Type: application/json" \
|
||||||
|
-H "X-Bridge-Token: $BRIDGE_TOKEN" \
|
||||||
|
-d "{\"repo\":\"$CI_REPO\",\"build\":\"$CI_PIPELINE_NUMBER\",\"step\":\"test\",\"logs\":\"pipeline $CI_PIPELINE_NUMBER failed on $CI_COMMIT_BRANCH\"}"
|
||||||
Reference in New Issue
Block a user