Commit Graph

1312 Commits

Author SHA1 Message Date
Paulo Castro
1e37c97ffb Fix proxy support and add proxy exclusion feature (Node.js >= 10.16.0 only)
See README for more details on proxy configuration and Node.js compatibility.

Resolves: #1579
Resolves: #1335
Connects-to: #1580
Change-type: minor
Signed-off-by: Paulo Castro <paulo@balena.io>
2020-01-27 12:11:11 +00:00
Pagan Gazzard
77931b314a Update dependencies
Change-type: minor
2020-01-24 23:28:15 +00:00
Rich Bayliss
8f6902f4cb
configure: Allow passing system-connection files to 'os configure' command
Allow passing files to `os configure` via `--system-connection` to allow
pre-configuration of network connections, such as cellular/GSM.

Change-type: minor
Connects-to: #957
Connects-to: #1162
Connects-to: #1498
Signed-off-by: Rich Bayliss <rich@balena.io>
2020-01-21 21:05:23 +00:00
Paulo Castro
b978230f9e Update resin-lint and prettier, and re-prettify
Change-type: patch
Signed-off-by: Paulo Castro <paulo@balena.io>
2020-01-20 22:46:32 +00:00
Scott Lowe
95b5ac1c7f Prevent file ignorer from ignoring Dockerfile (and variants), docker-compose.yml
Change-type: patch
Resolves: #1445
Signed-off-by: Scott Lowe <scott@balena.io>
2020-01-20 11:59:04 +01:00
Graham McCulloch
aca794b267 Add Windows-specific hint to 'balena scan' output
An extra Windows-specific message is now appended to the 'Could not find any balenaOS devices' message - if the OS is Windows.

Also updated the INSTALL instructions with details of the dependency on Bonjour.

Change-type: patch
Signed-off-by: Graham McCulloch <graham@balena.io>
2020-01-20 07:21:04 +07:00
Thodoris Greasidis
ef4ee54a00 Change the balena app action to present the slug instead of the git_repository
The `git_repository` field was replaced in the v5
endpoint with the `slug` field. As a result the CLI atm
never shows the `git_repository` in the printed
visual.


Change-type: patch
2020-01-15 01:53:48 +02:00
Paulo Castro
95561864a6 Fix 'balena join' when the user is not logged in
Change-type: patch
Signed-off-by: Paulo Castro <paulo@balena.io>
2020-01-14 19:34:53 +00:00
Paulo Castro
51adfeaa3b Fix join and leave commands on Windows (hanging on stdin and argument escaping)
Change-type: patch
Signed-off-by: Paulo Castro <paulo@balena.io>
2020-01-14 19:34:53 +00:00
Paulo Castro
95843dd816 Fix 'balena push' hanging on Windows (CTRL-C was required after the unicorn)
Resolves: #1182
Resolves: #1554
Change-type: patch
Signed-off-by: Paulo Castro <paulo@balena.io>
2020-01-14 16:19:09 +00:00
Paulo Castro
edd755d41c Add hint about the 'jq' utility in the documentation of the --json option
Change-type: patch
Signed-off-by: Paulo Castro <paulo@balena.io>
2020-01-14 16:19:09 +00:00
Matthew McGinn
046743071d meta: Americanize all spellings
Connects-to: https://github.com/balena-io/docs/issues/1300
Change-type: patch
Signed-off-by: Matthew McGinn <matthew@balena.io>
2020-01-03 13:42:34 -05:00
Paulo Castro
323c9191b6 Add --verbose and --json options to the 'devices supported' command
The command was also converted to oclif.

Resolves: #467
Change-type: minor
Signed-off-by: Paulo Castro <paulo@balena.io>
2019-12-27 11:54:27 +00:00
Scott Lowe
33552724a1 Fix issues with devices associated with inaccessible applications.
Change-type: patch
Resolves: #1530
Signed-off-by: Scott Lowe <scott@balena.io>
2019-12-13 09:33:59 +01:00
Paulo Castro
7fd436cd91 Add multicontainer (microservices) support for 'balena env rename'
Change-type: minor
Signed-off-by: Paulo Castro <paulo@balena.io>
2019-12-12 13:39:26 +00:00
Paulo Castro
7c1faa6de0 Add multicontainer (microservices) support for 'balena env rm'
Change-type: minor
Signed-off-by: Paulo Castro <paulo@balena.io>
2019-12-12 13:39:26 +00:00
Paulo Castro
90e184ea1f Add multicontainer (microservices) support for 'balena env add'
Change-type: minor
Signed-off-by: Paulo Castro <paulo@balena.io>
2019-12-11 17:50:08 +00:00
Paulo Castro
38920a1c59 Add multicontainer (microservices) support for 'balena envs'
Connects-to: #1153
Change-type: minor
Signed-off-by: Paulo Castro <paulo@balena.io>
2019-12-11 17:50:08 +00:00
Paulo Castro
df58ac7673 Add balena envs '-j' option to produce JSON output
Change-type: minor
Signed-off-by: Paulo Castro <paulo@balena.io>
2019-12-06 15:51:09 +00:00
Paulo Castro
630d53311a Add logged-in check for balena 'env' commands
Change-type: patch
Signed-off-by: Paulo Castro <paulo@balena.io>
2019-12-06 15:51:09 +00:00
Scott Lowe
53325b7c05 Introduce workaround that fixes windows dns issue on balena push using .local device names.
Improve error handling in deployToDevice so that versionErrors don't mask other errors.

