Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,8 @@ edit the command's Short, Long, Example or flag usage and run `make docs`.
| [`n8n promotion connection list`](n8n_promotion_connection_list.md) | List promotion connections |
| [`n8n promotion connection update`](n8n_promotion_connection_update.md) | Update a promotion connection |
| [`n8n promotion connection`](n8n_promotion_connection.md) | Manage promotion connections |
| [`n8n promotion environment apply-continue`](n8n_promotion_environment_apply-continue.md) | Continue a reviewed environment apply after binding setup |
| [`n8n promotion environment apply`](n8n_promotion_environment_apply.md) | Apply an environment's Git branch into this instance |
| [`n8n promotion environment connect`](n8n_promotion_environment_connect.md) | Prepare the local checkout of a promotion environment |
| [`n8n promotion environment create`](n8n_promotion_environment_create.md) | Create a promotion environment |
| [`n8n promotion environment delete`](n8n_promotion_environment_delete.md) | Permanently delete a promotion environment |
Expand All @@ -180,6 +182,7 @@ edit the command's Short, Long, Example or flag usage and run `make docs`.
| [`n8n promotion environment project list`](n8n_promotion_environment_project_list.md) | List projects linked to a promotion environment |
| [`n8n promotion environment project remove`](n8n_promotion_environment_project_remove.md) | Unlink a project from a promotion environment |
| [`n8n promotion environment project`](n8n_promotion_environment_project.md) | Manage projects linked to a promotion environment |
| [`n8n promotion environment promote`](n8n_promotion_environment_promote.md) | Promote team projects to an environment's Git remote |
| [`n8n promotion environment update`](n8n_promotion_environment_update.md) | Update a promotion environment |
| [`n8n promotion environment`](n8n_promotion_environment.md) | Manage promotion environments (n8n 2.46 and later) |
| [`n8n promotion project add`](n8n_promotion_project_add.md) | Add a project to a promotion connection |
Expand Down
26 changes: 16 additions & 10 deletions docs/n8n_promotion.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,23 +11,27 @@ then 'environment list' to find an environment. An environment is one
remote for one direction: create one per direction on a provider with
'environment create', prepare its checkout with 'environment connect',
and link team projects to a projects-scope environment under
'environment project'. 'promote', 'apply', and the project selection
commands still address connections.
'environment project'. Sync the whole instance with 'environment
promote' and 'environment apply' (then 'environment apply-continue'
after resolving a blocked apply) on the instance-scope environment.

Older instances serve connections instead: 'connection list' finds a
connection; create a provider first, then a connection on it, then a
config per direction under 'config', clone each checkout under
'checkout', link team projects to a projects-scope connection under
'project', then 'promote' the instance to the remote or 'apply' the
remote into the instance. For selected workflows, start with project
changes, then project apply or project promote. Use apply-continue
after resolving a blocked apply.
remote into the instance, and 'apply-continue' after resolving a
blocked apply. These run on the instance connection.

'promote' and 'apply' run on the instance connection. 'promote'
commits and pushes every team project to the remote; 'apply' checks the
package and imports with overwrite behavior, creating, updating, or
removing content to match, or reports why it is blocked and writes
nothing. Both mutate versioned content and ask for confirmation.
On both generations, start selected-workflow sync with 'project
changes', then 'project apply' or 'project promote'; the project's own
environment or connection resolves before the instance one.

Promote commits and pushes every team project to the remote; apply
checks the package and imports with overwrite behavior, creating,
updating, or removing content to match, or reports why it is blocked
and writes nothing. Both mutate versioned content and ask for
confirmation.
Config, connection, and environment removal can remove local
checkouts. This is the upstream Promotions generation: an instance
that serves GitConnections instead answers 404 or 503, which reads as
Expand All @@ -43,6 +47,8 @@ n8n promotion [flags]
n8n promotion provider list
n8n promotion environment list
n8n promotion environment connect ENVIRONMENT_ID
n8n promotion environment apply ENVIRONMENT_ID --yes
n8n promotion environment promote ENVIRONMENT_ID --commit-message "sync" --yes
n8n promotion connection list
n8n promotion provider create --input provider.json
n8n promotion connection create --input connection.json
Expand Down
19 changes: 11 additions & 8 deletions docs/n8n_promotion_apply-continue.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,18 @@ Continue a reviewed connection apply after binding setup
### Synopsis

