mirror of
https://github.com/balena-io/balena-cli.git
synced 2025-03-21 11:35:54 +00:00
Update livepush documentation and required versions
Change-type: patch Signed-off-by: Cameron Diver <cameron@balena.io>
This commit is contained in:
parent
490f833a33
commit
7c71098d86
@ -1390,18 +1390,23 @@ Docker host TLS key file
|
||||
|
||||
## push <applicationOrDevice>
|
||||
|
||||
This command can be used to start an image build on the remote balenaCloud build
|
||||
servers, or on a local-mode balena device.
|
||||
This command can be used to start a build on the remote balena cloud builders,
|
||||
or a local mode balena device.
|
||||
|
||||
When building on the balenaCloud servers, the given source directory will be
|
||||
sent to the remote server. This can be used as a drop-in replacement for the
|
||||
"git push" deployment method.
|
||||
|
||||
When building on a local-mode device, the given source directory will be
|
||||
When building on a local mode device, the given source directory will be
|
||||
built on the device, and the resulting containers will be run on the device.
|
||||
Logs will be streamed back from the device as part of the same invocation.
|
||||
The web dashboard can be used to switch a device to local mode:
|
||||
https://www.balena.io/docs/learn/develop/local-mode/
|
||||
Note that local mode requires a supervisor version of at least v7.21.0.
|
||||
|
||||
It is also possible to run a push to a local mode device in live mode.
|
||||
This will watch for changes in the source directory and perform an
|
||||
in-place build in the running containers [BETA].
|
||||
|
||||
The --registry-secrets option specifies a JSON or YAML file containing private
|
||||
Docker registry usernames and passwords to be used when pulling base images.
|
||||
@ -1447,8 +1452,14 @@ Path to a local YAML or JSON file containing Docker registry passwords used to p
|
||||
|
||||
#### --live, -l
|
||||
|
||||
Start a live session after the push, which will wait for code changes, and synchronise them with
|
||||
running containers. This mode is only valid when pushing to a local device.
|
||||
Note this feature is in beta.
|
||||
|
||||
Start a live session with the containers pushed to a local-mode device.
|
||||
The project source folder is watched for filesystem events, and changes
|
||||
to files and folders are automatically synchronized to the running
|
||||
containers. The synchronisation is only in one direction, from this machine to
|
||||
the device, and changes made on the device itself may be overwritten.
|
||||
This feature requires a device running supervisor version v9.7.0 or greater.
|
||||
|
||||
# Settings
|
||||
|
||||
|
@ -117,24 +117,20 @@ export const push: CommandDefinition<
|
||||
This command can be used to start a build on the remote balena cloud builders,
|
||||
or a local mode balena device.
|
||||
|
||||
When building on the balena cloud the given source directory will be sent to the
|
||||
balena builder, and the build will proceed. This can be used as a drop-in
|
||||
replacement for git push to deploy.
|
||||
|
||||
When building on a local mode device, the given source directory will be built
|
||||
on the device, and the resulting containers will be run on the device. Logs will
|
||||
be streamed back from the device as part of the same invocation. This requires
|
||||
a device with a supervisor version of at least v7.21.0.
|
||||
|
||||
When building on the balenaCloud servers, the given source directory will be
|
||||
sent to the remote server. This can be used as a drop-in replacement for the
|
||||
"git push" deployment method.
|
||||
|
||||
When building on a local-mode device, the given source directory will be
|
||||
When building on a local mode device, the given source directory will be
|
||||
built on the device, and the resulting containers will be run on the device.
|
||||
Logs will be streamed back from the device as part of the same invocation.
|
||||
The web dashboard can be used to switch a device to local mode:
|
||||
https://www.balena.io/docs/learn/develop/local-mode/
|
||||
Note that local mode requires a supervisor version of at least v7.21.0.
|
||||
|
||||
It is also possible to run a push to a local mode device in live mode.
|
||||
This will watch for changes in the source directory and perform an
|
||||
in-place build in the running containers [BETA].
|
||||
|
||||
${registrySecretsHelp.split('\n').join('\n\t\t')}
|
||||
|
||||
@ -180,8 +176,14 @@ export const push: CommandDefinition<
|
||||
alias: 'l',
|
||||
boolean: true,
|
||||
description: stripIndent`
|
||||
Start a live session after the push, which will wait for code changes, and synchronise them with
|
||||
running containers. This mode is only valid when pushing to a local device.`,
|
||||
Note this feature is in beta.
|
||||
|
||||
Start a live session with the containers pushed to a local-mode device.
|
||||
The project source folder is watched for filesystem events, and changes
|
||||
to files and folders are automatically synchronized to the running
|
||||
containers. The synchronisation is only in one direction, from this machine to
|
||||
the device, and changes made on the device itself may be overwritten.
|
||||
This feature requires a device running supervisor version v9.7.0 or greater.`,
|
||||
},
|
||||
],
|
||||
async action(params, options, done) {
|
||||
|
@ -88,12 +88,9 @@ export async function deployToDevice(opts: DeviceDeployOptions): Promise<void> {
|
||||
if (!semver.satisfies(version, '>=7.21.4')) {
|
||||
exitWithExpectedError(versionError);
|
||||
}
|
||||
// FIXME: DO NOT MERGE until this version number has been updated
|
||||
// with the version which the following PR ends up in the supervisor
|
||||
// https://github.com/balena-io/balena-supervisor/pull/828
|
||||
if (opts.live && !semver.satisfies(version, '>=1.0.0')) {
|
||||
if (opts.live && !semver.satisfies(version, '>=9.7.0')) {
|
||||
exitWithExpectedError(
|
||||
new Error('Using livepush requires a supervisor >= v1.0.0'),
|
||||
new Error('Using livepush requires a supervisor >= v9.7.0'),
|
||||
);
|
||||
}
|
||||
} catch {
|
||||
|
@ -245,7 +245,6 @@ export class LivepushManager {
|
||||
}
|
||||
|
||||
private async handleFSEvent(fsEvent: ContextEvent): Promise<void> {
|
||||
// TODO: If there's a dockerfile event, we must perform a rebuild
|
||||
this.logger.logDebug(
|
||||
`Got a filesystem event for service: ${
|
||||
fsEvent.serviceName
|
||||
|
Loading…
x
Reference in New Issue
Block a user