Commit Graph

120 Commits

Author SHA1 Message Date
myarmolinsky
7d13946c3e Bump balena-lint to 7.2.1
Change-type: patch
2023-10-30 07:45:51 -04:00
Felipe Lalanne
9d0b82122a Bump balena-compose to v2.3.0
This allows the the CLI to use docker registry config when querying the
images manifest.

Relates-to: balena-io-modules/balena-compose#31
Change-type: patch
2023-07-05 15:46:42 -04:00
Thodoris Greasidis
adb460b270 logs: Change the timestamp format to ISO 8601 UTC
Resolves: #2608
Change-type: major
2023-05-12 19:00:10 +03:00
Felipe Lalanne
7dfb7474f5 Update to Node 16
This also drops support for Node 14

Change-type: major
2023-05-11 17:49:37 -04:00
Felipe Lalanne
cd19845b6b Use valid release uuid for local releases
On local push, the CLI uses `localrelease` as the `commit` property for
the development application. This is not a valid uuid and will not be
read properly by the supervisor, as seen in

https://github.com/balena-os/balena-supervisor/blob/master/src/compose/service.ts#L652

While this is not a problem right now, the commit is becoming the main
way to identify a service release (replacing `releaseId` and `imageId`),
and the invalid release uuid could cause update issues when pushing a
local release on when using some API endpoints.

Change-type: patch
Relates-to: balena-os/balena-supervisor#2136
2023-05-03 15:08:19 -04:00
Felipe Lalanne
578de7bcd4 Process livepush build logs inline
When using livepush, the CLI parses the build logs to obtain the stage
image ids, which are necessary for properly running livepush.

This process used to store the full log output in memory before parsing
the logs for obtaining the stage ids. We have seen this cause issues
before because of the excessive memory usage and it is one the suspects
of #2165, which is blocking the update to Node 14

Change-type: patch
2023-01-03 12:29:54 -03:00
Akis Kesoglou
c7f56d92dd Switch to balena-compose
Removes a bunch of individual dependencies by switching to `@balena/compose` which (currently) groups and manages those dependencies together in one package.

