- Root contains install scripts and served assets for GitHub Pages.
- Scripts:
cli.sh(Unix CLI installer),cli.ps1(Windows),k8-install.sh,k8-join-worker.sh,k8-agent.sh,agent.sh(alias to k8 installer). - Manifests:
k8-agent.yaml(Kubernetes agent). Keep placeholders; do not commit real secrets. - Site assets:
index.html,CNAME,.nojekyll. - CI:
.github/workflows/sync-k8-agent.ymlkeepsk8-agent.yamlpinned to the latest release.
- No build step; scripts run as-is.
- Bash syntax/lint:
bash -n cli.sh,shellcheck -x cli.sh(and other*.sh) if available. - YAML lint:
yamllint k8-agent.yaml(optional). - K8s dry run:
kubectl apply -f k8-agent.yaml --dry-run=client -o yaml. - Local smoke tests:
- CLI:
VERSION=v1.2.3 bash cli.sh(installs to~/.local/binwhen non-root). - K8s agent:
bash k8-agent.sh -n pipeops-system(requireskubectlcontext).
- CLI:
- Shell: Bash only. Start with
#!/usr/bin/env bashandset -Eeuo pipefail. - Indentation: 2 spaces; quote variables; prefer
localfor function vars; usereadonlyfor constants. - Common helpers: keep
info,warn,die,have_cmd,need_cmdpatterns. - Naming: scripts
k8-*.sh; env/config UPPER_SNAKE (VERSION,GH_REPO); locals/functions lower_snake (dest_dir,detect_os). - YAML: namespace
pipeops-system; labels underapp.kubernetes.io/*.
- Validate new flags preserve piped usage:
curl -fsSL .../cli.sh | bash -s -- --helpstyle must still work. - For Kubernetes changes, test against a disposable cluster (kind/minikube) and verify RBAC applies cleanly.
- Keep scripts idempotent and safe to re-run.
- Conventional Commits style. Examples:
feat(cli): add VERIFY=strict modefix(k8): correct namespace creation logicchore(agent): bump k8-agent.yaml to v1.2.3
- PRs should include: concise description, linked issues, test commands/output, and note any public URL or filename changes.
- Ensure executables have the bit set (
chmod +x *.sh).
- Prefer pinned releases for production:
VERSION=vX.Y.Z. - Enable checksum verification where possible:
VERIFY=strict curl -fsSL https://get.pipeops.dev/cli.sh | bash. - Do not commit tokens or cluster names; keep placeholders in
k8-agent.yamland populate via installers. - RBAC currently uses broad access; minimize scopes when feasible before changing defaults.