Resolves:#1518
Change-type:patch
Signed-off-by:Scott Lowe <scott@balena.io>
2019-12-06 15:32:08 +01:00
Paulo Castro
02dcff5b67 Fix 'balena help join' docs re moving devices between apps on the same server
Resolves: #1429
Change-type: patch
Signed-off-by: Paulo Castro <paulo@balena.io>
2019-11-21 15:31:45 +00:00
Scott Lowe
cf42dca777 Hide discontinued device types in balena app create.
Add basic tests for `balena app create`

Connects-to: #1485
Change-type: patch
Signed-off-by: Scott Lowe <scott@balena.io>
2019-11-15 12:01:56 +01:00
Scott Lowe
afd97bd304 Hide discontinued device types in balena devices supported.
Add tests for action.
Convert action to TypeScript.

Connects-to: #1485
Change-type: patch
Signed-off-by: Scott Lowe <scott@balena.io>
2019-11-15 12:01:55 +01:00
Paulo Castro
d94a74dfee Fix 'os configure --config', and migrate it to oclif + TypeScript
Also add more non-interactive configuration options:
--config-network, --config-wifi-*, --config-app-update-poll-interval

Change-type: minor
Signed-off-by: Paulo Castro <paulo@balena.io>
2019-11-12 21:09:18 +00:00
Paulo Castro
a25a52c21b Error handling: add ExpectedError type as alternative to exitWithExpectedError()
Change-type: patch
Signed-off-by: Paulo Castro <paulo@balena.io>
2019-11-12 19:36:43 +00:00
Paulo Castro
b69ba0b617 Improve command usage format consistency in 'balena help' output
Change-type: patch
Signed-off-by: Paulo Castro <paulo@balena.io>
2019-11-10 00:54:22 +00:00
Paulo Castro
74a521a271 Set the process exit code to 1 (instead of 0) for unknown commands
Change-type: patch
Signed-off-by: Paulo Castro <paulo@balena.io>
2019-11-10 00:54:22 +00:00
Paulo Castro
6376ac28d5 Fix logged-in check in "logs" and "ssh" commands (async/await usage)
Change-type: patch
Signed-off-by: Paulo Castro <paulo@balena.io>
2019-11-10 00:54:22 +00:00
Paulo Castro
2222a90884 Enable debug-mode "long stack traces" for Bluebird promises (async code)
Change-type: patch
Signed-off-by: Paulo Castro <paulo@balena.io>
2019-11-10 00:54:22 +00:00
Paulo Castro
636ecaf4e0 Improve help and docs (CLI install dependencies) for the preload command
Change-type: patch
Signed-off-by: Paulo Castro <paulo@balena.io>
2019-11-09 14:04:50 +00:00
Cameron Diver
b31e253fa4
Support optional containers when pushing to local target
Change-type: patch
Signed-off-by: Cameron Diver <cameron@balena.io>
2019-11-06 10:30:28 +00:00
Cameron Diver
62b7d2fd1a
Use all available on-device images during local push
Change-type: patch
Signed-off-by: Cameron Diver <cameron@balena.io>
2019-11-04 10:27:35 +00:00
Scott Lowe
4a967b126b Fix warnings when executing CLI without arguments.
Change-type: patch
Signed-off-by: Scott Lowe <scott@balena.io>
2019-11-01 16:21:36 +01:00
Cameron Diver
55b2b5a467
Fix potentialy undefined build task when livepushing
Change-type: patch
Signed-off-by: Cameron Diver <cameron@balena.io>
2019-10-28 17:50:02 +00:00
Cameron Diver
8ed4f547e0
Update livepush to support build arguments
Change-type: minor
Signed-off-by: Cameron Diver <cameron@balena.io>
2019-10-22 13:24:00 +01:00
Thodoris Greasidis
96bc8a829e Fix missing code formatting
Signed-off-by: Thodoris Greasidis <thodoris@balena.io>
2019-10-16 15:47:05 +03:00
Thodoris Greasidis
1b943bdf7d Support managing tags using release commit hashes
The sdk version in the shrinkwrap already
supports setting tags by commit hashes and as a
result this already works in the cli as of v11.9.6.
This PR just adds some docs and some extra
handling when the commit param prefix is all
numeric.

