Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(commands): add bundle CLI documentation #142

Merged
merged 5 commits into from
Nov 15, 2023
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
30 changes: 30 additions & 0 deletions cli/commands/bundle/build.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
---
title: "bundle build"
description: "Build a new bundle"
---

```
flipt bundle build [flags] <name>
```

This command builds a new bundle containing feature files identified via Flipt's feature index (see: [Locating flag state](/configuration/storage#locating-flag-state)).

Given the files are all valid the command should successfully create a new (local) OCI feature bundle, and its resulting SHA digest is printed.

Bundles are named via the provided `name` argument. This argument supports an optional `tag` suffix.

### Examples

```
$ flipt bundle build mybundle
sha256:0e500a47bc26afcc91a1cea7abb39f55566bb99b709449a1752eea65000a663c

$ flipt bundle build mybundle:latest
sha256:0e500a47bc26afcc91a1cea7abb39f55566bb99b709449a1752eea65000a663c
```

### Options

```
-h, --help help for build
```
27 changes: 27 additions & 0 deletions cli/commands/bundle/list.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
---
title: "bundle list"
description: "List all bundles"
---

```
flipt bundle list [flags]
```

This command lists out named bundles previously built or pulled locally.
Each bundle is listed with its digest, name, created timestamp and optional tag.

### Examples

```
$ flipt bundle list
DIGEST REPO TAG CREATED
8a70b2c mybundle latest 2023-11-13 13:51:20 +0000 UTC
9388e73 mybundle 2023-11-10 12:02:04 +0000 UTC
3e628b6 mybundle 2023-11-03 15:54:54 +0000 UTC
```

### Options

```
-h, --help help for list
```
27 changes: 27 additions & 0 deletions cli/commands/bundle/pull.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
---
title: "bundle pull"
description: "Pull a remote bundle"
---

```
flipt bundle pull [flags] <remote>
```

This command fetches a bundle from a target remote locally with the same name.

### Examples

```
$ flipt bundle pull ghcr.io/flipt-io/flipt/mybundle:latest
sha256:0e500a47bc26afcc91a1cea7abb39f55566bb99b709449a1752eea65000a663c

$ flipt bundle list
0e500a4 mybundle latest 2023-11-13 13:53:52 +0000 UTC
8a70b2c mybundle 2023-11-13 13:51:20 +0000 UTC
```

### Options

```
-h, --help help for pull
```
24 changes: 24 additions & 0 deletions cli/commands/bundle/push.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
title: "bundle push"
description: "Push local bundle to remote"
---

```
flipt bundle push [flags] <from> <to>
```

This command pushes a bundle located at `from` to the target `to`.
More commonly this is used to push a local bundle to an upstream registry.

### Examples

```
flipt bundle push mybundle:latest ghcr.io/flipt-io/flipt/mybundle:latest
sha256:0e500a47bc26afcc91a1cea7abb39f55566bb99b709449a1752eea65000a663c
```

### Options

```
-h, --help help for push
```
9 changes: 9 additions & 0 deletions mint.json
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,15 @@
"cli/commands/config/edit"
]
},
{
"group": "bundle",
"pages":[
"cli/commands/bundle/build",
"cli/commands/bundle/list",
"cli/commands/bundle/pull",
"cli/commands/bundle/push"
]
},
"cli/commands/export",
"cli/commands/import",
"cli/commands/migrate",
Expand Down