run â Pipeline Executor â
Runs all pipeline steps defined in .greengate.toml in order. A failing step stops the pipeline immediately with a non-zero exit code.
Usage â
bash
greengate runConfiguration â
Define your pipeline steps in .greengate.toml:
toml
[pipeline]
steps = [
"scan",
"audit",
"coverage --min 80",
"lint --dir ./k8s",
"docker-lint",
"lighthouse",
"reassure",
"review --base HEAD~1",
]Each step is a string that maps to an greengate subcommand, optionally followed by flags. All config values from .greengate.toml are applied automatically â CLI overrides in the step string take precedence.
Available steps â
| Step | Equivalent command |
|---|---|
scan | greengate scan |
lint | greengate lint |
docker-lint | greengate docker-lint |
coverage | greengate coverage |
audit | greengate audit |
lighthouse | greengate lighthouse |
reassure | greengate reassure |
review | greengate review |
Step flags â
You can pass flags inline in the step string:
toml
[pipeline]
steps = [
"scan --staged",
"coverage --min 90",
"lint --dir ./manifests",
"lighthouse --url https://staging.myapp.com --min-performance 85",
]Example output â
âšī¸ Running pipeline: 4 step(s)
âââ Step 1/4: scan ââââââââââââââââââââââââââââââââââââââ
âšī¸ Starting secret and PII scan...
â
No secrets or PII found.
â
Step 'scan' passed.
âââ Step 2/4: audit âââââââââââââââââââââââââââââââââââââ
âšī¸ Auditing dependencies for known CVEs...
â
No known vulnerabilities found.
â
Step 'audit' passed.
âââ Step 3/4: coverage --min 80 âââââââââââââââââââââââââ
â
Coverage: 84.2% (threshold: 80.0%)
â
Step 'coverage' passed.
âââ Step 4/4: docker-lint âââââââââââââââââââââââââââââââ
â
Dockerfile passed all lint checks.
â
Step 'docker-lint' passed.
â
Pipeline passed (4 step(s)).CI usage â
yaml
- name: Install greengate
run: |
curl -sL https://github.com/thinkgrid-labs/greengate/releases/latest/download/greengate-linux-amd64 \
-o /usr/local/bin/greengate && chmod +x /usr/local/bin/greengate
- name: Run quality gates
run: greengate runExit codes â
| Code | Meaning |
|---|---|
0 | All steps passed |
1 | One or more steps failed |
Notes â
- Steps run sequentially; the first failure stops the pipeline
- If no
[pipeline]section is defined in.greengate.toml, the command exits with an error message instructing you to add one - Use
greengate initto generate a starter config with a default pipeline