Resolves: #1064
Change-type: minor
Signed-off-by: Thodoris Greasidis <thodoris@balena.io>
2019-10-16 09:12:17 +03:00
Paulo Castro
02b888f7c1 Fix privilege elevation for standalone zip package on Windows (windosu)
* Add pkgExec internal command
* Patch windosu to be aware of process.pkg and use pkgExec

Change-type: patch
Signed-off-by: Paulo Castro <paulo@balena.io>
2019-10-15 21:47:26 +01:00
Paulo Castro
69c97fed09 Remove 'internal sudo' command
Change-type: patch
Signed-off-by: Paulo Castro <paulo@balena.io>
2019-10-15 21:47:26 +01:00
Paulo Castro
05cb89725e Fix privilege elevation (sudo) for 'os initialize', 'join', 'leave'
* sudo shell arguments required escaping for 'os initialize'
* sudo was not working for standalone zip packages (incorrect
  Node.js path in argv[0])
* Interactive 'join' and 'leave' not working on Windows because
  'windosu' does not capture stderr.

Change-type: patch
Signed-off-by: Paulo Castro <paulo@balena.io>
2019-10-15 21:47:26 +01:00
Cameron Diver
0c5ed7adfb
Support container contracts when pushing to local devices
Change-type: patch
Signed-off-by: Cameron Diver <cameron@balena.io>
2019-10-14 17:18:56 +01:00
Paulo Castro
e0e76a1aa8 Avoid stack trace and Sentry report if user answers No to confirmation prompts
Change-type: patch
Signed-off-by: Paulo Castro <paulo@balena.io>
2019-10-10 16:02:41 +01:00
Paulo Castro
d9b417e9e5 Sort the output of balena devices supported alphabetically by slug
Change-type: patch
Signed-off-by: Paulo Castro <paulo@balena.io>
2019-10-10 16:02:41 +01:00
Paulo Castro
7dd33adfd1 Fix 'balena build --emulated' on Windows (including default docker socket)
Change-type: patch
Signed-off-by: Paulo Castro <paulo@balena.io>
2019-10-09 13:10:49 +01:00
Thodoris Greasidis
d463a2f0e5 Allow deleting config vars with 'env rm'
Resolves: #1459
Change-type: minor
Signed-off-by: Thodoris Greasidis <thodoris@balena.io>
2019-10-03 13:51:33 +03:00
Cameron Diver
7a865b2e15 Send all debug output to stderr
Change-type: patch
Signed-off-by: Cameron Diver <cameron@balena.io>
2019-09-19 13:25:40 +01:00
Roman Mazur
c1ba73a2da
Use balena analytics project name
It's needed to properly integrate CLI with balena
analytics proxy service.

Change-type: patch
Signed-off-by: Roman Mazur <roman@balena.io>
2019-09-18 18:00:35 +03:00
Paulo Castro
c07b28e694 Migrate 'envs' and 'env rename' commands to oclif
Change-type: patch
Signed-off-by: Paulo Castro <paulo@balena.io>
2019-09-18 12:54:31 +01:00
Paulo Castro
b3bef9e556 Simplify/refactor 'env add' and 'env rm' implementation
Change-type: patch
Signed-off-by: Paulo Castro <paulo@balena.io>
2019-09-17 17:20:16 +01:00
Paulo Castro
2ff427fb90 Refactor oclif integration and preparser
Change-type: patch
Signed-off-by: Paulo Castro <paulo@balena.io>
2019-09-17 17:20:16 +01:00
Thodoris Greasidis
87004621ce Support balena join to applications of compatible architectures
Resolves: #1431
Change-type: minor
Signed-off-by: Thodoris Greasidis <thodoris@balena.io>
2019-09-16 21:31:07 +03:00
Thodoris Greasidis
a64b36fdb9 Support moving devices to applications of a compatible architecture
Connects-to: #1433
Change-type: minor
Signed-off-by: Thodoris Greasidis <thodoris@balena.io>
2019-09-16 19:16:51 +03:00
Paulo Castro
6631fb5a69 Mitigate "MaxListenersExceededWarning" by reusing Logger instance
The full warning output was:
(node:43572) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 drain listeners added. Use emitter.setMaxListeners() to increase limit
(node:43572) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 error listeners added. Use emitter.setMaxListeners() to increase limit
(node:43572) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 close listeners added. Use emitter.setMaxListeners() to increase limit

