🦀 ClawHub
CI/CD Pipeline Toolkit
by @kaiyuelv
Automate CI/CD pipelines for GitHub Actions, GitLab CI, and Jenkins with build, test, deploy workflow creation and pipeline status monitoring.
💡 Examples
GitHub Actions Workflow
from cicd_toolkit import GitHubActionsWorkflowCreate Python CI workflow
workflow = GitHubActionsWorkflow("python-ci")
workflow.add_trigger("push", branches=["main", "dev"])
workflow.add_trigger("pull_request")Add jobs
workflow.add_job("test", {
"runs-on": "ubuntu-latest",
"steps": [
{"uses": "actions/checkout@v4"},
{"uses": "actions/setup-python@v4", "with": {"python-version": "3.11"}},
{"name": "Install dependencies", "run": "pip install -r requirements.txt"},
{"name": "Run tests", "run": "pytest"}
]
})workflow.save(".github/workflows/python-ci.yml")
GitLab CI Configuration
from cicd_toolkit import GitLabCIConfigGenerate CI config
config = GitLabCIConfig()
config.add_stage("build")
config.add_stage("test")
config.add_stage("deploy")config.add_job("build_app", {
"stage": "build",
"script": ["npm install", "npm run build"],
"artifacts": {"paths": ["dist/"]}
})
config.add_job("test_app", {
"stage": "test",
"script": ["npm run test"],
"needs": ["build_app"]
})
config.save(".gitlab-ci.yml")
TERMINAL
clawhub install ci-cd-pipeline-toolkit