OpenSibleOpenSible Stack Hub
← All blueprints

CI/CD Pipeline (Git → Build → Push → Deploy)

OSS

Clone a Git repo (GitHub / GitLab / Gitea / Forgejo), build a container image with docker buildx, push to any OCI registry (Harbor, Sonatype Nexus, Zot, Docker Hub, GHCR, GitLab), and optionally deploy to a target host via docker or docker compose.

by opensible· ⬇ 0 installs· CI/CD· v1.0.0· template cicd-pipeline

Use in the OpenSible console

Open Infrastructure → Stack Hub Blueprints, switch the source to Cloud hub, then pick CI/CD Pipeline (Git → Build → Push → Deploy) and press Use.

Default variables

defaults.json
{
  "become": true,
  "git_ref": "main",
  "workdir": "/var/lib/opensible/cicd",
  "image_tag": "latest",
  "platforms": "linux/amd64",
  "deploy_mode": "docker-run",
  "git_repo_url": "",
  "registry_url": "",
  "build_context": ".",
  "container_env": "",
  "registry_type": "harbor",
  "container_name": "app",
  "deploy_enabled": false,
  "container_ports": "",
  "dockerfile_path": "Dockerfile",
  "also_tag_git_sha": true,
  "image_repository": "",
  "compose_file_path": "/opt/app/docker-compose.yml",
  "registry_insecure": false,
  "registry_password": "",
  "registry_username": "",
  "deploy_target_host": ""
}

vars.example.yml

vars.example.yml
# Example variable overrides for the CI/CD blueprint.
git_repo_url: https://github.com/acme/hello-app.git
git_ref: main

dockerfile_path: Dockerfile
build_context: .
platforms: linux/amd64

registry_url: harbor.example.com
registry_type: harbor
registry_username: robot$builder
registry_password: "{{ harbor_token }}"     # from vault
image_repository: acme/hello-app
image_tag: latest
also_tag_git_sha: true

deploy_enabled: true
deploy_target_host: app-01
deploy_mode: docker-run
container_name: hello-app
container_ports: |
  8080:8080
container_env: |
  APP_ENV=prod

Versions (1)

  • v1.0.0playbook.yml