zuplo 7.15.32 → 7.15.34
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/docs/ai-gateway/azure-ai.mdx +2 -6
- package/docs/ai-gateway/bedrock-mantle.mdx +2 -6
- package/docs/ai-gateway/cookbooks/data-residency.mdx +3 -7
- package/docs/ai-gateway/custom-pricing.mdx +54 -0
- package/docs/ai-gateway/guardrails.mdx +1 -3
- package/docs/ai-gateway/jev.mdx +35 -0
- package/docs/ai-gateway/managing-apps.mdx +17 -0
- package/docs/ai-gateway/managing-providers.mdx +11 -0
- package/docs/ai-gateway/observability/analytics.mdx +2 -2
- package/docs/ai-gateway/openrouter.mdx +20 -0
- package/docs/ai-gateway/routing.mdx +50 -15
- package/docs/ai-gateway/universal-api.mdx +50 -6
- package/docs/ai-gateway/user-apps.mdx +44 -2
- package/docs/ai-gateway/vertex-ai.mdx +5 -13
- package/docs/analytics/shared-controls.md +5 -0
- package/docs/analytics/tabs/consumers.md +36 -0
- package/docs/articles/api-key-api.mdx +16 -1
- package/docs/articles/api-key-buckets.mdx +1 -1
- package/docs/articles/api-key-consumer-bucket-portal-ui.mdx +1 -1
- package/docs/articles/api-key-self-serve-integration.mdx +1 -1
- package/docs/articles/api-lint-configuration.mdx +21 -0
- package/docs/articles/api-lint-custom-rules.mdx +6 -0
- package/docs/articles/branch-based-deployments.mdx +11 -3
- package/docs/articles/ci-cd-azure/multi-stage-deployment.mdx +2 -2
- package/docs/articles/ci-cd-azure/pr-preview-environments.mdx +23 -4
- package/docs/articles/ci-cd-azure/tag-based-releases.mdx +1 -1
- package/docs/articles/ci-cd-bitbucket/multi-stage-deployment.mdx +3 -4
- package/docs/articles/ci-cd-bitbucket/pr-preview-environments.mdx +6 -5
- package/docs/articles/ci-cd-bitbucket/tag-based-releases.mdx +1 -1
- package/docs/articles/ci-cd-circleci/multi-stage-deployment.mdx +2 -3
- package/docs/articles/ci-cd-circleci/pr-preview-environments.mdx +6 -5
- package/docs/articles/ci-cd-circleci/tag-based-releases.mdx +1 -3
- package/docs/articles/ci-cd-github/basic-deployment.mdx +6 -6
- package/docs/articles/ci-cd-github/cleanup-on-branch-delete.mdx +8 -20
- package/docs/articles/ci-cd-github/deploy-and-test.mdx +3 -3
- package/docs/articles/ci-cd-github/local-testing.mdx +1 -1
- package/docs/articles/ci-cd-github/multi-stage-deployment.mdx +2 -3
- package/docs/articles/ci-cd-github/pr-preview-environments.mdx +20 -31
- package/docs/articles/ci-cd-github/tag-based-releases.mdx +5 -3
- package/docs/articles/ci-cd-gitlab/mr-preview-environments.mdx +10 -4
- package/docs/articles/ci-cd-gitlab/multi-stage-deployment.mdx +3 -3
- package/docs/articles/ci-cd-gitlab/tag-based-releases.mdx +1 -1
- package/docs/articles/connect-to-aws-alb-with-mtls.mdx +2 -6
- package/docs/articles/custom-ci-cd-azure.mdx +2 -2
- package/docs/articles/custom-ci-cd-bitbucket.mdx +2 -2
- package/docs/articles/custom-ci-cd-circleci.mdx +2 -2
- package/docs/articles/custom-ci-cd-github.mdx +10 -11
- package/docs/articles/custom-ci-cd-gitlab.mdx +2 -2
- package/docs/articles/environment-variables.mdx +55 -0
- package/docs/articles/monetization/api-access.mdx +126 -9
- package/docs/articles/monetization/meters.mdx +49 -2
- package/docs/articles/monetization/subscription-lifecycle.md +117 -19
- package/docs/articles/monetization/usage.mdx +58 -0
- package/docs/articles/monorepo-deployment.mdx +10 -25
- package/docs/articles/openapi.mdx +14 -0
- package/docs/articles/proxy-openai-realtime-api.mdx +6 -2
- package/docs/articles/secure-tunnel.mdx +3 -7
- package/docs/articles/support.mdx +35 -0
- package/docs/articles/testing-preview-environments.mdx +1 -1
- package/docs/caching/custom-caching-policy.mdx +4 -4
- package/docs/caching/dynamic-cache-rules.mdx +3 -3
- package/docs/caching/overview.mdx +2 -6
- package/docs/cli/delete.mdx +50 -0
- package/docs/cli/delete.partial.mdx +52 -0
- package/docs/cli/deploy.mdx +35 -18
- package/docs/cli/deploy.partial.mdx +35 -18
- package/docs/cli/variable-delete.mdx +36 -0
- package/docs/cli/variable-delete.partial.mdx +37 -0
- package/docs/concepts/source-control-and-deployment.mdx +9 -17
- package/docs/concepts/where-zuplo-runs.mdx +4 -12
- package/docs/dedicated/akamai/ai-powered-applications.mdx +5 -15
- package/docs/dedicated/akamai/architecture.mdx +11 -33
- package/docs/dedicated/akamai/hostname-routing.mdx +4 -4
- package/docs/dedicated/architecture.mdx +1 -1
- package/docs/dedicated/source-control.mdx +1 -1
- package/docs/dev-portal/dev-portal-create-consumer-on-auth.mdx +1 -1
- package/docs/dev-portal/overview.mdx +23 -0
- package/docs/dev-portal/zudoku/components/alert.mdx +1 -1
- package/docs/dev-portal/zudoku/configuration/api-reference.md +52 -0
- package/docs/dev-portal/zudoku/configuration/authentication-auth0.md +25 -0
- package/docs/dev-portal/zudoku/configuration/authentication-azure-ad.md +7 -0
- package/docs/dev-portal/zudoku/configuration/authentication-openid.md +48 -2
- package/docs/dev-portal/zudoku/configuration/authentication.md +4 -0
- package/docs/dev-portal/zudoku/configuration/build-configuration.mdx +4 -0
- package/docs/dev-portal/zudoku/configuration/navigation.mdx +15 -1
- package/docs/dev-portal/zudoku/configuration/overview.md +3 -0
- package/docs/dev-portal/zudoku/custom-plugins.md +38 -1
- package/docs/dev-portal/zudoku/guides/server-side-content-protection.md +7 -7
- package/docs/dev-portal/zudoku/openapi-extensions/x-enum-descriptions.md +85 -0
- package/docs/dev-portal/zudoku-partials/configuration/authentication-auth0.partial.md +24 -0
- package/docs/errors/build-error.mdx +58 -0
- package/docs/guides/backend-failover.mdx +9 -8
- package/docs/mcp-gateway/auth/configuring-entra.mdx +59 -0
- package/docs/mcp-gateway/auth/configuring-okta.mdx +30 -6
- package/docs/mcp-gateway/auth/configuring-workos.mdx +26 -0
- package/docs/mcp-gateway/auth/overview.mdx +2 -2
- package/docs/mcp-gateway/auth/upstream-oauth.mdx +1 -1
- package/docs/mcp-gateway/overview.mdx +1 -1
- package/docs/mcp-server/authorize-tool-calls.mdx +6 -2
- package/docs/policies/mcp-entra-oauth-inbound/doc.md +24 -0
- package/docs/policies/mcp-entra-oauth-inbound/schema.json +13 -0
- package/docs/policies/mcp-okta-oauth-inbound/doc.md +9 -2
- package/docs/policies/mcp-okta-oauth-inbound/schema.json +2 -2
- package/docs/policies/mcp-workos-oauth-inbound/doc.md +8 -0
- package/docs/policies/mcp-workos-oauth-inbound/schema.json +7 -0
- package/docs/policies/request-validation-inbound/doc.md +54 -0
- package/docs/programmable-api/environment.mdx +10 -2
- package/package.json +5 -5
|
@@ -118,7 +118,7 @@ jobs:
|
|
|
118
118
|
|
|
119
119
|
- name: Deploy to Zuplo
|
|
120
120
|
run:
|
|
121
|
-
npx zuplo deploy --api-key "$ZUPLO_API_KEY" --
|
|
121
|
+
npx zuplo deploy --api-key "$ZUPLO_API_KEY" --branch "${{
|
|
122
122
|
github.ref_name }}"
|
|
123
123
|
env:
|
|
124
124
|
ZUPLO_API_KEY: ${{ secrets.ZUPLO_API_KEY }}
|
|
@@ -181,7 +181,7 @@ jobs:
|
|
|
181
181
|
# pull_request events check out
|
|
182
182
|
ENVIRONMENT: ${{ github.head_ref }}
|
|
183
183
|
run: |
|
|
184
|
-
OUTPUT=$(npx zuplo deploy --api-key "$ZUPLO_API_KEY" --
|
|
184
|
+
OUTPUT=$(npx zuplo deploy --api-key "$ZUPLO_API_KEY" --branch "$ENVIRONMENT" 2>&1)
|
|
185
185
|
echo "$OUTPUT"
|
|
186
186
|
DEPLOYMENT_URL=$(echo "$OUTPUT" | grep -oP 'Deployed to \K(https://[^ ]+)')
|
|
187
187
|
echo "url=$DEPLOYMENT_URL" >> $GITHUB_OUTPUT
|
|
@@ -215,37 +215,22 @@ jobs:
|
|
|
215
215
|
- name: Install dependencies
|
|
216
216
|
run: npm install
|
|
217
217
|
|
|
218
|
-
- name: Get deployment URL
|
|
219
|
-
id: get-url
|
|
220
|
-
uses: actions/github-script@v7
|
|
221
|
-
with:
|
|
222
|
-
script: |
|
|
223
|
-
const comments = await github.rest.issues.listComments({
|
|
224
|
-
issue_number: context.issue.number,
|
|
225
|
-
owner: context.repo.owner,
|
|
226
|
-
repo: context.repo.repo,
|
|
227
|
-
});
|
|
228
|
-
const match = comments.data
|
|
229
|
-
.map((c) => c.body.match(/Deployed to: (https:\/\/\S+)/))
|
|
230
|
-
.find(Boolean);
|
|
231
|
-
core.setOutput("url", match ? match[1] : "");
|
|
232
|
-
|
|
233
218
|
- name: Delete environment
|
|
234
|
-
|
|
219
|
+
env:
|
|
220
|
+
ENVIRONMENT: ${{ github.head_ref }}
|
|
235
221
|
run: |
|
|
236
222
|
npx zuplo delete \
|
|
237
|
-
--
|
|
238
|
-
--api-key "$ZUPLO_API_KEY"
|
|
239
|
-
--wait
|
|
223
|
+
--branch "$ENVIRONMENT" \
|
|
224
|
+
--api-key "$ZUPLO_API_KEY"
|
|
240
225
|
```
|
|
241
226
|
|
|
242
227
|
:::caution
|
|
243
228
|
|
|
244
|
-
The deploy step passes `--
|
|
229
|
+
The deploy step passes `--branch` with the PR's source branch name
|
|
245
230
|
(`github.head_ref`). Workflows triggered by `pull_request` check out the PR
|
|
246
|
-
merge ref (`refs/pull/<number>/merge`), so without `--
|
|
247
|
-
|
|
248
|
-
|
|
231
|
+
merge ref (`refs/pull/<number>/merge`), so without `--branch` the CLI names the
|
|
232
|
+
environment after that ref instead of your branch — and any other deploy of the
|
|
233
|
+
same branch creates a second environment with a different URL. See
|
|
249
234
|
[PR Preview Environments](./ci-cd-github/pr-preview-environments.mdx) for
|
|
250
235
|
details.
|
|
251
236
|
|
|
@@ -130,6 +130,20 @@ You can set this property to `true` in order to hide a route from the Developer
|
|
|
130
130
|
Portal. If you are using the [OpenAPI Spec Handler](../handlers/openapi.mdx),
|
|
131
131
|
internal routes won't be present in the generated OpenAPI file.
|
|
132
132
|
|
|
133
|
+
The Developer Portal also supports `x-internal` on a whole path item, to hide
|
|
134
|
+
every operation on that path, and on a single parameter, to hide only that
|
|
135
|
+
parameter. See the Developer Portal
|
|
136
|
+
[`x-internal` reference](../dev-portal/zudoku/openapi-extensions/x-internal.md)
|
|
137
|
+
for details.
|
|
138
|
+
|
|
139
|
+
:::warning
|
|
140
|
+
|
|
141
|
+
`x-internal` hides documentation only. It doesn't secure the endpoint: the route
|
|
142
|
+
still exists on your gateway and anyone can call it. To block access to a route,
|
|
143
|
+
use the [Internal Only policy](../policies/internal-only-inbound.mdx).
|
|
144
|
+
|
|
145
|
+
:::
|
|
146
|
+
|
|
133
147
|
## Multiple File Support
|
|
134
148
|
|
|
135
149
|
You can have multiple `.oas.json` files if you wish to break up your route
|
|
@@ -30,9 +30,13 @@ puts a Zuplo route in front of that WebSocket so that:
|
|
|
30
30
|
<DiagramEdge
|
|
31
31
|
from="client"
|
|
32
32
|
to="zuplo"
|
|
33
|
-
label="Authorization: Bearer zpka_
|
|
33
|
+
label="`Authorization: Bearer zpka_...`"
|
|
34
|
+
/>
|
|
35
|
+
<DiagramEdge
|
|
36
|
+
from="zuplo"
|
|
37
|
+
to="openai"
|
|
38
|
+
label="`Authorization: Bearer sk-...`"
|
|
34
39
|
/>
|
|
35
|
-
<DiagramEdge from="zuplo" to="openai" label="Authorization: Bearer sk-..." />
|
|
36
40
|
</Diagram>
|
|
37
41
|
|
|
38
42
|
The route uses the
|
|
@@ -59,15 +59,11 @@ already established.
|
|
|
59
59
|
Zuplo Gateway
|
|
60
60
|
</DiagramNode>
|
|
61
61
|
<DiagramGroup id="private" label="Your private network">
|
|
62
|
-
<DiagramNode id="tunnel"
|
|
63
|
-
|
|
64
|
-
</DiagramNode>
|
|
65
|
-
<DiagramNode id="api" variant="green">
|
|
66
|
-
Private API
|
|
67
|
-
</DiagramNode>
|
|
62
|
+
<DiagramNode id="tunnel">Tunnel service</DiagramNode>
|
|
63
|
+
<DiagramNode id="api">Private API</DiagramNode>
|
|
68
64
|
</DiagramGroup>
|
|
69
65
|
<DiagramEdge from="client" to="gateway" label="HTTPS" />
|
|
70
|
-
<DiagramEdge from="gateway" to="tunnel" label="service
|
|
66
|
+
<DiagramEdge from="gateway" to="tunnel" label="`service://`" animated />
|
|
71
67
|
<DiagramEdge from="tunnel" to="api" fromSide="bottom" toSide="top" />
|
|
72
68
|
</Diagram>
|
|
73
69
|
|
|
@@ -5,6 +5,41 @@ applies_to:
|
|
|
5
5
|
hosting: all
|
|
6
6
|
---
|
|
7
7
|
|
|
8
|
+
## Get help in the Zuplo Portal
|
|
9
|
+
|
|
10
|
+
Select **Help** in the Zuplo Portal navigation to open the
|
|
11
|
+
[Support page](https://portal.zuplo.com/user/support). From there you can:
|
|
12
|
+
|
|
13
|
+
- **Ask Zuplo AI.** Zuplo AI answers in the context of your project. If it can't
|
|
14
|
+
resolve the problem, it drafts a support ticket for the Zuplo team. If Zuplo
|
|
15
|
+
AI isn't available to you, or an account admin turned AI features off, the
|
|
16
|
+
card links to email support instead.
|
|
17
|
+
- **Book a meeting** with an API expert for a free technical consultation.
|
|
18
|
+
- **Join the community** on Discord.
|
|
19
|
+
|
|
20
|
+
### Your tickets
|
|
21
|
+
|
|
22
|
+
**Your tickets** lists the conversations you have open with the Zuplo team. You
|
|
23
|
+
open a new ticket by asking Zuplo AI. It drafts the ticket for you. A badge
|
|
24
|
+
shows how many tickets have new replies. Select a ticket to read the
|
|
25
|
+
conversation and write a reply. Zuplo also replies by email. Replying to a
|
|
26
|
+
resolved ticket reopens it, and a toggle switches between open and closed
|
|
27
|
+
tickets.
|
|
28
|
+
|
|
29
|
+
The portal keeps your ticket list per browser. If you open a ticket link from
|
|
30
|
+
another browser or device and the ticket isn't found, use the restore link
|
|
31
|
+
offered under the list to bring your tickets into that browser.
|
|
32
|
+
|
|
33
|
+
### Premium and emergency support
|
|
34
|
+
|
|
35
|
+
Below your tickets, the page shows **Premium Support** and **Emergency Phone
|
|
36
|
+
Support** for customers whose plan includes them. When an account you belong to
|
|
37
|
+
has premium support, the card includes a contact link. When an account has
|
|
38
|
+
emergency phone support, the card shows the support phone number and that
|
|
39
|
+
account's support PIN. Other accounts see these cards with a note that the
|
|
40
|
+
option is available on enterprise plans. See [Support plans](#support-plans) for
|
|
41
|
+
what each plan includes.
|
|
42
|
+
|
|
8
43
|
This document explains the Zuplo support plans, communication methods,
|
|
9
44
|
severities, and response times provided by Zuplo support. The following features
|
|
10
45
|
are provided with every support plan:
|
|
@@ -52,7 +52,7 @@ If you deploy from your own CI with `zuplo deploy`, capture the URL from the
|
|
|
52
52
|
deploy command's output and pass it through:
|
|
53
53
|
|
|
54
54
|
```bash
|
|
55
|
-
OUTPUT=$(npx zuplo deploy --api-key "$ZUPLO_API_KEY" --
|
|
55
|
+
OUTPUT=$(npx zuplo deploy --api-key "$ZUPLO_API_KEY" --branch "$BRANCH" 2>&1)
|
|
56
56
|
echo "$OUTPUT"
|
|
57
57
|
DEPLOY_URL=$(echo "$OUTPUT" | grep -oP 'Deployed to \K(https://[^ ]+)')
|
|
58
58
|
|
|
@@ -60,12 +60,12 @@ outbound policy stores the response on the way back out.
|
|
|
60
60
|
|
|
61
61
|
<Diagram height="h-56">
|
|
62
62
|
<DiagramNode id="client">Client</DiagramNode>
|
|
63
|
-
<DiagramNode id="inbound" variant="zuplo">
|
|
64
|
-
Inbound
|
|
63
|
+
<DiagramNode id="inbound" variant="zuplo" detail="`cache.match`">
|
|
64
|
+
Inbound
|
|
65
65
|
</DiagramNode>
|
|
66
66
|
<DiagramNode id="backend">Backend</DiagramNode>
|
|
67
|
-
<DiagramNode id="outbound" variant="zuplo">
|
|
68
|
-
Outbound
|
|
67
|
+
<DiagramNode id="outbound" variant="zuplo" detail="`cache.put`">
|
|
68
|
+
Outbound
|
|
69
69
|
</DiagramNode>
|
|
70
70
|
<DiagramEdge from="client" to="inbound" />
|
|
71
71
|
<DiagramEdge from="inbound" to="backend" label="Miss" />
|
|
@@ -37,9 +37,9 @@ the `cdn` option names.
|
|
|
37
37
|
<DiagramNode id="fn" variant="zuplo">
|
|
38
38
|
Function returns intent
|
|
39
39
|
</DiagramNode>
|
|
40
|
-
<DiagramNode id="akamai"
|
|
41
|
-
<DiagramNode id="fastly"
|
|
42
|
-
<DiagramNode id="cf"
|
|
40
|
+
<DiagramNode id="akamai">`Edge-Control`</DiagramNode>
|
|
41
|
+
<DiagramNode id="fastly">`Surrogate-Control`</DiagramNode>
|
|
42
|
+
<DiagramNode id="cf">`Cloudflare-CDN-Cache-Control`</DiagramNode>
|
|
43
43
|
<DiagramEdge from="fn" to="akamai" label="akamai" />
|
|
44
44
|
<DiagramEdge from="fn" to="fastly" label="fastly" />
|
|
45
45
|
<DiagramEdge from="fn" to="cf" label="cloudflare" />
|
|
@@ -26,9 +26,7 @@ itself when the layer in front of it misses.
|
|
|
26
26
|
|
|
27
27
|
<Diagram height="h-80">
|
|
28
28
|
<DiagramNode id="client">Client</DiagramNode>
|
|
29
|
-
<DiagramNode id="cdn"
|
|
30
|
-
CDN edge cache
|
|
31
|
-
</DiagramNode>
|
|
29
|
+
<DiagramNode id="cdn">CDN edge cache</DiagramNode>
|
|
32
30
|
<DiagramGroup id="zuplo" label="Zuplo gateway">
|
|
33
31
|
<DiagramNode id="gateway" variant="zuplo">
|
|
34
32
|
Response cache
|
|
@@ -37,9 +35,7 @@ itself when the layer in front of it misses.
|
|
|
37
35
|
Programmable cache
|
|
38
36
|
</DiagramNode>
|
|
39
37
|
</DiagramGroup>
|
|
40
|
-
<DiagramNode id="origin"
|
|
41
|
-
Backend cache
|
|
42
|
-
</DiagramNode>
|
|
38
|
+
<DiagramNode id="origin">Backend cache</DiagramNode>
|
|
43
39
|
<DiagramEdge from="client" to="cdn" label="Request" />
|
|
44
40
|
<DiagramEdge from="cdn" to="gateway" label="Miss" />
|
|
45
41
|
<DiagramEdge
|
package/docs/cli/delete.mdx
CHANGED
|
@@ -78,6 +78,51 @@ applies_to:
|
|
|
78
78
|
usage="$0 delete (--url <url> | --branch <branch>) [options]"
|
|
79
79
|
>
|
|
80
80
|
|
|
81
|
+
## Common use cases
|
|
82
|
+
|
|
83
|
+
The following examples assume that you are passing in your `--api-key` either as
|
|
84
|
+
an argument or through the `ZUPLO_API_KEY` environment variable.
|
|
85
|
+
|
|
86
|
+
### Deleting an environment by branch
|
|
87
|
+
|
|
88
|
+
Pass the same branch name that you gave to
|
|
89
|
+
[`zuplo deploy --branch`](./deploy.mdx). The CLI finds the environment that the
|
|
90
|
+
branch deployed in the project and deletes it, so you don't have to capture the
|
|
91
|
+
environment URL.
|
|
92
|
+
|
|
93
|
+
```bash
|
|
94
|
+
zuplo delete --project my-project --branch my-feature
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
If no environment exists for the branch, the command reports that none was found
|
|
98
|
+
and exits without an error. This makes it safe to run in a cleanup step that can
|
|
99
|
+
fire more than once.
|
|
100
|
+
|
|
101
|
+
### Deleting an environment by URL
|
|
102
|
+
|
|
103
|
+
```bash
|
|
104
|
+
zuplo delete --url https://my-api-dev-123abc.zuplo.app
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
### Choosing between `--url` and `--branch`
|
|
108
|
+
|
|
109
|
+
Pass exactly one of `--url` or `--branch`. The command fails if you pass both,
|
|
110
|
+
and fails if you pass neither.
|
|
111
|
+
|
|
112
|
+
The CLI reads `--branch` only when you type it on the command line. An exported
|
|
113
|
+
`ZUPLO_BRANCH` environment variable is ignored by `zuplo delete`, so a variable
|
|
114
|
+
that a CI job exports for other commands can't choose the environment you
|
|
115
|
+
delete. `zuplo deploy` ignores `ZUPLO_BRANCH` the same way.
|
|
116
|
+
|
|
117
|
+
### Deleting a pull request preview in CI
|
|
118
|
+
|
|
119
|
+
When a pull request closes, delete the environment that the pull request
|
|
120
|
+
deployed, using the same branch name that the deploy step used.
|
|
121
|
+
|
|
122
|
+
```bash
|
|
123
|
+
zuplo delete --project my-project --branch "$BRANCH_NAME"
|
|
124
|
+
```
|
|
125
|
+
|
|
81
126
|
</CliCommand>
|
|
82
127
|
|
|
83
128
|
## Global options
|
|
@@ -86,3 +131,8 @@ The following global options are available for all commands:
|
|
|
86
131
|
|
|
87
132
|
- [`--help`](./global-options.mdx#help)
|
|
88
133
|
- [`--api-key`](./global-options.mdx#api-key)
|
|
134
|
+
|
|
135
|
+
## Additional resources
|
|
136
|
+
|
|
137
|
+
- [Branch-Based Deployments](../articles/branch-based-deployments.mdx)
|
|
138
|
+
- [Deploy command](./deploy.mdx)
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
---
|
|
2
|
+
additional-resources:
|
|
3
|
+
- name: Branch-Based Deployments
|
|
4
|
+
href: ../articles/branch-based-deployments.mdx
|
|
5
|
+
- name: Deploy command
|
|
6
|
+
href: ./deploy.mdx
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Common use cases
|
|
10
|
+
|
|
11
|
+
The following examples assume that you are passing in your `--api-key` either as
|
|
12
|
+
an argument or through the `ZUPLO_API_KEY` environment variable.
|
|
13
|
+
|
|
14
|
+
### Deleting an environment by branch
|
|
15
|
+
|
|
16
|
+
Pass the same branch name that you gave to
|
|
17
|
+
[`zuplo deploy --branch`](./deploy.mdx). The CLI finds the environment that the
|
|
18
|
+
branch deployed in the project and deletes it, so you don't have to capture the
|
|
19
|
+
environment URL.
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
zuplo delete --project my-project --branch my-feature
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
If no environment exists for the branch, the command reports that none was found
|
|
26
|
+
and exits without an error. This makes it safe to run in a cleanup step that can
|
|
27
|
+
fire more than once.
|
|
28
|
+
|
|
29
|
+
### Deleting an environment by URL
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
zuplo delete --url https://my-api-dev-123abc.zuplo.app
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
### Choosing between `--url` and `--branch`
|
|
36
|
+
|
|
37
|
+
Pass exactly one of `--url` or `--branch`. The command fails if you pass both,
|
|
38
|
+
and fails if you pass neither.
|
|
39
|
+
|
|
40
|
+
The CLI reads `--branch` only when you type it on the command line. An exported
|
|
41
|
+
`ZUPLO_BRANCH` environment variable is ignored by `zuplo delete`, so a variable
|
|
42
|
+
that a CI job exports for other commands can't choose the environment you
|
|
43
|
+
delete. `zuplo deploy` ignores `ZUPLO_BRANCH` the same way.
|
|
44
|
+
|
|
45
|
+
### Deleting a pull request preview in CI
|
|
46
|
+
|
|
47
|
+
When a pull request closes, delete the environment that the pull request
|
|
48
|
+
deployed, using the same branch name that the deploy step used.
|
|
49
|
+
|
|
50
|
+
```bash
|
|
51
|
+
zuplo delete --project my-project --branch "$BRANCH_NAME"
|
|
52
|
+
```
|
package/docs/cli/deploy.mdx
CHANGED
|
@@ -129,18 +129,27 @@ zuplo deploy --project my-project
|
|
|
129
129
|
```
|
|
130
130
|
|
|
131
131
|
```bash
|
|
132
|
-
# If you don't wish to use the current Git branch
|
|
133
|
-
#
|
|
132
|
+
# If you don't wish to use the current Git branch, specify the branch name
|
|
133
|
+
# to deploy as with --branch
|
|
134
134
|
|
|
135
|
-
zuplo deploy --project my-project --
|
|
135
|
+
zuplo deploy --project my-project --branch my-branch-name
|
|
136
136
|
```
|
|
137
137
|
|
|
138
|
+
:::note
|
|
139
|
+
|
|
140
|
+
`--environment` is deprecated. Use `--branch` instead. If you pass both,
|
|
141
|
+
`--branch` wins. The CLI reads `--branch` only when you type it on the command
|
|
142
|
+
line. An exported `ZUPLO_BRANCH` environment variable doesn't set the branch
|
|
143
|
+
for `deploy`.
|
|
144
|
+
|
|
145
|
+
:::
|
|
146
|
+
|
|
138
147
|
### Deploying from CI/CD
|
|
139
148
|
|
|
140
|
-
Without `--
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
149
|
+
Without `--branch`, the CLI names the environment after the current git branch.
|
|
150
|
+
CI systems usually check out a detached HEAD, in which case the CLI resolves the
|
|
151
|
+
branch from the remote branches that contain the checked-out commit. Two cases
|
|
152
|
+
break this inference:
|
|
144
153
|
|
|
145
154
|
- On GitHub Actions `pull_request` events, the checkout is the pull request
|
|
146
155
|
merge ref (`refs/pull/<number>/merge`) — a commit that doesn't exist on any
|
|
@@ -148,24 +157,32 @@ commit. Two cases break this inference:
|
|
|
148
157
|
- When the checked-out commit exists on more than one branch, the first match
|
|
149
158
|
wins, which may not be the branch that triggered the build.
|
|
150
159
|
|
|
151
|
-
Always pass `--
|
|
152
|
-
|
|
160
|
+
Always pass `--branch` explicitly in CI so that every trigger deploys the same,
|
|
161
|
+
predictably named environment:
|
|
153
162
|
|
|
154
163
|
```bash
|
|
155
164
|
# GitHub Actions: github.head_ref is the source branch on pull_request
|
|
156
165
|
# events; github.ref_name is the branch on push events
|
|
157
|
-
zuplo deploy --project my-project --
|
|
166
|
+
zuplo deploy --project my-project --branch "$BRANCH_NAME"
|
|
158
167
|
```
|
|
159
168
|
|
|
160
|
-
Deploying the same
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
169
|
+
Deploying the same branch name always updates the same environment and keeps its
|
|
170
|
+
URL stable across deploys. This matters whenever an external system must match
|
|
171
|
+
the URL exactly — an OIDC token audience, a webhook registration, or an
|
|
172
|
+
allowlist. Capture the URL from the deploy output (`Deployed to
|
|
164
173
|
https://...`) rather than constructing it from the branch name: the URL
|
|
165
|
-
hostname uses a normalized, truncated form of the
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
174
|
+
hostname uses a normalized, truncated form of the branch name plus a unique
|
|
175
|
+
identifier. See [Branch-Based Deployments](../articles/branch-based-deployments.mdx)
|
|
176
|
+
for the naming rules.
|
|
177
|
+
|
|
178
|
+
### Cleaning up a branch deployment
|
|
179
|
+
|
|
180
|
+
To remove the environment that a branch deployed, pass the same branch name to
|
|
181
|
+
[`zuplo delete`](./delete.mdx). You don't need the environment URL.
|
|
182
|
+
|
|
183
|
+
```bash
|
|
184
|
+
zuplo delete --project my-project --branch "$BRANCH_NAME"
|
|
185
|
+
```
|
|
169
186
|
|
|
170
187
|
## Polling timeout
|
|
171
188
|
|
|
@@ -19,18 +19,27 @@ zuplo deploy --project my-project
|
|
|
19
19
|
```
|
|
20
20
|
|
|
21
21
|
```bash
|
|
22
|
-
# If you don't wish to use the current Git branch
|
|
23
|
-
#
|
|
22
|
+
# If you don't wish to use the current Git branch, specify the branch name
|
|
23
|
+
# to deploy as with --branch
|
|
24
24
|
|
|
25
|
-
zuplo deploy --project my-project --
|
|
25
|
+
zuplo deploy --project my-project --branch my-branch-name
|
|
26
26
|
```
|
|
27
27
|
|
|
28
|
+
:::note
|
|
29
|
+
|
|
30
|
+
`--environment` is deprecated. Use `--branch` instead. If you pass both,
|
|
31
|
+
`--branch` wins. The CLI reads `--branch` only when you type it on the command
|
|
32
|
+
line. An exported `ZUPLO_BRANCH` environment variable doesn't set the branch
|
|
33
|
+
for `deploy`.
|
|
34
|
+
|
|
35
|
+
:::
|
|
36
|
+
|
|
28
37
|
### Deploying from CI/CD
|
|
29
38
|
|
|
30
|
-
Without `--
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
39
|
+
Without `--branch`, the CLI names the environment after the current git branch.
|
|
40
|
+
CI systems usually check out a detached HEAD, in which case the CLI resolves the
|
|
41
|
+
branch from the remote branches that contain the checked-out commit. Two cases
|
|
42
|
+
break this inference:
|
|
34
43
|
|
|
35
44
|
- On GitHub Actions `pull_request` events, the checkout is the pull request
|
|
36
45
|
merge ref (`refs/pull/<number>/merge`) — a commit that doesn't exist on any
|
|
@@ -38,24 +47,32 @@ commit. Two cases break this inference:
|
|
|
38
47
|
- When the checked-out commit exists on more than one branch, the first match
|
|
39
48
|
wins, which may not be the branch that triggered the build.
|
|
40
49
|
|
|
41
|
-
Always pass `--
|
|
42
|
-
|
|
50
|
+
Always pass `--branch` explicitly in CI so that every trigger deploys the same,
|
|
51
|
+
predictably named environment:
|
|
43
52
|
|
|
44
53
|
```bash
|
|
45
54
|
# GitHub Actions: github.head_ref is the source branch on pull_request
|
|
46
55
|
# events; github.ref_name is the branch on push events
|
|
47
|
-
zuplo deploy --project my-project --
|
|
56
|
+
zuplo deploy --project my-project --branch "$BRANCH_NAME"
|
|
48
57
|
```
|
|
49
58
|
|
|
50
|
-
Deploying the same
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
59
|
+
Deploying the same branch name always updates the same environment and keeps its
|
|
60
|
+
URL stable across deploys. This matters whenever an external system must match
|
|
61
|
+
the URL exactly — an OIDC token audience, a webhook registration, or an
|
|
62
|
+
allowlist. Capture the URL from the deploy output (`Deployed to
|
|
54
63
|
https://...`) rather than constructing it from the branch name: the URL
|
|
55
|
-
hostname uses a normalized, truncated form of the
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
64
|
+
hostname uses a normalized, truncated form of the branch name plus a unique
|
|
65
|
+
identifier. See [Branch-Based Deployments](../articles/branch-based-deployments.mdx)
|
|
66
|
+
for the naming rules.
|
|
67
|
+
|
|
68
|
+
### Cleaning up a branch deployment
|
|
69
|
+
|
|
70
|
+
To remove the environment that a branch deployed, pass the same branch name to
|
|
71
|
+
[`zuplo delete`](./delete.mdx). You don't need the environment URL.
|
|
72
|
+
|
|
73
|
+
```bash
|
|
74
|
+
zuplo delete --project my-project --branch "$BRANCH_NAME"
|
|
75
|
+
```
|
|
59
76
|
|
|
60
77
|
## Polling timeout
|
|
61
78
|
|
|
@@ -56,6 +56,38 @@ applies_to:
|
|
|
56
56
|
usage="$0 variable delete --name <name> --branch <branch> [options]"
|
|
57
57
|
>
|
|
58
58
|
|
|
59
|
+
## Which variable the branch selects
|
|
60
|
+
|
|
61
|
+
`--branch` picks the variable to delete. It doesn't delete the variable from
|
|
62
|
+
only that branch.
|
|
63
|
+
|
|
64
|
+
- On the project's default branch (usually `main`), the command deletes the
|
|
65
|
+
variable that targets production.
|
|
66
|
+
- On any other branch, the command deletes the variable that is scoped to that
|
|
67
|
+
branch.
|
|
68
|
+
|
|
69
|
+
The command deletes the whole variable, from every environment it targets. A
|
|
70
|
+
preview variable that applies to all branches can't be addressed from any
|
|
71
|
+
branch, so deleting it returns a `404`. On a project with no default branch,
|
|
72
|
+
only branch-scoped variables can be addressed, so a production variable also
|
|
73
|
+
returns a `404`.
|
|
74
|
+
|
|
75
|
+
The CLI reads `--branch` only when you type it on the command line. An exported
|
|
76
|
+
`ZUPLO_BRANCH` environment variable doesn't choose the branch to delete from.
|
|
77
|
+
|
|
78
|
+
Variables only change in an environment on its next deployment. Redeploy the
|
|
79
|
+
environment for the deletion to take effect.
|
|
80
|
+
|
|
81
|
+
## Common use cases
|
|
82
|
+
|
|
83
|
+
```bash
|
|
84
|
+
# Delete the production variable API_KEY
|
|
85
|
+
zuplo variable delete --name API_KEY --branch main
|
|
86
|
+
|
|
87
|
+
# Delete the variable scoped to the my-feature branch
|
|
88
|
+
zuplo variable delete --name BASE_URL --branch my-feature
|
|
89
|
+
```
|
|
90
|
+
|
|
59
91
|
</CliCommand>
|
|
60
92
|
|
|
61
93
|
## Global options
|
|
@@ -64,3 +96,7 @@ The following global options are available for all commands:
|
|
|
64
96
|
|
|
65
97
|
- [`--help`](./global-options.mdx#help)
|
|
66
98
|
- [`--api-key`](./global-options.mdx#api-key)
|
|
99
|
+
|
|
100
|
+
## Additional resources
|
|
101
|
+
|
|
102
|
+
- [Environment variables](../articles/environment-variables.mdx)
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
---
|
|
2
|
+
additional-resources:
|
|
3
|
+
- name: Environment variables
|
|
4
|
+
href: ../articles/environment-variables.mdx
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Which variable the branch selects
|
|
8
|
+
|
|
9
|
+
`--branch` picks the variable to delete. It doesn't delete the variable from
|
|
10
|
+
only that branch.
|
|
11
|
+
|
|
12
|
+
- On the project's default branch (usually `main`), the command deletes the
|
|
13
|
+
variable that targets production.
|
|
14
|
+
- On any other branch, the command deletes the variable that is scoped to that
|
|
15
|
+
branch.
|
|
16
|
+
|
|
17
|
+
The command deletes the whole variable, from every environment it targets. A
|
|
18
|
+
preview variable that applies to all branches can't be addressed from any
|
|
19
|
+
branch, so deleting it returns a `404`. On a project with no default branch,
|
|
20
|
+
only branch-scoped variables can be addressed, so a production variable also
|
|
21
|
+
returns a `404`.
|
|
22
|
+
|
|
23
|
+
The CLI reads `--branch` only when you type it on the command line. An exported
|
|
24
|
+
`ZUPLO_BRANCH` environment variable doesn't choose the branch to delete from.
|
|
25
|
+
|
|
26
|
+
Variables only change in an environment on its next deployment. Redeploy the
|
|
27
|
+
environment for the deletion to take effect.
|
|
28
|
+
|
|
29
|
+
## Common use cases
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
# Delete the production variable API_KEY
|
|
33
|
+
zuplo variable delete --name API_KEY --branch main
|
|
34
|
+
|
|
35
|
+
# Delete the variable scoped to the my-feature branch
|
|
36
|
+
zuplo variable delete --name BASE_URL --branch my-feature
|
|
37
|
+
```
|
|
@@ -90,12 +90,8 @@ maps to a **Preview** environment.
|
|
|
90
90
|
<DiagramNode id="prod" variant="green">
|
|
91
91
|
Production
|
|
92
92
|
</DiagramNode>
|
|
93
|
-
<DiagramNode id="preview-staging"
|
|
94
|
-
|
|
95
|
-
</DiagramNode>
|
|
96
|
-
<DiagramNode id="preview-feature" variant="blue">
|
|
97
|
-
Preview (feature/auth)
|
|
98
|
-
</DiagramNode>
|
|
93
|
+
<DiagramNode id="preview-staging">Preview (staging)</DiagramNode>
|
|
94
|
+
<DiagramNode id="preview-feature">Preview (feature/auth)</DiagramNode>
|
|
99
95
|
</DiagramGroup>
|
|
100
96
|
<DiagramEdge from="main" to="prod" />
|
|
101
97
|
<DiagramEdge from="staging" to="preview-staging" />
|
|
@@ -168,10 +164,10 @@ See the provider-specific CI/CD guides:
|
|
|
168
164
|
When you run `zuplo deploy`, the CLI determines the environment name using the
|
|
169
165
|
following logic:
|
|
170
166
|
|
|
171
|
-
1. If you pass `--
|
|
167
|
+
1. If you pass `--branch my-branch`, the CLI uses `my-branch` as the environment
|
|
172
168
|
name.
|
|
173
|
-
2. If you do not pass `--
|
|
174
|
-
|
|
169
|
+
2. If you do not pass `--branch`, the CLI uses the **current Git branch name**
|
|
170
|
+
as the environment name.
|
|
175
171
|
|
|
176
172
|
This means in a typical CI/CD pipeline, the deploy command automatically names
|
|
177
173
|
the environment after the branch being built without any extra configuration.
|
|
@@ -180,8 +176,8 @@ the environment after the branch being built without any extra configuration.
|
|
|
180
176
|
# On the "staging" branch, this creates/updates the "staging" environment
|
|
181
177
|
npx zuplo deploy --api-key $ZUPLO_API_KEY
|
|
182
178
|
|
|
183
|
-
#
|
|
184
|
-
npx zuplo deploy --api-key $ZUPLO_API_KEY --
|
|
179
|
+
# Deploy under a different branch name explicitly
|
|
180
|
+
npx zuplo deploy --api-key $ZUPLO_API_KEY --branch production
|
|
185
181
|
```
|
|
186
182
|
|
|
187
183
|
For full CLI deploy reference, see [CLI: deploy](../cli/deploy.mdx).
|
|
@@ -207,13 +203,9 @@ environment.
|
|
|
207
203
|
The typical workflow from development to production looks like this:
|
|
208
204
|
|
|
209
205
|
<Diagram direction="vertical" height="h-96">
|
|
210
|
-
<DiagramNode id="develop"
|
|
211
|
-
Develop (local or working copy)
|
|
212
|
-
</DiagramNode>
|
|
206
|
+
<DiagramNode id="develop">Develop (local or working copy)</DiagramNode>
|
|
213
207
|
<DiagramNode id="push">Push to feature branch</DiagramNode>
|
|
214
|
-
<DiagramNode id="preview"
|
|
215
|
-
Preview environment deployed
|
|
216
|
-
</DiagramNode>
|
|
208
|
+
<DiagramNode id="preview">Preview environment deployed</DiagramNode>
|
|
217
209
|
<DiagramNode id="merge">Merge to main</DiagramNode>
|
|
218
210
|
<DiagramNode id="production" variant="green">
|
|
219
211
|
Production environment updated
|