# kindgi promote

> Move a build to the next environment of its environment order, staging to prod, say: the same signed image, with the edits made since to its agents and flows

## `kindgi promote`

**Synopsis**

```sh signature
kindgi promote --from=<env> --to=<env> [--deployment=<id>] [--reason=<text>] [--check] [--make-live] [--path=<dir>]
```

Move a build to the next environment of its environment order, staging to prod, say: the same signed image, with the edits made since to its agents and flows. Prints what moves, then each value the build needs there that isn't set, with the command that sets it; exits 1 while one isn't. `--check` stops before moving anything. In a pack, --from and --to are its environment names; outside one, project ids or slugs.

**Options**

| Option                 | Default                                                                | Description                                                                                                                         |
| ---------------------- | ---------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------- |
| `--check`              | off                                                                    | What would move, and the values not set in --to. Changes nothing.                                                                   |
| `--deployment <value>` | none (the one deployment serving in `--from`; in a pack, of this pack) | The deployment to promote. Default: the one deployment serving in --from (in a pack, of this pack).                                 |
| `--from <value>`       | required                                                               | The environment the build serves in: its name in your pack config, or outside a pack a project id or slug.                          |
| `--make-live`          | off                                                                    | Make every agent version the promotion carries live in --to, each through its scope's gate. Prints each, and any waiting on a gate. |
| `--path <value>`       | the current directory                                                  | The pack root. Default: the current directory.                                                                                      |
| `--reason <value>`     | none                                                                   | Why, kept on the audit record.                                                                                                      |
| `--to <value>`         | required                                                               | The next environment of the order: its name in your pack config, or outside a pack a project id or slug.                            |

Every command also takes the [global flags](https://docs.kindgi.com/v0.1.9/reference/cli.md#global-flags).

**Examples**

Promote the build serving in staging to prod, saying why.

```sh
kindgi promote --from=staging --to=prod --reason="release 12"
```

Promote to prod and make each agent the build carries live there, each through its gate.

```sh
kindgi promote --from=staging --to=prod --make-live --reason="release 12"
```

See what would move to prod and which values it lacks, changing nothing.

```sh
kindgi promote --from=staging --to=prod --check
```

Outside a pack, name the two environments by project slug or id.

```sh
kindgi promote --from=acme-staging --to=acme-prod
```

**See also**

- [Organize work by org and project](https://docs.kindgi.com/v0.1.9/guides/projects/organize-by-org-and-project.md)
