It holds necessary state plus additional information relative to the
context which we are being run to (e.g. if we are in a terminal or not).
Besides in the future we can use it also as a contextual logger to
provide more smart logging capabilities.
This also replace the general global configuration instance that
previously was share between the core components.
- Ditch multiple libraries for progressbar, spinner, colors and replace
with pterm
- Detect when running on terminal and disable automatically spinner
- Add support for multiple progress bars
- Huge rewrite of the configuration part. No more crazy stuff with viper
CLI commands now correctly overrides default config file as expected
- Limit banner to be displayed on relevant parts
Fixes#211Fixes#105Fixes#247Fixes#233
Instead of merely storing files into disk use a real cache.
This also makes possible finally to reference artifacts in the cache with the
package checksum, which solves the cache hit checksum failures we had
previously.
The BuildTree implementation was in parallel-build-tools, which actually makes
sense to share in the compiler as can be used as another way to trigger
builds.
The CLI helpers were split in several CIs
implementations. This moves a new layout where we expose several
packages, as we will refactor things slowly.
This changeset allows to have shared templates in a static folder
"templates" present in each luet tree. If the directory is present, it
gets scanned and templated accordingly on top of each package. This
allows to use such folder to store custom blocks to share between
packages.
This is still experimental and subject to change, this is just a first
pass version to provide the feature. It needs to be refined still as it
would be more elegant to use the helm engine properly and map our
structure to the engine instead of adapting it roughly.
Fixes#224
This commit starts deprecation of `join` keyword in favor of
`requires_final_images` as boolean in the compilation spec.
The change is driven by two reasons: syntax and guarantee unique hashes.
- the hashtree when computing a hash it analizes the requires field of
each spec, ignoring the join field
- the join field doesn't add much value. Having it separate suggests
that a spec can contain both `requires` and `join`, but that's not
actually true. We just act differently on the same list.
Signed-off-by: Ettore Di Giacinto <mudler@sabayon.org>
* Reduce possibility of circular dependency
Just by adding an import for bus to anything in the helper dir, we would
run into a circular dependency due to how things are structured. That
means that we cannot set any events for unpacking or docker helper
pulling an image.
This commit tries to work around this by doing several things.
- Remove full imports of the helper module by segmentating some modules
into their own submodule, like docker or match so just using a small match
function doesnt bring the whole module
- Removing a simple function to check if a dir exists from importing
the full helper module and instead write the function (5 lines)
- Using logrus in the bus module instead of logger, which avoids a
circular dependency
Signed-off-by: Itxaka <igarcia@suse.com>
* Add two new events for unpacking an image
Both pre and post unpacking an image
Signed-off-by: Itxaka <igarcia@suse.com>
Distinguish rather if we should generate artifact of the deps of a
package or not, and ensure that we just force artifact generation for
targets when computing the join image.
Fixes#217
A new keyword `join` is introduced to generate the parent image. It
takes precedence over a `requires` or a `image` already defined in a
spec.
It will generate all the artifacts from the packages listed and join
them in a single image which will be used as parent for the package
build process.
This is a change which invalidates priorly generated hashes.
Fixes#173
Implement multi-stage copy from images part of the build cache of a
package.
Note, this is not the final images where are we copying files from, but
the underlying build container.
Skipping the test on img backend because it fails when pulling external
images during multi-stage build...
Fixes#190
before, without --only-target-package, we were forcing to build the
images locally. Now we extend it also to that use-case.
Also revisit how we pass by the builder image hash, so it's easier to
read.
This change also re-enables tagging and bulding builder images all the
times.
Previously, we regressed into not tagging build images coming out-of-the
tree, with the unpleasant side-effect of not be able to re-build the
same artifacts for those leaf packages.
- Fixup search path on metadata spec load. Previously we were reading
the package being passed, and not the one resolved (it failed against
selectors)
- Do inherit first pushrepositories, so they take precedence over pull
- Add test cases to cover build values interpolation by remote
repositories
- Enhance test cases to check image cache repository inheritance when
--from-repositories is passed
- Fix race condition when inheriting buildspec options: Instead of consuming the compiler one, annotate the updates in the
package BuildOption spec which is passed by
- Update vendor
- Interpolates values from the repositories compilespec if present
- Automatically merge cache images coming from specified repository when
necessary
Fixes#194
Adds a new cli flag to luet build `--pull-repository` which allows to
pass-by a list of docker image references which are used to pull the
cache from
Fixes#185Fixes#184Closes#161
This commit removes the Domain Name, if any, from the cached image
reference before computing the image fingerprint. This way the same
image, if stored in some oter mirror, is still seen as the same one.
Fixes#158
The backend will figure out if we have the image or not, otherwise will
atempt to pull if not there.
Skip retrieve integration test with img as its not supported.
This changeset also drops --keep-exported-images, which is quite unused
and can be replaced with a plugin, or either by manually exporting the
resulting images.
This is currently not a valid use case. Virtuals are empty packages and
if the `build.yaml` is completely empty, nothing could depend on them.
Let's try to not be too smart and build the package image if a source
image is supplied, and fail hardly when we depend on a virtual in build
time.