detached c2bc6fc

docs: update token scope examples and document deploy modes

commit
c2bc6fc3eca950d037771eafb809e0af705b3381
author
brice · · 2026-03-19 04:55 UTC
parent
8443ba4
signature
unsigned
2 files · +28 -3
M docs/cli/push.md +9 -0
@@ -63,6 +63,15 @@ When used with `--remote`, gordon push authenticates in two ways:
6363
6464 This means CI/CD pipelines only need a single secret (`GORDON_TOKEN`).
6565
66+### Deploy Modes
67+
68+When the token has `admin:config:write` scope, the CLI manages deployment explicitly
69+(DeployIntent → push → Deploy). This gives the CLI control over deploy timing.
70+
71+When the token lacks `admin:config:write`, the CLI pushes the image and the server
72+auto-deploys when it receives it via its event listener. The CLI logs:
73+`info: deploy intent skipped (insufficient scope), server will auto-deploy on image receive`
74+
6675 ### Version Auto-Detection
6776
6877 Gordon reads version tags from CI environment variables (in priority order):
@@ -63,6 +63,15 @@ When used with `--remote`, gordon push authenticates in two ways:
63 63
64 This means CI/CD pipelines only need a single secret (`GORDON_TOKEN`).64 This means CI/CD pipelines only need a single secret (`GORDON_TOKEN`).
65 65
66+### Deploy Modes
67+
68+When the token has `admin:config:write` scope, the CLI manages deployment explicitly
69+(DeployIntent → push → Deploy). This gives the CLI control over deploy timing.
70+
71+When the token lacks `admin:config:write`, the CLI pushes the image and the server
72+auto-deploys when it receives it via its event listener. The CLI logs:
73+`info: deploy intent skipped (insufficient scope), server will auto-deploy on image receive`
74+
66 ### Version Auto-Detection75 ### Version Auto-Detection
67 76
68 Gordon reads version tags from CI environment variables (in priority order):77 Gordon reads version tags from CI environment variables (in priority order):
M docs/deployment/index.md +19 -3
@@ -84,18 +84,34 @@ Gordon's registry is served through the main gordon domain over HTTPS on port 44
8484
8585 ## Token Setup
8686
87+See the examples below for the right scopes for each workflow.
88+
8789 ```bash
88-# For gordon push (recommended) — needs admin scopes for route resolution and deploy
90+# Minimum scope for gordon push — route lookup + registry push
91+# Server auto-deploys when it receives the image
92+gordon auth token generate \
93+ --subject ci-bot \
94+ --scopes "push,pull,admin:routes:read" \
95+ --expiry 90d
96+
97+# With explicit CLI-managed deploy (adds config:write for deploy control)
8998 gordon auth token generate \
9099 --subject ci-bot \
91100 --scopes "push,pull,admin:routes:read,admin:config:write" \
92- --expiry 0
101+ --expiry 90d
102+
103+# Scoped to a specific repository
104+gordon auth token generate \
105+ --subject ci-bot \
106+ --repo myapp \
107+ --scopes "push,pull,admin:routes:read" \
108+ --expiry 90d
93109
94110 # For docker push — registry scopes only
95111 gordon auth token generate \
96112 --subject ci-bot \
97113 --scopes "push,pull" \
98- --expiry 0
114+ --expiry 90d
99115 ```
100116
101117 Set the generated token as `GORDON_TOKEN` in your CI environment.
@@ -84,18 +84,34 @@ Gordon's registry is served through the main gordon domain over HTTPS on port 44
84 84
85 ## Token Setup85 ## Token Setup
86 86
87+See the examples below for the right scopes for each workflow.
88+
87 ```bash89 ```bash
88-# For gordon push (recommended) — needs admin scopes for route resolution and deploy90+# Minimum scope for gordon push — route lookup + registry push
91+# Server auto-deploys when it receives the image
92+gordon auth token generate \
93+ --subject ci-bot \
94+ --scopes "push,pull,admin:routes:read" \
95+ --expiry 90d
96+
97+# With explicit CLI-managed deploy (adds config:write for deploy control)
89 gordon auth token generate \98 gordon auth token generate \
90 --subject ci-bot \99 --subject ci-bot \
91 --scopes "push,pull,admin:routes:read,admin:config:write" \100 --scopes "push,pull,admin:routes:read,admin:config:write" \
92- --expiry 0101+ --expiry 90d
102+
103+# Scoped to a specific repository
104+gordon auth token generate \
105+ --subject ci-bot \
106+ --repo myapp \
107+ --scopes "push,pull,admin:routes:read" \
108+ --expiry 90d
93 109
94 # For docker push — registry scopes only110 # For docker push — registry scopes only
95 gordon auth token generate \111 gordon auth token generate \
96 --subject ci-bot \112 --subject ci-bot \
97 --scopes "push,pull" \113 --scopes "push,pull" \
98- --expiry 0114+ --expiry 90d
99 ```115 ```
100 116
101 Set the generated token as `GORDON_TOKEN` in your CI environment.117 Set the generated token as `GORDON_TOKEN` in your CI environment.

Keyboard shortcuts

Single-key shortcuts are on. ctrl k and esc work whatever this says.

ctrl k :
go to a section, branch, tag, file or repository
?
this list
j k
move the row cursor down / up
enter
open the row under the cursor; on Files, a directory opens or closes in place
↑ ↓ ← → home end
in the file tree (focus on a row): previous / next row, close / open a directory or go to its parent / first entry, first / last row. They never open a file
l h
on Files: open a directory or a file / close a directory or go up to its parent, then to the parent page. Elsewhere: into the side panel (on a merge request, its files) / back to the content; there j k move between its controls
g g G
first / last row
/
filter the list; on Files, find a file anywhere in the repository (esc clears, enter opens the best match)
b
switch branch or tag
g s g f g c g b g m g i g r g a
tabs: summary, files, commits, branches & tags, merge requests, issues, releases, actions (when available)
g h
home
w
wide mode: use the whole width of the screen, or not (remembered)
y
copy a permalink pinned to the commit
d u x
diff: split / unified / collapse or expand all
e E
diff: the whole file in view / every file, with the lines the hunks hide
n
merge request: next note in the diff
esc
close a dialog, leave a field

Branches 7

Tags 106

↑↓ moveenter openesc close