balena-io-modules / balena-multibuild

Build docker compositions with node!
4 stars 0 forks source link

Propagate target platform to builds #74

Closed robertgzr closed 4 years ago

robertgzr commented 4 years ago

This ensures that the build resolves the correct platform for base images it fetches from the registry. Includes unit tests to check the platform translation and the actual build execution.

NOTE: This requires running a docker daemon >=18.09.3 and experimental features enabled.

Change-type: minor Signed-off-by: Robert Günzler robertg@balena.io

robertgzr commented 4 years ago

@kaisoz I managed to write all the tests I needed right here. I haven't tried to pull this into the builder itself yet, but the behavior of this module should be correct now.

robertgzr commented 4 years ago

@balena-ci retest

robertgzr commented 4 years ago

looks like circle does not support enabling experimental docker features using the setup_remote_docker builtin: https://ideas.circleci.com/ideas/CCI-I-491

robertgzr commented 4 years ago

@CameronDiver any idea how to approach the circleci failures?

robertgzr commented 4 years ago

@kaisoz @CameronDiver can you have another look please. I made the new test optional skip if experimental features are not enabled on the daemon we test against.

I also changed the resolve code to not transform the dockerOpts at all if there's no matching platform.

let me know if this looks good and I will rebase

robertgzr commented 4 years ago

@balena-ci retest

robertgzr commented 4 years ago

All changes squashed into a single commit now. will merge if the tests pass