Change-type: minor
2022-07-14 13:05:21 +00:00
Paulo Castro
915f7e3763 ssh: Allow ssh to service with IP address and production balenaOS image
Also remove 'balena ssh' dependency on the device supervisor (that may
be down because of device issues or a supervisor bug) when opening a
ssh shell on a container (#1560).

Resolves: #2458
Resolves: #1560
Change-type: minor
2022-02-28 21:39:49 +00:00
Paulo Castro
eeb2be2912 ssh: Attempt cloud username if 'root' authentication fails
Also refactor several files to avoid code duplication.

Change-type: minor
2022-02-12 02:40:35 +00:00
Paulo Castro
73572df7cf build/deploy/push: Remove deprecated '--[no]gitignore' option
Change-type: major
2021-12-23 15:34:08 +00:00
Lucian Buzzo
257dd514ed Improve directory scan speed prior to tarballing
This changes improves the speed that the project is tarballed by switching from
`klaw` to `recursive-fs` and not running `lstat` on files that are ignored.
Whilst testing with the Jellyfish repository, which contains a number of
sub directories, each with their own node_modules folder, I was able to
reduce the time taken to scan and tarball the project from 70s to 11s,
which is a massive improvement.

Change-type: patch
Signed-off-by: Lucian Buzzo <lucian.buzzo@gmail.com>
2021-11-26 13:55:41 +00:00
Lucian Buzzo
d2a5a9ba86 Set the correct target state when using Compose "image" field
Fixes #2394

When pushing to a device in local mode, if a service is not external, and uses
an `image` field, that value should be used for tags and target state, otherwise
it won't match the image name generated on the device by balenaEngine.

Change-type: patch
Signed-off-by: Lucian Buzzo <lucian.buzzo@gmail.com>
2021-11-26 10:11:07 +00:00
Paulo Castro
305c9045f0 build, deploy: Fix processing of '--tag' option
Change-type: patch
Resolves: #825
Resolves: #1018
2021-09-10 23:11:20 +01:00
Paulo Castro
b30075a18b push: Await and retry supervisor API requests to a local device
Change-type: patch
2021-09-10 01:44:26 +01:00
Paulo Castro
6244af3464 chore: Update net-keepalive dependency (fix CLI packaging errors)
Change-type: patch
2021-09-10 00:20:26 +01:00
Paulo Castro
d6faf060e6 v13 preparations: Add feature switch for removal of '--gitignore' (push, build)
Change-type: patch
2021-09-08 18:10:22 +01:00
Paulo Castro
3a871a0003 chore: Update balena-lint
Change-type: patch
2021-07-20 18:02:16 +01:00
Paulo Castro
2c922ee6d2 Update dependencies (multibuild, dockerode, docker-toolbelt, docker-progress)
Update resin-multibuild from 4.7.2 to 4.11.0

Change-type: patch
2021-05-07 00:32:15 +01:00
Tomás Migone
8780a24fb5 ssh: fix incorrect service name parsing in local mode
Resolves: #2252
Change-type: patch
Signed-off-by: Tomás Migone <tomas@balena.io>
2021-04-14 16:31:07 -03:00
Paulo Castro
d50d18d492 push, logs: Fix parsing of local mode device logs (NDJSON stream)
Resolves: #2185
Change-type: patch
2021-04-09 23:58:04 +01:00
Scott Lowe
f3d750a024 Add support for docker-compose dev overlay in local pushes
Change-type: minor
Signed-off-by: Scott Lowe <scott@balena.io>
2021-02-09 13:06:03 +01:00
Scott Lowe
e47fd0c887 Add command device local-mode
Change-type: minor
Resolves: #1304
Signed-off-by: Scott Lowe <scott@balena.io>
2021-02-04 15:36:32 +00:00
Matthew McGinn
53926067ca
logging: note that the device supervisor version is operative
Change-type: patch
Signed-off-by: Matthew McGinn <matthew@balena.io>
2021-01-22 16:53:15 -05: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
d00db5ea8c logs: Fix CTRL-C ignored on Windows (PowerShell, MSYS, Git for Windows)
Change-type: patch
2020-12-09 20:43:14 +00:00
Paulo Castro
5497835728 Livepush: Fix process not exiting on "Connection to device lost"
Resolves: #1828
Change-type: patch
2020-12-09 20:43:14 +00:00
Paulo Castro
d6b3249274 Livepush: Refactor dockerignore filtering and add test cases
Change-type: patch
2020-11-19 14:24:54 +00:00
Josh Bowling
02a5466746 Livepush: Ignore paths set in .dockerignore files
Change-type: minor
Signed-off-by: Josh Bowling <josh@balena.io>
2020-11-19 14:24:44 +00:00
Paulo Castro
7f000ee8c3 ssh: Fix "Found more than one container with a service name <name>"
Change-type: patch
2020-10-28 01:06:54 +00:00
Paulo Castro
2b22fb89f1 Convert more code to Typescript (compose.js)
Change-type: patch
2020-10-21 13:02:47 +01:00
Paulo Castro
93e18bea27 push (local device): Add --pull option to force pulling base images again
Connects-to: #1584
Change-type: minor
2020-09-09 00:16:22 +01:00
Pagan Gazzard
6ca7c34e57 Reduce bluebird usage
Change-type: patch
2020-08-05 09:41:15 +01:00
Pagan Gazzard
9aacb7ec56 Remove some bluebird usage
Change-type: patch
2020-07-31 10:33:51 +00: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
Paulo Castro
2307a15b10 balena ssh: Refactor error handling and test cases
Connects-to: #1896
Change-type: patch
2020-07-02 00:50:32 +01:00
Pagan Gazzard
984d1a3fd6 Switch from new Bluebird to native version
Change-type: patch
2020-06-30 23:59:17 +01:00
Pagan Gazzard
d4f288394b Switch from Bluebird.map to native version
Change-type: patch
2020-06-30 23:59:11 +01:00
Pagan Gazzard
2a3479c7c6 Stop importing specific lodash files
We already import the entirety of lodash so importing the individual
files just adds time to also import the single file versions

Change-type: patch
2020-06-30 13:52:08 +01:00
Paulo Castro
eaf61d801c Add --multi-dockerignore (-m) option to push/build/deploy commands
Connects-to: #1870
Change-type: minor
2020-06-28 23:55:30 +01:00
Pagan Gazzard
667358b23e Import just strip-tags from common-tags to reduce startup time
This saves ~100ms for me on startup with no fast-boot cache and ~50ms
with a fast-boot cache

Change-type: patch
2020-06-25 22:56:43 +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
Paulo Castro
c619bd4b99 Update 'balena-lint' and apply new prettier rules
Change-type: patch
2020-06-15 23:53:07 +01:00
Paulo Castro
7e1d58546c Add tests for standalone executable via proxy server
Change-type: patch
2020-06-15 23:53:04 +01:00
Scott Lowe
1569915fae v12 preparations: Add feature switch for default eol-converson
Change-type: patch
Connects-to: #1770
2020-06-05 16:37:44 +01: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
Paulo Castro
4577d72ead push/build/deploy: add --nogitignore option and update dockerignore filter library
Connects-to: #1032
Connects-to: #1148
Change-type: minor
2020-05-13 22:33:37 +01:00
Cameron Diver
4e50d08f7b Fix usage of livepush v3 features
Change-type: patch
Signed-off-by: Cameron Diver <cameron@balena.io>
2020-05-12 09:24:05 +01:00
Scott Lowe
9b1c3c665b Refactor: move error related functions into error module
Change-type: patch
Signed-off-by: Scott Lowe <scott@balena.io>
2020-05-01 14:41:39 +02:00
Scott Lowe
d398e22c58 Integrate livepush v3 and live directives
Change-type: minor
Resolves: #1784
Signed-off-by: Scott Lowe <scott@balena.io>
2020-04-30 12:25:17 +00:00