Skip to content

Commit

Permalink
Merge pull request #870 from zapier/pde-5392-canary-docs
Browse files Browse the repository at this point in the history
feat(docs) - Add canary cmd to docs
  • Loading branch information
standielpls authored Sep 24, 2024
2 parents 00a34e9 + 9bce307 commit 99a58ad
Show file tree
Hide file tree
Showing 5 changed files with 278 additions and 0 deletions.
83 changes: 83 additions & 0 deletions docs/cli.html
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,9 @@
<li><a href="#commands">Commands</a><ul>
<li><a href="#analytics">analytics</a></li>
<li><a href="#build">build</a></li>
<li><a href="#canarycreate">canary:create</a></li>
<li><a href="#canarydelete">canary:delete</a></li>
<li><a href="#canarylist">canary:list</a></li>
<li><a href="#convert">convert</a></li>
<li><a href="#deleteintegration">delete:integration</a></li>
<li><a href="#deleteversion">delete:version</a></li>
Expand Down Expand Up @@ -367,6 +370,86 @@ <h2 id="build">build</h2>
</div>
</div>
</div><div class="row">
<div class="row-height">
<div class="col-md-5 col-sm-12 col-height docs-primary">
<h2 id="canarycreate">canary:create</h2>
</div>
<div class="col-md-7 col-sm-12 col-height is-empty docs-code">

</div>
</div>
</div><div class="row">
<div class="row-height">
<div class="col-md-5 col-sm-12 col-height docs-primary">
<blockquote>
<p>Create a new canary deployment, diverting a specified percentage of traffic from one version to another for a specified duration.</p>
</blockquote><p><strong>Usage</strong>: <code>zapier canary:create VERSIONFROM VERSIONTO</code></p><p>Only one canary can be active at the same time. You can run <code>zapier canary:list</code> to check. If you would like to create a new canary with different parameters, you can wait for the canary to finish, or delete it using <code>zapier canary:delete a.b.c x.y.z</code>.</p><p>Note: this is similar to <code>zapier migrate</code> but different in that this is temporary and will &quot;revert&quot; the changes once the specified duration is expired.</p><p><strong>Only use this command to canary traffic between non-breaking versions!</strong></p><p><strong>Arguments</strong></p><ul>
<li>(required) <code>versionFrom</code> | Version to route traffic from</li>
<li>(required) <code>versionTo</code> | Version to canary traffic to</li>
</ul><p><strong>Flags</strong></p><ul>
<li>(required) <code>-p, --percent</code> | Percent of traffic to route to new version</li>
<li>(required) <code>-d, --duration</code> | Duration of the canary in seconds</li>
<li><code>-d, --debug</code> | Show extra debugging output.</li>
</ul><p><strong>Examples</strong></p><ul>
<li><code>zapier canary:create 1.0.0 1.1.0 -p 25 -d 720</code></li>
<li><code>zapier canary:create 2.0.0 2.1.0 --percent 50 --duration 300</code></li>
</ul>
</div>
<div class="col-md-7 col-sm-12 col-height is-empty docs-code">

</div>
</div>
</div><div class="row">
<div class="row-height">
<div class="col-md-5 col-sm-12 col-height docs-primary">
<h2 id="canarydelete">canary:delete</h2>
</div>
<div class="col-md-7 col-sm-12 col-height is-empty docs-code">

</div>
</div>
</div><div class="row">
<div class="row-height">
<div class="col-md-5 col-sm-12 col-height docs-primary">
<blockquote>
<p>Delete an active canary deployment</p>
</blockquote><p><strong>Usage</strong>: <code>zapier canary:delete VERSIONFROM VERSIONTO</code></p><p><strong>Arguments</strong></p><ul>
<li>(required) <code>versionFrom</code> | Version to route traffic from</li>
<li>(required) <code>versionTo</code> | Version canary traffic is routed to</li>
</ul><p><strong>Examples</strong></p><ul>
<li><code>zapier canary:delete 1.0.0 1.1.0</code></li>
</ul>
</div>
<div class="col-md-7 col-sm-12 col-height is-empty docs-code">

</div>
</div>
</div><div class="row">
<div class="row-height">
<div class="col-md-5 col-sm-12 col-height docs-primary">
<h2 id="canarylist">canary:list</h2>
</div>
<div class="col-md-7 col-sm-12 col-height is-empty docs-code">

</div>
</div>
</div><div class="row">
<div class="row-height">
<div class="col-md-5 col-sm-12 col-height docs-primary">
<blockquote>
<p>List all active canary deployments</p>
</blockquote><p><strong>Usage</strong>: <code>zapier canary:list</code></p><p><strong>Flags</strong></p><ul>
<li><code>-f, --format</code> | Change the way structured data is presented. If &quot;json&quot; or &quot;raw&quot;, you can pipe the output of the command into other tools, such as jq. One of <code>[plain | json | raw | row | table]</code>. Defaults to <code>table</code>.</li>
<li><code>-d, --debug</code> | Show extra debugging output.</li>
</ul><p><strong>Examples</strong></p><ul>
<li><code>zapier canary:list</code></li>
</ul>
</div>
<div class="col-md-7 col-sm-12 col-height is-empty docs-code">

