Skip to content

Intégrations CI/CD

Aperçu

Ajoutez des notifications push et des portes d'approbation à tout pipeline CI/CD. Tout sans dépendances et open-source.


CLI

Outil shell en fichier unique. Fonctionne dans tout CI/CD, tâche cron ou terminal. Nécessite curl et 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"

Envoyer

botbell send "Deploy succeeded ✅"

Porte d'approbation

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

GitHub Action

Ajoutez des notifications et des portes d'approbation BotBell à tout workflow GitHub.

Notifier le résultat du build

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

Porte d'approbation avant déploiement

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

Bibliothèque partagée Jenkins

Intégrez BotBell aux pipelines Jenkins avec deux méthodes : notify et approve.

Configuration : Ajoutez comme bibliothèque de pipeline globale pointant vers le dépôt Git.

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",
                )
            }
        }
    }
}