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
4 changes: 4 additions & 0 deletions docs/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,8 @@ frbit apps create \

Use `--team` or `--payment-method` to select an accessible team or payment method. For the complete nested API payload, pass a JSON object with `--file`, or use `--file -` to read it from standard input.

Pass `--deploy` to start the initial deployment as part of creation. It requires Git configuration: `apps create` needs both `--repository` and `--branch`. Without `--deploy`, creating an app does not start a deployment.

### Update an app

```sh
Expand Down Expand Up @@ -205,6 +207,8 @@ frbit environments create \
--deploy
```

Pass `--deploy` to start the initial deployment as part of creation. It requires `--branch` so the environment has a Git source. Without `--deploy`, creating an environment does not start a deployment.

Update the environment name or replace its deployment configuration:

```sh
Expand Down
6 changes: 4 additions & 2 deletions internal/cmd/root/root_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -457,7 +457,9 @@ func TestEnvironmentWriteCommandsUseExpectedEndpoints(t *testing.T) {
if err := json.NewDecoder(request.Body).Decode(&body); err != nil {
t.Fatal(err)
}
if body["appId"] != "ap-abc123" || body["name"] != "staging" || body["autoscaling"] != false {
deployment, _ := body["deployment"].(map[string]any)
git, _ := deployment["git"].(map[string]any)
if body["appId"] != "ap-abc123" || body["name"] != "staging" || body["autoscaling"] != false || git["branch"] != "main" || deployment["startFirstDeployment"] != true {
t.Fatalf("create payload = %#v", body)
}
writer.WriteHeader(http.StatusCreated)
Expand Down Expand Up @@ -503,7 +505,7 @@ func TestEnvironmentWriteCommandsUseExpectedEndpoints(t *testing.T) {
defer server.Close()

commands := [][]string{
{"environments", "create", "--app", "ap-abc123", "--name", "staging", "--component", "php=sm", "--autoscaling=false"},
{"environments", "create", "--app", "ap-abc123", "--name", "staging", "--component", "php=sm", "--autoscaling=false", "--branch", "main", "--deploy"},
{"environments", "update", "en-abc123", "--name", "preview"},
{"environments", "variables", "get", "en-abc123"},
{"environments", "variables", "update", "en-abc123", "--set", "APP_ENV=production"},
Expand Down