- Shell 84.5%
- Dockerfile 15.5%
The daloc-specific etcd instance requires read_user + ARC_DALOC_ETCD_PASSWORD, not the default root + ARC_ETCD_PASSWORD. The resolve-overrides action now outputs etcd_user and etcd_password_env fields from overrides.yaml, and both pull-etcd-build-env and pull-etcd-config use them (falling back to the caller-provided defaults when no override is configured). |
||
|---|---|---|
| .agents/skills | ||
| .claude/skills | ||
| .cursor/skills/cicd-onboard | ||
| .github | ||
| examples | ||
| tools | ||
| README.md | ||
What the pipeline delivers
- Publishes a Docker image when the version changes.
- Tags the repo with that version.
- Applies Kubernetes manifests for each app.
- Syncs configuration from etcd and configmap dir before deployment.
- Runs init jobs (apps with
init: true) ahead of the main rollout. - If configmap or secret changed, but version has not, deployment will be restarted to load changes.
- Waits for deployment rollout.
Quick setup (based on l2-indexer)
- Copy
.github/workflows/build-and-deploy.yamlinto your repo. Add [ci skip] to commit message to avoid triggering cicd. - Copy
examples/k8sinto your repo root. Edit manifests underk8s/<env>/to match your services. - Ensure a Dockerfile exists for every app (default path
docker/Dockerfile.<app>unless you overridedockerfile). - Fill out
k8s/cicd-inputs.yaml. - Commit the version source files referenced in
version_file(for exampleCargo.toml,package.json). - Push to
developfor staging deployment and tomainfor production. Other branches will be blocked.
AI-assisted setup (cicd-onboard skill)
This repo ships a cicd-onboard skill (.cursor/skills/cicd-onboard/) that lets an AI coding agent (Claude Code, Cursor, etc.) wire CI/CD into an app repo for you. Install it with the bundled script:
# global: symlink into ~/.claude + ~/.agents (default; tracks this checkout)
tools/install-skill.sh
# into a specific app repo's .claude/.agents/.cursor
tools/install-skill.sh --repo /path/to/app-repo
# copy instead of symlink (portable, but goes stale on cicd updates)
tools/install-skill.sh --copy
tools/install-skill.sh --repo /path/to/app-repo --copy
tools/install-skill.sh --help # full usage
The default symlink tracks this checkout, so git pull in the cicd repo updates the skill everywhere. Use --copy only when the cicd repo won't be present (e.g. committing the skill into an app repo for teammates). Once installed, ask the agent to onboard the repo and it follows the skill.
Etcd configuration
Upload the configuration file to etcd before the workflow runs. The workflow reads /etcd_root/k8s_env/app_name/.env and writes it into <app_name>-secret.
The secret is mounted into the container and configuration is accessible as system envs.
ConfigMaps
If you place files in k8s/<env>/<app>-configmap/, they will be pulled into an config map object that can be mounted into the container as files.
Tips
- When deploying a new app - a namespace has to be created.
- When deploying a new ingress - a dns entry has to created.
- Pipeline can be trigger manualy via github ui - not only by a commit.
- Share a Dockerfile by assigning the same
dockerfilevalue to multiple entries inapp_names. - Each app can use shared version source or a dedicated one, to be set in cicd_inputs.
- If the pipeline failed, check the logs before messaging ppl :)
- Mark init-only apps with
init: true; they will be build and deployed before standard apps. Those apps need to run to completition, else they will block the pipeline - so they have to be a job or pod, not a deployment.