Commit Graph

63 Commits

Author SHA1 Message Date
Roland Kajatin
501882fd26 os configure, local configure: Fix "Unsupported filesystem" error
When configuring a BalenaOS image with system connections using the CLI,
the function assumed that the boot partition was always 1. This is not
the case for every supported board. Therefore, a new function is added,
which automatically determines the boot partition number and allows
users to configure the image with system connection settings.

This change affects both the `balena local configure` and `balena os configure` commands.

Change-type: patch
2021-05-16 18:08:26 +02:00
Paulo Castro
0f9d78ab50 config inject/read/write: Fix umount errors with OS image files
Resolves: #1003
Change-type: patch
2021-04-13 23:30:19 +01:00
Paulo Castro
06f7683837 Refactor dependency import in utils/helpers.ts for performance
Change-type: patch
2021-04-13 22:14:13 +01:00
Paulo Castro
07666e953f Livepush: Extend CTRL-C availability (don't ignore CTRL-C during image build)
Change-type: patch
2020-12-09 22:49:47 +00:00
Paulo Castro
54731c2d20 Livepush, logs: Automatically reconnect on 'Connection to device lost'
Change-type: minor
2020-12-09 20:43:14 +00:00
Paulo Castro
478b5dd363 Revert styling of "balena CLI" as "balenaCLI"
Change-type: patch
2020-10-21 00:07:46 +01:00
Paulo Castro
b1897a512d Style "balena CLI" as "balenaCLI" and "balena cloud" as "balenaCloud"
Change-type: patch
2020-09-18 23:27:24 +01:00
Scott Lowe
d56fec6e36 Convert help to oclif, remove capitano
Change-type: patch
Signed-off-by: Scott Lowe <scott@balena.io>
2020-09-07 14:13:32 +02:00
Pagan Gazzard
787966a0b6 Update to typescript 4.0
Change-type: patch
2020-08-27 11:50:57 +01:00
Pagan Gazzard
e021ad9af6 Update balena-sdk to 15.x
Update balena-config-json from 4.0.0 to 4.1.0
Update balena-image-manager from 7.0.1 to 7.0.3
Update balena-preload from 10.2.0 to 10.2.4
Update balena-sdk from 14.8.0 to 15.2.1
Update balena-sync from 11.0.0 to 11.0.2

Change-type: patch
2020-08-11 17:53:33 +01:00
Pagan Gazzard
e1c42405a1 Update balena-sdk to 14.x
Update balena-sdk from 13.6.0 to 14.8.0

Change-type: patch
2020-08-07 21:06:07 +00:00
Scott Lowe
3fc25cd745 Convert os build-config to oclif, typescript
Change-type: patch
Signed-off-by: Scott Lowe <scott@balena.io>
2020-07-28 15:33:28 +00:00
Scott Lowe
e20265518d Modify runCommand to accept args array instead of string
Change-type: patch
Signed-off-by: Scott Lowe <scott@balena.io>
2020-07-06 12:49:37 +02:00
Thodoris Greasidis
497023965f config generate, os configure: Add support for mixed arch fleets
Resolves: #1914
Change-type: minor
Signed-off-by: Thodoris Greasidis <thodoris@balena.io>
2020-07-03 22:03:18 +00:00
Scott Lowe
402e48c8f8 Fix cross-framework nested commands
Change-type: patch
Signed-off-by: Scott Lowe <scott@balena.io>
2020-07-02 20:33:05 +02:00
Pagan Gazzard
178c3f9154 Remove all module level bluebird usage from eagerly loaded modules
Change-type: patch
2020-07-02 14:00:26 +01:00
Pagan Gazzard
303c3af061 Switch from Bluebird.join to native version
Change-type: patch
2020-06-30 23:59:18 +01:00
Pagan Gazzard
5e94f3f9c9 Add typing info to requires wherever possible
Change-type: patch
2020-06-30 23:21:39 +01:00
Pagan Gazzard
6dce5c1212 Use import type where possible to explicitly import only type info
Change-type: patch
2020-06-24 13:46:27 +00:00
Scott Lowe
ab673f884a Convert device commands to oclif
Change-type: patch
Signed-off-by: Scott Lowe <scott@balena.io>
2020-06-18 13:59:41 +02:00
Paulo Castro
c619bd4b99 Update 'balena-lint' and apply new prettier rules
Change-type: patch
2020-06-15 23:53:07 +01:00
Paulo Castro
1d073af31a v12 preparations: Add feature switch for '--nogitignore'
Connects-to: #1770
Change-type: patch
2020-05-29 01:12:15 +01:00
Scott Lowe
889c7b08cf v12 preparations: Add version switch, update login message.
Change-type: patch
Connects-to: #1770
Signed-off-by: Scott Lowe <scott@balena.io>
2020-05-27 18:29:36 +02:00
Scott Lowe
1c354c800b Replace windows dns workaround with single lookup
Change-type: patch
Connects-to: #1518
Resolves: #1727
Signed-off-by: Scott Lowe <scott@balena.io>
2020-05-22 12:14:58 +00:00
Pagan Gazzard
2f24e591ef Avoid unnecessary api calls in balena build and balena deploy
Change-type: patch
2020-05-01 15:58:44 +01:00
Pagan Gazzard
0cfa1a0dfb Convert lib/actions/device.coffee to javascript
Change-type: patch
2020-04-25 14:08:30 +00:00
Paulo Castro
a74f0413df Handle ssh process exit codes
Change-type: patch
2020-03-31 14:27:30 +01:00
Paulo Castro
be76b8adbd Fix 'balena ssh' on MSYS Windows shell ("unexpected end of file")
Resolves: #1681
Change-type: patch
2020-03-30 14:45:16 +01:00
Pagan Gazzard
98152c0b09 Lazy-load chalk
Change-type: patch
2020-02-28 18:34:54 +00:00
Pagan Gazzard
7c62e34455 Simplify lazy-loading of resin-cli-visuals with a shared function
This also avoids current unnecessary requiring of resin-cli-visuals
for every command

Change-type: patch
2020-02-28 15:29:07 +00:00
Pagan Gazzard
eac6bb5e5c Simplify lazy-loading of balena-sdk by utilizing a shared function
This also avoids instantiating multiple balena-sdk

Change-type: patch
2020-02-27 17:17:36 +00:00
Scott Lowe
58e7880f1d Add support for auto-conversion of CRLF line endings.
Applies to commands:
 balena push
 balena build
 balena deploy --build

Change-type: minor
Resolves: #1273
Signed-off-by: Scott Lowe <scott@balena.io>
2020-01-31 16:27:22 +01:00
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
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
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
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
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
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
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
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
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
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
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
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
Akis Kesoglou
9b52dec725 Fix file ignore rules matching metadata folders breaking qemu builds
Change-type: patch
2019-04-12 16:16:56 +03:00
Paulo Castro
a883948d56 Bump resin-multibuild (2.1.4), docker-progress (3.0.5), resin-lint (3.0.1)
The new resin-multibuild and docker-progress versions widen the range
of errors caught by the 'balena push' and 'balena build' commands.

Change-type: patch
Signed-off-by: Paulo Castro <paulo@balena.io>
2019-03-18 14:09:06 +00:00
Paulo Castro
5ec9dce507 Retry image push a few times (balena deploy, 'unknown blob')
Change-type: patch
Signed-off-by: Paulo Castro <paulo@balena.io>
2019-03-05 15:02:52 +00:00
Thodoris Greasidis
952d74207d Check that the provided device type option is of the same arch
Signed-off-by: Thodoris Greasidis <thodoris@balena.io>
2018-12-14 15:46:27 +02:00
Akis Kesoglou
8291c96e69 Make specifying the version during configuration optional
`version` used to be optional but it seems we recently had to make it a required parameter. However it really feels redundant when all it’s used for is to determine whether the command should issue a legacy user API key or a provisioning key.

This makes version optional but tries to figure it out by itself by reading os-release from the image's boot partition. This is not foul-proof however, and while it'll work with most recent images it won't work with all and in that case it'll bail out and only then warn the user to specify it via the --version argument.

Change-type: minor
2018-11-16 19:39:43 +02:00
Tim Perry
4907fccf48 Rename everything from 'resin' to 'balena'
Change-type: major
2018-10-29 22:29:02 +01:00