Package and distribute dependencies of UBI-based CNG images for offline build
This MR is part of the solution for packaging and distributing dependencies of UBI-based CNG images for offline build.
Semantically, it contains two sets of changes.
The first set of changes:
- Factors out the build stage of
Dockerfile.ubi8
intoDockerfile.build.ubi8
files, - Introduces new
build:X
jobs and adds them tophase-N:prepare
stages (which finish beforeX
job andphase-N
stage). These jobs build images fromDockerfile.build.ubi8
files and copy the binary assets from them (located at/assets
directory inside the image) toartifacts/ubi/X
in build artifacts (usingcopy_assets
function). - When
${UBI_PIPELINE} = 'true'
the required assets from build artifacts are copied to the build context of the final image (usinguse_assets
function).Dockerfile.ubi8
files are changed to copy anything that is included in/assets
to their file system root.Dockerfile.build.ubi8
files preserve the directory structure of binary assets.
NOTE: .gitlab-ci.yml
contains a few flags to short circuit the pipeline for test purposes. They will be removed once the tests are done.
The second set of changes is still WIP and contains code to package, sign, and release the UBI dependencies.
Closes gitlab-org/distribution/team-tasks#503 (closed) and gitlab-org/distribution/team-tasks#474 (closed)
Edited by Hossein Pursultani