</div>
</div>
</div><div class="row">
<div class="row-height">
<div class="col-md-5 col-sm-12 col-height docs-primary">
<h2 id="convert">convert</h2>
Expand Down
54 changes: 54 additions & 0 deletions docs/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,60 @@ This command is typically followed by `zapier upload`.
* `-d, --debug` | Show extra debugging output.


## canary:create

> Create a new canary deployment, diverting a specified percentage of traffic from one version to another for a specified duration.
**Usage**: `zapier canary:create VERSIONFROM VERSIONTO`

Only one canary can be active at the same time. You can run `zapier canary:list` to check. If you would like to create a new canary with different parameters, you can wait for the canary to finish, or delete it using `zapier canary:delete a.b.c x.y.z`.

Note: this is similar to `zapier migrate` but different in that this is temporary and will "revert" the changes once the specified duration is expired.

**Only use this command to canary traffic between non-breaking versions!**

**Arguments**
* (required) `versionFrom` | Version to route traffic from
* (required) `versionTo` | Version to canary traffic to

**Flags**
* (required) `-p, --percent` | Percent of traffic to route to new version
* (required) `-d, --duration` | Duration of the canary in seconds
* `-d, --debug` | Show extra debugging output.

**Examples**
* `zapier canary:create 1.0.0 1.1.0 -p 25 -d 720`
* `zapier canary:create 2.0.0 2.1.0 --percent 50 --duration 300`


## canary:delete

> Delete an active canary deployment
**Usage**: `zapier canary:delete VERSIONFROM VERSIONTO`

**Arguments**
* (required) `versionFrom` | Version to route traffic from
* (required) `versionTo` | Version canary traffic is routed to

**Examples**
* `zapier canary:delete 1.0.0 1.1.0`


## canary:list

> List all active canary deployments
**Usage**: `zapier canary:list`

**Flags**
* `-f, --format` | Change the way structured data is presented. If "json" or "raw", you can pipe the output of the command into other tools, such as jq. One of `[plain | json | raw | row | table]`. Defaults to `table`.
* `-d, --debug` | Show extra debugging output.

**Examples**
* `zapier canary:list`


## convert

> Convert a Visual Builder integration to a CLI integration.
Expand Down
83 changes: 83 additions & 0 deletions packages/cli/docs/cli.html
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,9 @@
<li><a href="#commands">Commands</a><ul>
<li><a href="#analytics">analytics</a></li>
<li><a href="#build">build</a></li>
<li><a href="#canarycreate">canary:create</a></li>
<li><a href="#canarydelete">canary:delete</a></li>
<li><a href="#canarylist">canary:list</a></li>
<li><a href="#convert">convert</a></li>
<li><a href="#deleteintegration">delete:integration</a></li>
<li><a href="#deleteversion">delete:version</a></li>
Expand Down Expand Up @@ -367,6 +370,86 @@ <h2 id="build">build</h2>
</div>
</div>
</div><div class="row">
<div class="row-height">
<div class="col-md-5 col-sm-12 col-height docs-primary">
<h2 id="canarycreate">canary:create</h2>
</div>
<div class="col-md-7 col-sm-12 col-height is-empty docs-code">

</div>
</div>
</div><div class="row">
<div class="row-height">
<div class="col-md-5 col-sm-12 col-height docs-primary">
<blockquote>
<p>Create a new canary deployment, diverting a specified percentage of traffic from one version to another for a specified duration.</p>
</blockquote><p><strong>Usage</strong>: <code>zapier canary:create VERSIONFROM VERSIONTO</code></p><p>Only one canary can be active at the same time. You can run <code>zapier canary:list</code> to check. If you would like to create a new canary with different parameters, you can wait for the canary to finish, or delete it using <code>zapier canary:delete a.b.c x.y.z</code>.</p><p>Note: this is similar to <code>zapier migrate</code> but different in that this is temporary and will &quot;revert&quot; the changes once the specified duration is expired.</p><p><strong>Only use this command to canary traffic between non-breaking versions!</strong></p><p><strong>Arguments</strong></p><ul>
<li>(required) <code>versionFrom</code> | Version to route traffic from</li>
<li>(required) <code>versionTo</code> | Version to canary traffic to</li>
</ul><p><strong>Flags</strong></p><ul>
<li>(required) <code>-p, --percent</code> | Percent of traffic to route to new version</li>
<li>(required) <code>-d, --duration</code> | Duration of the canary in seconds</li>
<li><code>-d, --debug</code> | Show extra debugging output.</li>
</ul><p><strong>Examples</strong></p><ul>
<li><code>zapier canary:create 1.0.0 1.1.0 -p 25 -d 720</code></li>
<li><code>zapier canary:create 2.0.0 2.1.0 --percent 50 --duration 300</code></li>
</ul>
</div>
<div class="col-md-7 col-sm-12 col-height is-empty docs-code">