Change-type: patch
Signed-off-by: Paulo Castro <paulo@balena.io>
2019-09-12 01:49:40 +01:00
Paulo Castro
f76ca1804a Update balena-sdk from 11.18.0 to 12.10.0 (pre-req for #1153 and #1304)
Change-type: patch
Signed-off-by: Paulo Castro <paulo@balena.io>
2019-09-11 16:08:30 +01:00
Paulo Castro
d484c957bb Detect Docker Desktop (Docker for Mac) and warn about architecture emulation
Change-type: patch
Signed-off-by: Paulo Castro <paulo@balena.io>
2019-09-11 12:05:07 +01:00
Paulo Castro
d54a709e7c Fix mismatched Node.js version errors in standalone package on Windows
Resolves: #1419
Change-type: patch
Signed-off-by: Paulo Castro <paulo@balena.io>
2019-09-11 01:17:26 +01:00
Paulo Castro
fb1dce9dbb Add missing oclif-based commands to mixpanel tracking
Change-type: patch
Signed-off-by: Paulo Castro <paulo@balena.io>
2019-09-01 23:42:21 +01:00
Matthew McGinn
e3435c66df logging: note that tarring is occurring
As noted in #1411, this tarring can be particularly expensive so cluing
in the user may help alleviate pain

Connects-to: #1411
Change-type: patch
Signed-off-by: Matthew McGinn <matthew@balena.io>
2019-08-28 20:37:50 +02:00
Paulo Castro
19c3178062 Enable emulated builds on remote devices running a different OS as the CLI
E.g. "balena build -e -h <IP> -p 2375" with the CLI running on a Mac laptop,
using balenaEngine on an Intel NUC device, building an image for the RPi (ARM
image arch). Previously, QEMU setup by the CLI assumed that docker ran on the
same OS as the CLI (Docker for Mac has built-in binfmt_misc support and does
not require additional setup, but balenaEngine on Linux requires explicit QEMU
setup.)

Change-type: minor
Signed-off-by: Paulo Castro <paulo@balena.io>
2019-08-22 13:37:07 +01:00
Paulo Castro
516fa90a20 Fix SecretRemovalError (balena build) when docker daemon arch != target arch
Change-type: patch
Signed-off-by: Paulo Castro <paulo@balena.io>
2019-08-21 22:25:18 +01:00
Paulo Castro
cdedc58ec1 Fix failing registry secrets authentication under certain conditions
('balena build' and 'balena deploy')

Change-type: patch
Signed-off-by: Paulo Castro <paulo@balena.io>
2019-08-19 16:41:59 +01:00
Matthew McGinn
731db63e78 balena-ssh: add info about remote vs local connections
small formatting fixups

Closes: https://github.com/balena-io/docs/issues/974
Change-type: patch
Signed-off-by: Matthew McGinn <matthew@balena.io>
2019-08-19 16:14:26 +02:00
Lucian
730c09989d Fix incorrect arguments passed to oclif bootstrap function
Adds tests for existing oclif commands to avoid regressions

Change-type: patch
Signed-off-by: Lucian <lucian.buzzo@gmail.com>
2019-08-15 18:26:42 +01:00
Lucian
4d389bb6cc Implement full command testing, beginning with "balena version"
This also modifies the core CLI to be fed command programatically, which
is useful for being able to do thing like mock endpoints with tools like
"nock", and provide an easier debugging experience.
The tests utilise a "runCommand" helper that intercepts and captures
stdout/stderr writes and returns them once the command has finished
running. At this point the test implementation can parse the
stdout/stderr logs and assess nock interceptions to determine if the
command ran correctly.
This change also homogenises debug messages to start with `[debug]`,
however this is not strictly enforced by linting rules.

Change-type: minor
Signed-off-by: Lucian <lucian.buzzo@gmail.com>
2019-08-12 14:50:41 +01:00
Lucian
f1d9c29786 Fix bug where "env rm" fails silently if an additional arg is present
Fixes #1380

Argument parsing of "env rm" command was improved by migrating it to oclif

Change-type: patch
Signed-off-by: Lucian <lucian.buzzo@gmail.com>
2019-08-12 13:47:31 +01:00
Lucian
34f4c1f6cc Exit with a warning if "env rm" id value is not an integer
Change-type: patch
Signed-off-by: Lucian <lucian.buzzo@gmail.com>
2019-08-09 15:12:30 +01:00
Lucian
05d58d8248 Fix CI instability when building Typescript
The error appears to happen when symlinking typing files and manifests
on case sensitive file systems (like windows) with the error:
```
lib/actions-oclif/env/add.ts(73,16): error TS2742: The inferred type of 'flags' cannot be named without a reference to '../../../../../../../../../volumes/live/c64feead-f78e-4bd4-742d-ccd29aef53c4/volume/node_modules/@oclif/parser/lib/flags'. This is likely not portable. A type annotation is necessary.
lib/actions-oclif/version.ts(42,16): error TS2742: The inferred type of 'flags' cannot be named without a reference to '../../../../../../../../volumes/live/c64feead-f78e-4bd4-742d-ccd29aef53c4/volume/node_modules/@oclif/parser/lib/flags.js'. This is likely not portable. A type annotation is necessary.
```

This appears to be reported on the Typescript repo here https://github.com/microsoft/TypeScript/issues/29221
The suggested workaround is to explicitly set the type of the `flags` static
property.

Change-type: patch
Signed-off-by: Lucian <lucian.buzzo@gmail.com>
2019-08-09 12:01:46 +01:00
Cameron Diver
67a4e88e44 Support headless remote builds
Change-type: patch
Signed-off-by: Cameron Diver <cameron@balena.io>
2019-08-06 08:45:05 +01:00
Paulo Castro
3ea905dc68 Update mixpanel tracking
Change-type: patch
2019-07-22 13:42:44 +01:00
Matthew McGinn
d92e076829
chore: fix up small typos, remove gitter link
Change-type: patch
Signed-off-by: Matthew McGinn <matthew@balena.io>
2019-07-17 20:12:52 +01:00
Paulo Castro
225408c57d Add "build secrets" and "build variables" support for push/build/deploy
to/on/via balena devices

Change-type: minor
Signed-off-by: Paulo Castro <paulo@balena.io>
2019-07-15 16:23:35 +01:00
Paulo Castro
8cfacc9cbc Fix truncated logs in local multicontainer image builds (balena build/deploy)
Resolves: #1346
Change-type: patch
Signed-off-by: Paulo Castro <paulo@balena.io>
2019-07-15 16:19:41 +01:00
Paulo Castro
49a7eb30c0 Remove BETA suffix from Windows and macOS installers, and update INSTALL.md
Change-type: patch
Signed-off-by: Paulo Castro <paulo@balena.io>
2019-07-15 14:08:27 +01:00
Michel Wohlert
9eae9dcee3 Add os.sshKeys to generateBaseConfig
Change-type: minor
2019-07-09 14:01:58 +02:00
Paulo Castro
9d5ecb5f9c Add options to 'balena version' to show Node.js version
Change-type: minor
Signed-off-by: Paulo Castro <paulo@balena.io>
2019-06-27 16:22:26 +01:00
Thodoris Greasidis
f095ac169a patterns: Add debug logs in the getOnlineTargetUuid resolution
Change-type: patch
Signed-off-by: Thodoris Greasidis <thodoris@balena.io>
2019-06-26 13:44:56 +03:00
Thodoris Greasidis
f0030a1891 tunnel: Fix incorrect parsing of numeric short UUIDs
Change-type: patch
Signed-off-by: Thodoris Greasidis <thodoris@balena.io>
2019-06-26 13:44:56 +03:00
Thodoris Greasidis
1d3af3245a ssh: Fix incorrect parsing of numeric short UUIDs
Resolves: #1302
Change-type: patch
Signed-off-by: Thodoris Greasidis <thodoris@balena.io>
2019-06-26 13:44:56 +03:00
Cameron Diver
36026d8556 Fix using an image more than once in a balena push
Change-type: patch
Signed-off-by: Cameron Diver <cameron@balena.io>
2019-06-20 16:46:29 +01:00
Cameron Diver
3b09c5ac91 Remove the livepush initialisation double printed log
Change-type: patch
Signed-off-by: Cameron Diver <cameron@balena.io>
2019-06-20 15:20:19 +01:00
Cameron Diver
c3e5147a19 Fix output of seperation newline during livepush
Change-type: patch
Signed-off-by: Cameron Diver <cameron@balena.io>
2019-06-18 11:45:12 +01:00
Cameron Diver
cf9fdbe6e4 If a secrets file is not specified, read it from the data directory
Change-type: minor
Closes: #1164
Signed-off-by: Cameron Diver <cameron@balena.io>
2019-06-18 11:13:09 +01:00
Cameron Diver
ea43130135 livepush: Ignore the .git directory when performing a livepush
Change-type: patch
Signed-off-by: Cameron Diver <cameron@balena.io>
2019-06-12 12:41:46 +01:00
Thodoris Greasidis
825213c02a Add device OS update action
Resolves: #788
Depends-on: https://github.com/balena-io/balena-sdk/pull/638
Change-type: minor
Signed-off-by: Thodoris Greasidis <thodoris@balena.io>
2019-06-11 15:27:23 +03:00
Cameron Diver
8b5ebe0645 Pin prettier and add formatting changes
Signed-off-by: Cameron Diver <cameron@balena.io>
2019-06-10 11:07:51 +01:00
Cameron Diver
24e49bf131 Cancel ongoing livepushes when a new change occurs
Also fix livepush logging when a new container is created (previously
the logs of the commands would stop working after this has happened)

Change-type: minor
Signed-off-by: Cameron Diver <cameron@balena.io>
2019-06-07 15:59:27 +01:00
Paulo Castro
d8c942c77e Fix "catch-uncommitted" build failure (npm run prettify)
Change-type: patch
Signed-off-by: Paulo Castro <paulo@balena.io>
2019-06-07 01:30:32 +01:00
Rich Bayliss
5d137f3c20
fix: Add single code path to get full, online-only device UUIDs
Both the tunnel and SSH commands require a full UUID for an online
device. A single code path was added to provide this, taking either
an application name or a partial UUID as a search parameter.

In the event of an application name being provided, a device select
form is presented to the user to pick from the online devices at that
time.

Change-type: patch
Signed-off-by: Rich Bayliss <rich@balena.io>
2019-06-06 17:05:08 +01:00
Thodoris Greasidis
051268168a Add initial typings for resin-cli-form
Change-type: patch
Signed-off-by: Thodoris Greasidis <thodoris@balena.io>
2019-06-06 16:21:35 +03:00
Paulo Castro
3387f8f656 Fix 'npm help' SyntaxError on Node 8 (invalid 's' regex flag)
Change-type: patch
Signed-off-by: Paulo Castro <paulo@balena.io>
2019-06-05 16:12:16 +01:00
Paulo Castro
0bbe376e41 Remove 'signup' command
Change-type: major
Signed-off-by: Paulo Castro <paulo@balena.io>
2019-06-04 17:06:46 +01:00
Paulo Castro
751749325f Add warning notices for replaced 'local' commands in v11
Change-type: patch
Signed-off-by: Paulo Castro <paulo@balena.io>
2019-06-04 13:52:37 +01:00
Paulo Castro
1e2e48b149 Revert 'balena flash' to 'balena local flash'
Change-type: major
Signed-off-by: Paulo Castro <paulo@balena.io>
2019-06-04 13:52:37 +01:00
Cameron Diver
01b454351b Fix SSH'ing into a device from application
Change-type: patch
Signed-off-by: Cameron Diver <cameron@balena.io>
2019-06-04 13:52:36 +01:00
Cameron Diver
6696b1b5f7 Make livepush the default when pushing to a local device
Change-type: major
Signed-off-by: Cameron Diver <cameron@balena.io>
2019-06-04 13:52:36 +01:00
Cameron Diver
5da307f02e Make the CommandDefinition option parameter a Partial
This ensures that no code accidentally relies on them being present, and
the types are then correct.

Change-type: patch
Signed-off-by: Cameron Diver <cameron@balena.io>
2019-06-04 13:52:35 +01:00
Cameron Diver
b391c96e64 Allow multiple services to be tailed with balena logs and push
Also correctly type the input.

Change-type: patch
Signed-off-by: Cameron Diver <cameron@balena.io>
2019-06-04 13:52:35 +01:00
Cameron Diver
0ee73f5164 Don't require a login for commands operating on local devices
Change-type: patch
Closes: #1195
Signed-off-by: Cameron Diver <cameron@balena.io>
2019-06-04 13:52:35 +01:00
Cameron Diver
1a1861bfcb Remove or move most local namespaced commands
Change-type: major
Signed-off-by: Cameron Diver <cameron@balena.io>
2019-06-04 13:52:34 +01:00
Paulo Castro
c204dbd6cd Bump denymount version and delete redundant patch (chore task)
Change-type: patch
Signed-off-by: Paulo Castro <paulo@balena.io>
2019-06-04 13:51:59 +01:00
Paulo Castro
6e7f51758e Add CONTRIBUTING.md and some guidance on commit messages and doc files.
Change-type: patch
Signed-off-by: Paulo Castro <paulo@balena.io>
2019-06-04 13:51:59 +01:00
Cameron Diver
94c9e13106 Fix windows straight-to-container SSH
Closes: #1211
Change-type: patch
Signed-off-by: Cameron Diver <cameron@balena.io>
2019-06-04 13:51:58 +01:00
Cameron Diver
64c2f00d2a Update balena ssh command to support local devices and multicontainer
Change-type: major
Signed-off-by: Cameron Diver <cameron@balena.io>
2019-06-04 13:51:57 +01:00
Paulo Castro
8f8d6b5f08 Sort 'balena help' primary commands in manually specified order
Connects-to: #1140
Change-type: patch
Signed-off-by: Paulo Castro <paulo@balena.io>
2019-06-04 13:51:57 +01:00
Alexis Svinartchouk
c49a1d3fbf Remove --dockerPort's -p alias for balena preload
It was conflicting with --pin-device-to-release -p alias

Changelog-entry: Remove --dockerPort's -p alias for `balena preload`
Change-type: major
2019-06-04 13:51:56 +01:00
Paulo Castro
abf573fa47 Begin the transition to oclif with 'balena env add' (fix dropped leading
zero in device UUID).

This commit is fairly chunky because it adds the oclif dependency for
the first time, and refactors the CLI help and docs generation code to
accommodate both Capitano and oclif.

Change-type: patch
Signed-off-by: Paulo Castro <paulo@balena.io>
2019-06-04 13:51:56 +01:00
Paulo Castro
13e3e5e8ea Bump min Node.js version to 8.0, ts-node to 8.1 and typescript to 3.4.
Refactor typings folder for use with the tsconfig typeRoots option.

Change-type: major
Signed-off-by: Paulo Castro <paulo@balena.io>
2019-06-04 13:51:55 +01:00
Paulo Castro
e145540132 Allow newline characters in build/deploy --buildArg values
Change-type: patch
Signed-off-by: Paulo Castro <paulo@balena.io>
2019-05-30 15:03:56 +01:00
Alexis Svinartchouk
f3ef7f6e18 Add preload --add-certificate option
Change-type: minor
2019-05-28 16:35:29 +02:00
Matthew McGinn
5202e137d5 compose: remove artificial 20 repo limit
This issue has now been fixed server-side

Connects-to: #1070
Change-type: minor
Signed-off-by: Matthew McGinn <matthew@balena.io>
2019-05-27 22:12:58 +08:00
Cameron Diver
106b971410 Add a much faster container replacement for livepush
Change-type: patch
Signed-off-by: Cameron Diver <cameron@balena.io>
2019-05-27 13:48:53 +01:00
Cameron Diver
39cf86ed85 Add a containerId request function to the device api module
Change-type: minor
Signed-off-by: Cameron Diver <cameron@balena.io>
2019-05-27 13:48:53 +01:00
Cameron Diver
f77156772a Add the ability to specify an environment variable when pushing to local
mode device

Closes: #1255
Change-type: minor
Signed-off-by: Cameron Diver <cameron@balena.io>
2019-05-27 13:23:55 +01:00
Alexis Svinartchouk
9434570c2d Improve preload's --commit parameter description
Change-type: patch
2019-05-22 17:29:08 +02:00
Alexis Svinartchouk
674c0ca7b8 Fix balena preload --commit current alias
Change-type: patch
2019-05-22 17:13:55 +02:00
Alexis Svinartchouk
2091768c84 Rename preload --commit latest to preload --commit current
`latest` is still supported

Change-type: patch
2019-05-21 18:00:01 +02:00
Paulo Castro
d47fe0609f Fix TypeError when running 'balena apps'
Change-type: patch
Signed-off-by: Paulo Castro <paulo@balena.io>
2019-05-20 17:21:01 +01:00
Thodoris Greasidis
cb14928866 apps: Fix the device count columns being empty
Connects-to: #1238
Change-type: patch
Signed-off-by: Thodoris Greasidis <thodoris@balena.io>
2019-05-17 20:48:55 +03:00
Cameron Diver
05c3d2a5db Remove intermediate containers when doing a local push
Change-type: patch
Closes: #1236
Signed-off-by: Cameron Diver <cameron@balena.io>
2019-05-17 17:43:41 +01:00
Thodoris Greasidis
9f15ee58df docs: Fix os configure example in os build-config docs
Connects-to: #1231
Change-type: patch
Signed-off-by: Thodoris Greasidis <thodoris@balena.io>
2019-05-16 12:38:44 +03:00
Cameron Diver
7529a9a2a2 Debounce livepush invocations to collect changes together
Change-type: patch
Signed-off-by: Cameron Diver <cameron@balena.io>
2019-05-15 14:01:30 +01:00
Cameron Diver
96c975d17e
Use TCP keepalive probes to detect local log stream closing
Change-type: patch
Closes: #1219
Signed-off-by: Cameron Diver <cameron@balena.io>
2019-05-14 11:39:57 +01:00
Paulo Castro
87401ad569 Replace 'npm' upgrade notifier message with INSTALL.md URL
Change-type: patch
Signed-off-by: Paulo Castro <paulo@balena.io>
2019-05-04 18:34:08 +01:00
Gergely Imreh
21840d9245
qemu: use v4.0.0-balena
Also append the QEMU version to the locally cached copy, so the
CLI can correctly bump version whenever QEMU_VERSION is bumped
in the future.

Change-type: minor
Signed-off-by: Gergely Imreh <gergely@balena.io>
2019-05-03 12:37:36 +01:00
Cameron Diver
a832f47508
Improve livepush UX
Change-type: patch
Signed-off-by: Cameron Diver <cameron@balena.io>
2019-05-02 14:06:34 +01:00
Cameron Diver
4557cf626f
Improve logging for detached mode + livepush
Change-type: patch
Closes: #1196
Signed-off-by: Cameron Diver <cameron@balena.io>
2019-05-02 14:06:26 +01:00
Gergely Imreh
d40f2eb500
actions/auth: fix mixed indentation error
Change-type: patch
Signed-off-by: Gergely Imreh <gergely@balena.io>
2019-05-02 13:22:22 +01:00
Gergely Imreh
f2bd3c0ffb
dependencies: bump etcher-sdk to pull in fixes
Change-type: patch
Signed-off-by: Gergely Imreh <gergely@balena.io>
2019-05-02 11:53:50 +01:00
Cameron Diver
9bbfb31bf7 Allow any amount of subdomains when parsing .local addresses
Change-type: patch
Signed-off-by: Cameron Diver <cameron@balena.io>
2019-05-01 08:50:27 +01:00
Paulo Castro
2ad0b60aeb Unify the CLI instructions between capitanodoc.ts and README.md, move
the installation instructions to INSTALL.md, and update the markdown
generation scripts.

Change-type: minor
Signed-off-by: Paulo Castro <paulo@balena.io>
2019-04-29 14:27:32 +01:00
Paulo Castro
30c36a26e2 Handle app names that look like a number (eg 1234)
Change-type: patch
Signed-off-by: Paulo Castro <paulo@balena.io>
2019-04-27 00:54:15 +01:00
Cameron Diver
57fba32fa2
Add better semantics for detached mode + live for push
Now if you pass both --live and --detached, the logs won't be displayed
but livepush will continue to run.

Change-type: patch
Signed-off-by: Cameron Diver <cameron@balena.io>
2019-04-26 16:50:27 +01:00
Cameron Diver
1b13d1b969
Allow specifying a .local address for logs and push
Change-type: minor
Signed-off-by: Cameron Diver <cameron@balena.io>
2019-04-25 11:00:45 +01:00
Cameron Diver
a6d2950260 Allow filtering of system logs with push and logs commands
Change-type: minor
Signed-off-by: Cameron Diver <cameron@balena.io>
2019-04-24 17:30:18 +01:00
Cameron Diver
56c74af1ff Add per-service filtering to logs and push
Change-type: minor
Signed-off-by: Cameron Diver <cameron@balena.io>
2019-04-24 15:05:05 +01:00
Cameron Diver
97c15208b5 push: Add detached flag to avoid streaming logs after local push
Change-type: minor
Signed-off-by: Cameron Diver <cameron@balena.io>
2019-04-24 14:31:30 +01:00
Cameron Diver
f816cb4ce8 Fix and update log documentation
Signed-off-by: Cameron Diver <cameron@balena.io>
2019-04-24 13:04:49 +01:00
Cameron Diver
d412d39164 Add ability to use balena logs with a local mode device
Change-type: patch
Signed-off-by: Cameron Diver <cameron@balena.io>
2019-04-24 12:48:52 +01:00
Cameron Diver
d41fb72ded refactor: Convert logs action to typescript
Change-type: patch
Signed-off-by: Cameron Diver <cameron@balena.io>
2019-04-24 12:48:51 +01:00
Cameron Diver
4676396b5f logs: Make device logs consistent across the CLI
Change-type: patch
Signed-off-by: Cameron Diver <cameron@balena.io>
2019-04-24 12:25:09 +01:00
Cameron Diver
b97565d2e7 refactor: Create and use validation functions for input
This includes IP address, application name and dotlocal url parsing.

Change-type: patch
Signed-off-by: Cameron Diver <cameron@balena.io>
2019-04-24 12:11:46 +01:00
Will Boyce
cba73eec44
tunnel: allow using partial device uuids
Connects-to: #1173
Change-type: minor
Signed-off-by: Will Boyce <will@balena.io>
2019-04-24 10:51:42 +01:00
Paulo Castro
db25a65753 Add --dockerfile option to the build, deploy and push commands
It allows the selection of an alternative Dockerfile in single-
container projects that do not include a docker-compose file.

Change-type: minor
Signed-off-by: Paulo Castro <paulo@balena.io>
2019-04-23 15:34:19 +01:00
Cameron Diver
7c71098d86
Update livepush documentation and required versions
Change-type: patch
Signed-off-by: Cameron Diver <cameron@balena.io>
2019-04-23 14:00:05 +01:00
Cameron Diver
490f833a33
Cleanup intermediate containers on exit of livepush
Change-type: patch
Signed-off-by: Cameron Diver <cameron@balena.io>
2019-04-23 14:00:05 +01:00
Cameron Diver
a81c1971f1
livepush: Perform full rebuild on Dockerfile-like file change
Change-type: minor
Signed-off-by: Cameron Diver <cameron@balena.io>
2019-04-23 14:00:05 +01:00
Cameron Diver
76034696e9
Fix lint warnings
Signed-off-by: Cameron Diver <cameron@balena.io>
2019-04-23 14:00:04 +01:00
Cameron Diver
454f82883e
Add supervisor version information to push documentation
Signed-off-by: Cameron Diver <cameron@balena.io>
2019-04-23 14:00:04 +01:00
Cameron Diver
6a9a9e1fdb
Add livepush ability to balena push
Change-type: minor
Signed-off-by: Cameron Diver <cameron@balena.io>
2019-04-23 14:00:04 +01:00