zarf icon indicating copy to clipboard operation
zarf copied to clipboard

"Build Harness" container for the Zarf project

Open RothAndrew opened this issue 2 years ago • 6 comments

Is your feature request related to a problem? Please describe. It slows down our testing pipeline to do things like installation of tools, sometimes multiple times.

Describe the solution you'd like Increase the speed of test pipeline execution by creating a "build harness" container image that has any tools that this project needs to build and run tests preinstalled

Describe alternatives you've considered Continue installing tools every time a test is run

Additional context Here's an example

RothAndrew avatar Aug 26 '22 16:08 RothAndrew

I'm confused how this would help us? We don't run containers for our tests, we run VMs and our current install time is 5-7 seconds. That will be sped up more next time I cycle the runners with docker buildx installed.

image

jeff-mccoy avatar Aug 26 '22 16:08 jeff-mccoy

My motivation for creating this issue was seeing this in @Racer159's PR he has out.

image

I vaguely remembered it was happening elsewhere as well but didn't look to confirm. If we're satisfied with the speed of the automated processes in the repo and don't feel the need to do this then I'm fine with just closing it.

RothAndrew avatar Aug 26 '22 16:08 RothAndrew

Ah okay misunderstood what you were asking. I do think building out a secure base image for stuff like this is a good idea--if we need it. I'd also like to look at if it's actually best in a container or not.

jeff-mccoy avatar Aug 26 '22 16:08 jeff-mccoy

One advantage of doing it in a container is that it can be run with minimal dependencies locally. For example, the only dependencies for building and testing DI2-ME is Make, Docker, and standard shell tools like mkdir and grep

RothAndrew avatar Aug 26 '22 16:08 RothAndrew

I do personally like the simplicity of a docker container for dev deps in case others pick it up but agree it should be a built container without a pip install.

What does it take to add a dev container under the defenseunicorns docker hub?

(as a side note example, I compiled https://github.com/RigsOfRods/rigs-of-rods from source over the weekend which uses conan by default to pull in dependencies; granted that is a part of the primary build path for them (this is just docs) but having python dependencies in a c project was annoying (luckily they have a conan-less way to do it too))

Racer159 avatar Aug 29 '22 22:08 Racer159

What does it take to add a dev container under the defenseunicorns docker hub?

GHCR could be an option as well. That's what DI2-ME does: https://github.com/defenseunicorns/zarf-package-software-factory/pkgs/container/zarf-package-software-factory%2Fbuild-harness

RothAndrew avatar Aug 29 '22 23:08 RothAndrew

Satisfied by https://github.com/defenseunicorns/build-harness

Noxsios avatar Aug 07 '23 21:08 Noxsios