Skip to content

Commit

Permalink
Add some common use cases for deployment and import
Browse files Browse the repository at this point in the history
  • Loading branch information
vazexqi committed Dec 14, 2023
1 parent a30c738 commit 28c4518
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 1 deletion.
30 changes: 29 additions & 1 deletion docs/cli/deployments.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,32 @@ Use these commands to help your manage your deployed zups. They must be run from
the root of your Zuplo project. And, they assume that you already have Git setup
for the project.

See more examples at [Custom CI/CD](../articles/custom-ci-cd.md).
See concrete end-to-end examples of how to use this in your CI/CD job at
[Custom CI/CD](../articles/custom-ci-cd.md).

## Common Use Cases

The following examples assume that you are passing in your --api-key either as
an argument or through the `ZUPLO_API_KEY` environment variable.

### Deploying your Gateway

```
# The following will use the current Git branch as the name of the environment
git checkout -b my-new-branch
zup deploy
```

```
# If you do not wish to use the current Git branch as the name of the
# environment, you can specify one using --environment
zup deploy --environment my-env-name
```

```
# If you have configured your remote origin differently from portal.zuplo.com,
# you can still force it to deploy. Be aware that this could make merging changes impossible if the remote do not share a common ancestor.
git remote -v
zup deploy --no-verify-remote
```
20 changes: 20 additions & 0 deletions docs/cli/project.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,23 @@ Commands:
zup project import-openapi Imports an OpenAPI file into your Zuplo Project

```

## Common Use Cases

### Importing an existing OpenAPI file

We support importing both JSON and YAML. We will infer the format from the file
extension.

```
zup project import-openapi --source /path/to/openapi.json
zup project import-openapi --source /path/to/openapi.yaml
```

If you have a remote file that you wish to import, you can use the
`--source-url` option. This downloads the file to a temporary directory and
imports it.

```
zup project import-openapi --source-url https://example.com/path/to/openapi.json
```

0 comments on commit 28c4518

Please sign in to comment.