Skip to content

CI/CD-Integrationen

Überblick

Push-Benachrichtigungen und Freigabe-Gates zu jeder CI/CD-Pipeline hinzufügen. Alles ohne Abhängigkeiten und Open-Source.


CLI

Einzeldatei-Shell-Tool. Funktioniert in jedem CI/CD, Cron-Job oder Terminal. Erfordert curl und jq.

Installation

curl -fsSL https://raw.githubusercontent.com/qq418716640/botbell-cli/main/botbell -o /usr/local/bin/botbell
chmod +x /usr/local/bin/botbell
export BOTBELL_TOKEN="bt_your_token"

Senden

botbell send "Deploy succeeded ✅"

Freigabe-Gate

botbell approve "Deploy to production?" --timeout 300

GitHub Action

BotBell-Benachrichtigungen und Freigabe-Gates zu jedem GitHub-Workflow hinzufügen.

Build-Ergebnis benachrichtigen

workflow.yml
- uses: botbell/notify-action@v1
  with:
    token: ${{ secrets.BOTBELL_TOKEN }}
    title: "✅ Build Passed"
    message: "#${{ github.run_number }} on ${{ github.ref_name }}"

Freigabe-Gate vor dem Deployment

workflow.yml
- uses: botbell/notify-action@v1
  with:
    token: ${{ secrets.BOTBELL_TOKEN }}
    mode: approve
    message: "Deploy #${{ github.run_number }} to production?"
    timeout: "1800"

Jenkins Shared Library

BotBell mit zwei Methoden in Jenkins-Pipelines integrieren: notify und approve.

Einrichtung: Als globale Pipeline-Bibliothek hinzufügen und auf das Git-Repository verweisen.

Jenkinsfile
@Library('botbell') _

pipeline {
    agent any
    environment {
        BOTBELL_TOKEN = credentials('botbell-token')
    }
    stages {
        stage('Deploy Approval') {
            steps {
                script {
                    botbell.approve(message: "Deploy to production?")
                }
            }
        }
    }
    post {
        success {
            script {
                botbell.notify(
                    title: "✅ Deploy Success",
                    message: "#${BUILD_NUMBER} deployed",
                )
            }
        }
    }
}