Integrações CI/CD
Visão geral
Adicione notificações push e portões de aprovação a qualquer pipeline CI/CD. Tudo sem dependências e código aberto.
CLI
Ferramenta shell de arquivo único. Funciona em qualquer CI/CD, cron job ou terminal. Requer curl e jq.
Instalar
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"Enviar
botbell send "Deploy succeeded ✅"Portão de aprovação
botbell approve "Deploy to production?" --timeout 300GitHub Action
Adicione notificações e portões de aprovação do BotBell a qualquer workflow do GitHub.
Notificar resultado do build
workflow.yml
- uses: botbell/notify-action@v1
with:
token: ${{ secrets.BOTBELL_TOKEN }}
title: "✅ Build Passed"
message: "#${{ github.run_number }} on ${{ github.ref_name }}"Portão de aprovação antes do deploy
workflow.yml
- uses: botbell/notify-action@v1
with:
token: ${{ secrets.BOTBELL_TOKEN }}
mode: approve
message: "Deploy #${{ github.run_number }} to production?"
timeout: "1800"Biblioteca compartilhada Jenkins
Integre o BotBell em pipelines Jenkins com dois métodos: notify e approve.
Configuração: Adicione como biblioteca global de pipeline apontando para o repositório 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",
)
}
}
}
}