Continue a full instance-connection apply after resolving its preflight items.
Start with 'n8n promotion apply CONNECTION_ID --output json'. The apply
checkout must be cloned. Every team project is synchronized: workflows,
Connections exist before n8n 2.46; on 2.46 use 'n8n promotion environment
apply-continue'. Start with 'n8n promotion apply CONNECTION_ID --output json'.
The apply checkout must be cloned. Every team project is synchronized: workflows,
folders, credentials, tables, variables, and tags can change or be removed.
Requires gitConnection:pull and the same permissions as the initial apply.
Use --expected-from FILE|- with changes JSON or a blocked apply result,
or supply all three --expected-config-id, --expected-branch, --expected-commit
flags (full lowercase 40- or 64-digit hex SHA). A null commit cannot be used.
Expected source is required; use the blocked result's configId and git.
The server keeps no session and provides no exactly-once guarantee.
or supply --expected-config-id, --expected-branch, and
--expected-commit together (full lowercase 40- or 64-digit hex SHA). A
null commit cannot be used. --expected-from passes through the
identifier the instance returned: configId.
Expected source is required; use the blocked result's configId
and git. The server keeps no session and provides no exactly-once guarantee.
--confirm-destructive-changes permits removal or retyping of data-table
columns and loss of their values; rows and other columns remain.
It also permits deleting team projects with everything in them.
Expand Down Expand Up @@ -48,8 +51,8 @@ n8n promotion apply-continue <connection-id> [flags]
```
--confirm-destructive-changes allow all destructive changes at continue time, including unreviewed column value loss and, for full apply, team-project deletion (default: false)
--context string saved context name to use (falls back to N8N_CONTEXT, then the saved current context; see 'n8n config context list')
--expected-branch string reviewed branch name (default: omitted; requires expected config ID and commit)
--expected-commit string reviewed lowercase full 40- or 64-digit hex commit SHA (default: omitted; requires expected config ID and branch)
--expected-branch string reviewed branch name (default: omitted; requires the expected ID and commit)
--expected-commit string reviewed lowercase full 40- or 64-digit hex commit SHA (default: omitted; requires the expected ID and branch)
--expected-config-id string reviewed config ID, 1 to 36 characters (default: omitted; requires expected branch and commit)
--expected-from string changes or blocked-apply JSON file, or - for stdin (default: explicit expected-source flags; stdin requires --yes)
-h, --help help for apply-continue
Expand Down
3 changes: 2 additions & 1 deletion docs/n8n_promotion_apply.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ Apply the Git remote into this instance

Check the full package at the apply branch tip and import it into the
instance, overwriting to match. Runs on the instance connection; the
apply checkout must be cloned first.
apply checkout must be cloned first. Connections exist before n8n
2.46; on 2.46 use 'n8n promotion environment apply'.

The server answers one of three statuses, and only one writes:
applied content was imported; counts and warnings follow.
Expand Down
12 changes: 12 additions & 0 deletions docs/n8n_promotion_environment.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,13 @@ and 'disconnect' removes it. Link team projects to a projects-scope
environment under 'project'. The instance can have one environment for
each direction.

Sync the whole instance through the connected instance-scope
environment: 'promote' pushes every team project to a promote
environment; 'apply' imports an apply environment's branch, and
'apply-continue' finishes an apply that preflight blocked. For selected
workflows of one project use 'n8n promotion project changes', 'apply',
and 'promote'.

Deleting an environment removes its project links and local checkout;
its provider is kept and nothing in Git changes.

Expand All @@ -30,6 +37,8 @@ n8n promotion environment [flags]
n8n promotion environment get ENVIRONMENT_ID
n8n promotion environment create --input environment.json
n8n promotion environment connect ENVIRONMENT_ID
n8n promotion environment apply ENVIRONMENT_ID --yes
n8n promotion environment promote ENVIRONMENT_ID --commit-message "sync" --yes
n8n promotion environment project add ENVIRONMENT_ID PROJECT_ID
```

Expand All @@ -42,12 +51,15 @@ n8n promotion environment [flags]
### SEE ALSO

