Commit Graph

8 Commits

Author SHA1 Message Date
Felipe Lalanne
3c546aa199 Add sync directory to lint sources 2024-03-05 15:33:50 -03:00
Pagan Gazzard
766cce89c7 Convert multiple bluebird uses to native promises
Change-type: patch
2023-10-16 11:40:45 +01:00
Felipe Lalanne
17aa625d3b Use single-arch in dockerfile
This is necessary since the builder no longer passes the platform flag
to the build. This would lead to dockerfiles that are mixing multi and single
arch stages to pull the wrong architecture images, particularly when
trying to build images in emulated builds (e.g. armv7hf built on aarch64).

Moving the full build to single-arch solves this as the docker engine is
capable of chosing the right architecture from the manifest. Once some
of the builder issues are fixed, we should move to #2141

Relates-to: balena-io/balena-builder#1010
Change-type: patch
2023-03-10 17:30:22 -03:00
Felipe Lalanne
b207c01988 Fix livepush to work with node 16
This also improves the memory efficiency of the sync mechanism by
calculating the stage ids on the fly instead of storing the full
build output in memory and then parsing the string.
2022-09-20 14:23:21 -03:00
Pagan Gazzard
a4c13aa2e9 Update to typescript 4.8.2
Change-type: patch
2022-09-19 16:36:17 +01:00
Felipe Lalanne
1722286a87 Refactor supervisor Dockerfile to remove custom dependencies
Restructure the supervisor image to remove the dependency on the custom `alpine-supervisor-base`
image and the custom node build. The dockerfile is now a multi-stage
build that splits the process into two build stages and two runtime
stages.

Here is the full list of changes

- The node binary is now copied from  `balenalib/${ARCH}-alpine-node:12-run`, the node binary
now supports running with a debugger.
- The runtime image now inherits from the official `alpine:3.16` image
- Tests are ran within the runtime image configuration instead of the
  build image
- Livepush is ran within the runtime image context
- Unnecessary packages have been removed
- Removed avahi-daemon.conf as that service is not being used
- Fix livepush to work with a multi-stage image. This also deprecates the `image-tag` argument to npm run sync as
`SUPERVISOR_TAG` is no longer used by new OSs
- Fix livepush build on old rpi devices. Allows passing a 'PREFIX'
  argument to let the builder pull images directly from docker hub arch
  repositories. Relates to https://github.com/balena-os/balena-engine/issues/269

Change-type: patch
2022-07-18 12:31:23 -04:00
Felipe Lalanne
9c1d10dc31 Remove version tag from livepush generated image
The `start-resin-supervisor` script in newer OS version no longer uses the
SUPERVISOR_TAG environment variable setup on supervisor.conf and
update-supervisor.conf.

This change removes the need for that variable with livepush supervisor
to make it compatible with older and newer OS versions

Change-type: patch
2021-04-30 15:51:10 -04:00
Cameron Diver
8ab63656bd Update synchronisation scripts for supervisor development
We move the old sync.js script to tools/, and delete the now-broken
sync-debug.js.

We add a command `npm run sync`, which starts a livepush process
with the supervisor on a device.

Change-type: minor
Signed-off-by: Cameron Diver <cameron@balena.io>
2020-04-06 13:05:38 +01:00