Commit Graph

9 Commits

Author SHA1 Message Date
Jeremi Piotrowski
afbee30067 run_sdk_container: skip fetching image if custom_image is requested
In our CI most uses of run_sdk_container pass the '-C image' flag, which broke
with the last change, due to unbound docker_sdk_vernum variable. Skip fetching
the image when custom_image is passed.

Signed-off-by: Jeremi Piotrowski <jpiotrowski@microsoft.com>
2022-03-17 09:07:31 +01:00
Kai Lueke
cc9d43b01e run_sdk_container: add remove flag
At the moment one must remove the leftover containers manually.
Add a flag to do so when stopping the container.
2022-03-16 15:55:14 +01:00
Kai Lueke
a0574bcf37 run_sdk_container: recognize --help flag
When the user passes --help we should not start a container and throw a
late error message afterwards but show the help directly.
2022-03-16 15:36:32 +01:00
Kai Lueke
c149d24ced run_sdk_container: Fall back to tar ball download for SDK image
The nightly SDK image is not pushed to a registry but has to be
downloaded from the build server as tar ball.
Fall back to the tar ball import for a better user experience.
To reuse the ci logic it had to support the "docker" env variable.
The use of the pigz container is not always needed if the user has
pigz available.
2022-03-16 15:31:03 +01:00
Kai Lueke
bce3bd9031 run/build_sdk_container: support Podman
When the docker wrapper script for Podman is used, we need to
explicitly create a root user container with "sudo podman".
Podman also has its own bridge for root user containers which we need
to detect, and it requires to explicitly say to use the Docker Hub
Caddy image.
Add a "$docker" variable that uses sudo podman as needed, and also
check which bridge interface to use. The filter had to be changed
because it didn't work with Podman. Use the Docker Hub Caddy image
explicitly.
2022-01-06 18:05:24 +01:00
Thilo Fromm
8fd5fc8a65 sdk_entry.sh: ensure currect binpkg host
This change ensures the binpkg host is updated if the board (OS) version
differs from the SDK version.

This is to ensure /build/[arch] uses the correct binary package cache.

Signed-off-by: Thilo Fromm <thilo@kinvolk.io>
2022-01-05 21:03:42 +01:00
Thilo Fromm
2c8d09192d run_sdk_container: use exact match for existing containers
run_sdk_container uses the sourcetree version to decide whether to
re-use existing containers or create new ones. However, containers were
not matched by exact name - instead, plain --filter name="..." was used,
leading to prefix matching. This change updates name="..." to use
regular expressions for exact matching.

Signed-off-by: Thilo Fromm <thilo@kinvolk.io>
2022-01-05 09:10:29 +01:00
Thilo Fromm
2324c5eeff sdk_container: fix submodules parent path in container
Signed-off-by: Thilo Fromm <thilo@kinvolk.io>
2021-11-26 17:54:43 +01:00
Thilo Fromm
b567344234 sdk-container: add scripts for containerised SDK
This change introduces a containerised SDK as a replacement for cork SDK
operations. It also simplifies versioning by removing the need for
manifest repos as well as usage of the "repo" tool by use of git
submodules for coreos-overlay and portage-stable.

The following feature scripts are added:
- run_sdk_container: Run a command in an SDK container, using the
        current scripts repo + ebuild submodules.
        current scripts repo + ebuild submodules.
- bootstrap_sdk_container / build_sdk_container_image: Bootstrap a new
        SDK and create an SDK container from the resulting SDK tarball.

The following additions have been made to SDK scripts:
- setup_board: add --pkgdir parameter to use a custom binary packge
  directory.

Signed-off-by: Thilo Fromm <thilo@kinvolk.io>
2021-11-26 17:54:43 +01:00