</div>
</div>
</div><div class="row">
<div class="row-height">
<div class="col-md-5 col-sm-12 col-height docs-primary">
<h2 id="canarydelete">canary:delete</h2>
</div>
<div class="col-md-7 col-sm-12 col-height is-empty docs-code">

</div>
</div>
</div><div class="row">
<div class="row-height">
<div class="col-md-5 col-sm-12 col-height docs-primary">
<blockquote>
<p>Delete an active canary deployment</p>
</blockquote><p><strong>Usage</strong>: <code>zapier canary:delete VERSIONFROM VERSIONTO</code></p><p><strong>Arguments</strong></p><ul>
<li>(required) <code>versionFrom</code> | Version to route traffic from</li>
<li>(required) <code>versionTo</code> | Version canary traffic is routed to</li>
</ul><p><strong>Examples</strong></p><ul>
<li><code>zapier canary:delete 1.0.0 1.1.0</code></li>
</ul>
</div>
<div class="col-md-7 col-sm-12 col-height is-empty docs-code">

</div>
</div>
</div><div class="row">
<div class="row-height">
<div class="col-md-5 col-sm-12 col-height docs-primary">
<h2 id="canarylist">canary:list</h2>
</div>
<div class="col-md-7 col-sm-12 col-height is-empty docs-code">

</div>
</div>
</div><div class="row">
<div class="row-height">
<div class="col-md-5 col-sm-12 col-height docs-primary">
<blockquote>
<p>List all active canary deployments</p>
</blockquote><p><strong>Usage</strong>: <code>zapier canary:list</code></p><p><strong>Flags</strong></p><ul>
<li><code>-f, --format</code> | Change the way structured data is presented. If &quot;json&quot; or &quot;raw&quot;, you can pipe the output of the command into other tools, such as jq. One of <code>[plain | json | raw | row | table]</code>. Defaults to <code>table</code>.</li>
<li><code>-d, --debug</code> | Show extra debugging output.</li>
</ul><p><strong>Examples</strong></p><ul>
<li><code>zapier canary:list</code></li>
</ul>
</div>
<div class="col-md-7 col-sm-12 col-height is-empty docs-code">

</div>
</div>
</div><div class="row">
<div class="row-height">
<div class="col-md-5 col-sm-12 col-height docs-primary">
<h2 id="convert">convert</h2>
Expand Down
54 changes: 54 additions & 0 deletions packages/cli/docs/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,60 @@ This command is typically followed by `zapier upload`.
* `-d, --debug` | Show extra debugging output.


## canary:create

> Create a new canary deployment, diverting a specified percentage of traffic from one version to another for a specified duration.
**Usage**: `zapier canary:create VERSIONFROM VERSIONTO`

Only one canary can be active at the same time. You can run `zapier canary:list` to check. If you would like to create a new canary with different parameters, you can wait for the canary to finish, or delete it using `zapier canary:delete a.b.c x.y.z`.

Note: this is similar to `zapier migrate` but different in that this is temporary and will "revert" the changes once the specified duration is expired.

**Only use this command to canary traffic between non-breaking versions!**

**Arguments**
* (required) `versionFrom` | Version to route traffic from
* (required) `versionTo` | Version to canary traffic to

**Flags**
* (required) `-p, --percent` | Percent of traffic to route to new version
* (required) `-d, --duration` | Duration of the canary in seconds
* `-d, --debug` | Show extra debugging output.

**Examples**
* `zapier canary:create 1.0.0 1.1.0 -p 25 -d 720`
* `zapier canary:create 2.0.0 2.1.0 --percent 50 --duration 300`


## canary:delete

> Delete an active canary deployment
**Usage**: `zapier canary:delete VERSIONFROM VERSIONTO`

**Arguments**
* (required) `versionFrom` | Version to route traffic from
* (required) `versionTo` | Version canary traffic is routed to

**Examples**
* `zapier canary:delete 1.0.0 1.1.0`


## canary:list

> List all active canary deployments
**Usage**: `zapier canary:list`

**Flags**
* `-f, --format` | Change the way structured data is presented. If "json" or "raw", you can pipe the output of the command into other tools, such as jq. One of `[plain | json | raw | row | table]`. Defaults to `table`.
* `-d, --debug` | Show extra debugging output.

**Examples**
* `zapier canary:list`


## convert

> Convert a Visual Builder integration to a CLI integration.
Expand Down
4 changes: 4 additions & 0 deletions packages/cli/src/oclif/oCommands.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ module.exports = {
analytics: require('./commands/analytics'),
apps: true,
build: require('./commands/build'),
canary: true,
'canary:create': require('./commands/canary/create'),
'canary:delete': require('./commands/canary/delete'),
'canary:list': require('./commands/canary/list'),
cache: true,
'cache:clear': require('./commands/cache/clear'),
convert: require('./commands/convert'),
Expand Down

0 comments on commit 99a58ad

Please sign in to comment.