* [n8n promotion](n8n_promotion.md) - Manage promotion providers, environments, connections, and apply/promote sync
* [n8n promotion environment apply](n8n_promotion_environment_apply.md) - Apply an environment's Git branch into this instance
* [n8n promotion environment apply-continue](n8n_promotion_environment_apply-continue.md) - Continue a reviewed environment apply after binding setup
* [n8n promotion environment connect](n8n_promotion_environment_connect.md) - Prepare the local checkout of a promotion environment
* [n8n promotion environment create](n8n_promotion_environment_create.md) - Create a promotion environment
* [n8n promotion environment delete](n8n_promotion_environment_delete.md) - Permanently delete a promotion environment
* [n8n promotion environment disconnect](n8n_promotion_environment_disconnect.md) - Remove the local checkout of a promotion environment
* [n8n promotion environment get](n8n_promotion_environment_get.md) - Show one promotion environment
* [n8n promotion environment list](n8n_promotion_environment_list.md) - List promotion environments
* [n8n promotion environment project](n8n_promotion_environment_project.md) - Manage projects linked to a promotion environment
* [n8n promotion environment promote](n8n_promotion_environment_promote.md) - Promote team projects to an environment's Git remote
* [n8n promotion environment update](n8n_promotion_environment_update.md) - Update a promotion environment

71 changes: 71 additions & 0 deletions docs/n8n_promotion_environment_apply-continue.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
## n8n promotion environment apply-continue

Continue a reviewed environment apply after binding setup

### Synopsis

Continue a full environment apply (n8n 2.46 and later) after resolving its
preflight items. Start with 'n8n promotion environment apply ENVIRONMENT_ID
--output json'. The instance-scope apply environment must still be
connected. Every team project is synchronized: workflows, folders,
credentials, tables, variables, and tags can be created, updated, moved,
renamed, or removed to match. Requires gitConnection:pull and the same
permissions as the initial apply.

Use --expected-from FILE|- with changes JSON or a blocked apply result,
or supply --expected-environment-id, --expected-branch, and
--expected-commit together (full lowercase 40- or 64-digit hex SHA). A
null commit cannot be used. --expected-from passes through the
identifier the instance returned: environmentId.
Expected source is required; use the blocked result's environmentId
and git. The server keeps no session and provides no exactly-once guarantee.
--confirm-destructive-changes permits removal or retyping of data-table
columns and loss of their values; rows and other columns remain.
It also permits deleting team projects with everything in them.
This covers every such change at continue time, including changes absent
from the reviewed result.
Exit codes: 0 applied, 3 blocked, 4 source-changed, 1 other error. Only
applied writes content. Resolve blocked bindings before apply-continue;
review source-changed results again. JSON prints the full status result;
text shows preflight details or counts and warnings. Hints go to stderr.
Read request JSON with --input FILE|- (maximum 1 MiB). Input and document flags are
mutually exclusive. Interactive runs ask for confirmation; non-interactive
runs and stdin input require --yes. JSON returns the server result; text
shows counts and the commit after success.

--idempotency-key KEY makes a retry after a timeout or lost response safe:
the same request with the same key returns the first result instead of
running again (auto generates a key and prints it on stderr).

```
n8n promotion environment apply-continue <environment-id> [flags]
```

### Examples

```
n8n promotion environment apply-continue ENVIRONMENT_ID --expected-from blocked.json
n8n promotion environment apply-continue ENVIRONMENT_ID --input request.json --yes --output json
```

### Options

```
--confirm-destructive-changes allow all destructive changes at continue time, including unreviewed column value loss and, for full apply, team-project deletion (default: false)
--context string saved context name to use (falls back to N8N_CONTEXT, then the saved current context; see 'n8n config context list')
--expected-branch string reviewed branch name (default: omitted; requires the expected ID and commit)
--expected-commit string reviewed lowercase full 40- or 64-digit hex commit SHA (default: omitted; requires the expected ID and branch)
--expected-environment-id string reviewed environment ID, 1 to 36 characters (default: omitted; requires expected branch and commit)
--expected-from string changes or blocked-apply JSON file, or - for stdin (default: explicit expected-source flags; stdin requires --yes)
-h, --help help for apply-continue
--idempotency-key string retry key sent as the Idempotency-Key header: 1 to 128 visible ASCII characters, or auto for a random UUID printed on stderr; rerun the same command with the same key to get the first result instead of a second run (default: none, no idempotency)
--input string request JSON file path or - for stdin, maximum 1 MiB (default: use document flags; stdin requires --yes)
--output string output format: text or json (default: text; JSON is the full server result) (default "text")
--url string instance URL override, e.g. https://n8n.example.com (falls back to N8N_URL, then the selected context URL)
--yes confirm content changes without prompting (default: prompt; required for non-interactive or stdin input)
```

