Skip to content

Commit

Permalink
Add commands for exporting and importing app/fleet releases.
Browse files Browse the repository at this point in the history
Change-type: minor
Signed-off-by: Carlo Miguel F. Cruz <[email protected]>
  • Loading branch information
cmfcruz committed Aug 29, 2024
1 parent a9a2022 commit 3525278
Show file tree
Hide file tree
Showing 7 changed files with 622 additions and 319 deletions.
2 changes: 1 addition & 1 deletion completion/_balena
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ _balena() {
key_cmds=( add rm )
local_cmds=( configure flash )
os_cmds=( build-config configure download initialize versions )
release_cmds=( finalize invalidate validate )
release_cmds=( export finalize import invalidate validate )
tag_cmds=( rm set )


Expand Down
2 changes: 1 addition & 1 deletion completion/balena-completion.bash
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ _balena_complete()
key_cmds="add rm"
local_cmds="configure flash"
os_cmds="build-config configure download initialize versions"
release_cmds="finalize invalidate validate"
release_cmds="export finalize import invalidate validate"
tag_cmds="rm set"


Expand Down
57 changes: 57 additions & 0 deletions docs/balena-cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,9 @@ are encouraged to regularly update the balena CLI to the latest version.

- Releases

- [release export &#60;commitorid&#62;](#release-export-commitorid)
- [release finalize &#60;commitorid&#62;](#release-finalize-commitorid)
- [release import &#60;file&#62;](#release-import-file)
- [release &#60;commitorid&#62;](#release-commitorid)
- [release invalidate &#60;commitorid&#62;](#release-invalidate-commitorid)
- [release validate &#60;commitorid&#62;](#release-validate-commitorid)
Expand Down Expand Up @@ -3345,6 +3347,31 @@ The notes for this release

# Releases

## release export &#60;commitOrId&#62;

Saving a release to a file allows you to import an exact
copy of the original release into another application.

Only successful releases can be saved into a file.

Examples:

$ balena release export a777f7345fe3d655c1c981aa642e5555 -o ../path/to/release.tar
$ balena release export 1234567 -o ../path/to/release.tar
$ balena release export myOrg/myFleet:1.2.3 -o ../path/to/release.tar

### Arguments

#### COMMITORID

commit, ID, or version of the release to export

### Options

#### -o, --output OUTPUT

output path

## release finalize &#60;commitOrId&#62;

Finalize a release. Releases can be "draft" or "final", and this command
Expand All @@ -3371,6 +3398,36 @@ the commit or ID of the release to finalize

### Options

## release import &#60;file&#62;

To save a release into a file, use 'balena release export'.

Use the --override-version option to specify the version
of the imported release, overriding the one saved in the file.

Examples:

$ balena release import ../path/to/release.tar -f 1234567
$ balena release import ../path/to/release.tar -f myFleet
$ balena release import ../path/to/release.tar -f myOrg/myFleet
$ balena release import ../path/to/release.tar -f myOrg/myFleet -V 1.2.3

### Arguments

#### BUNDLE

path to a file, e.g. "release.tar"

### Options

#### -f, --fleet FLEET

fleet name or slug (preferred)

#### -V, --override-version OVERRIDE-VERSION

Imports this release with the specified version overriding the version in the file.

## release &#60;commitOrId&#62;

The --json option is recommended when scripting the output of this command,
Expand Down
Loading

0 comments on commit 3525278

Please sign in to comment.