### SEE ALSO

* [n8n promotion environment](n8n_promotion_environment.md) - Manage promotion environments (n8n 2.46 and later)

70 changes: 70 additions & 0 deletions docs/n8n_promotion_environment_apply.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
## n8n promotion environment apply

Apply an environment's Git branch into this instance

### Synopsis

Check the full package at the branch tip of an instance-scope apply
environment (n8n 2.46 and later) and import it into the instance,
overwriting to match. Before 2.46 use 'n8n promotion apply' with a
connection. Start with 'n8n promotion environment list --direction
apply' and connect it first with 'n8n promotion environment connect'.
Personal projects are ignored. An applied run rewrites every team
project from the branch and cannot be undone: workflows, folders,
credentials, data tables, variables, and tags are created, updated,
or removed to match, workflows and folders move within their project,
folders take the branch name, and credential gaps become stubs.
Existing variable values are kept. A workflow or folder the branch and
the instance hold in different projects is refused with 409 before any
write. Requires gitConnection:pull.

Use --expected-from FILE|- with changes JSON or a blocked apply result,
or supply --expected-environment-id, --expected-branch, and
--expected-commit together (full lowercase 40- or 64-digit hex SHA). A
null commit cannot be used. --expected-from passes through the
identifier the instance returned: environmentId.
Expected source is optional; supply it to detect changes after review.
Exit codes: 0 applied, 3 blocked, 4 source-changed, 1 other error. Only
applied writes content. Resolve blocked bindings before apply-continue;
review source-changed results again. JSON prints the full status result;
text shows preflight details or counts and warnings. Hints go to stderr.
Read request JSON with --input FILE|- (maximum 1 MiB). Input and document flags are
mutually exclusive. Interactive runs ask for confirmation; non-interactive
runs and stdin input require --yes. JSON returns the server result; text
shows counts and the commit after success.

--idempotency-key KEY makes a retry after a timeout or lost response safe:
the same request with the same key returns the first result instead of
running again (auto generates a key and prints it on stderr).

```
n8n promotion environment apply <environment-id> [flags]
```

### Examples

```
n8n promotion environment apply ENVIRONMENT_ID
n8n promotion environment apply ENVIRONMENT_ID --input request.json --yes --output json
```

### Options

```
--context string saved context name to use (falls back to N8N_CONTEXT, then the saved current context; see 'n8n config context list')
--expected-branch string reviewed branch name (default: omitted; requires the expected ID and commit)
--expected-commit string reviewed lowercase full 40- or 64-digit hex commit SHA (default: omitted; requires the expected ID and branch)
--expected-environment-id string reviewed environment ID, 1 to 36 characters (default: omitted; requires expected branch and commit)
--expected-from string changes or blocked-apply JSON file, or - for stdin (default: explicit expected-source flags; stdin requires --yes)
-h, --help help for apply
--idempotency-key string retry key sent as the Idempotency-Key header: 1 to 128 visible ASCII characters, or auto for a random UUID printed on stderr; rerun the same command with the same key to get the first result instead of a second run (default: none, no idempotency)
--input string request JSON file path or - for stdin, maximum 1 MiB (default: use document flags; stdin requires --yes)
--output string output format: text or json (default: text; JSON is the full server result) (default "text")
--url string instance URL override, e.g. https://n8n.example.com (falls back to N8N_URL, then the selected context URL)
--yes confirm content changes without prompting (default: prompt; required for non-interactive or stdin input)
```

### SEE ALSO

* [n8n promotion environment](n8n_promotion_environment.md) - Manage promotion environments (n8n 2.46 and later)

Loading
Loading