Introduce an arch field that can be used to filter repositories based on
the local architecture.
If arch is provided and matching with the current GOARCH then the
repository is enabled
* 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>
This was a regression in those changeset, don't replicate the info, and
at the same time, write the artifact path containing the name of the
file only (excluding the path)
- Interpolates values from the repositories compilespec if present
- Automatically merge cache images coming from specified repository when
necessary
Fixes#194
Contact the notary server if ```--verify``` is specified (or `verify:
true` is enabled on the repo config) and verify if the image is signed,
use the returned value to pull the verified image.
Also make possible to retrieve the artifact when searching for matches
between repositories list. This made possible to show the package list
when calling `luet search`.
Several changes are included:
- Expose ensureDir in helpers, and call it in the Docker client. In
other implementations that was handled by CopyFile behind the scenes,
but that's not the case here
- Create accessor in Artifact to create Artifact objects from files.
This is handy when we have to carry over downloaded package content
into caches when artifacts are already verified
- Fix various issues around the imagePush flag, so now trees are pushed
forcefully each time
- Take into consideration the real artifact name when pushing single
files in the docker image. This behavior should be changed eventually,
because single files which aren't repository packages now are in its
own docker image, but we should have just one that brings the required
metadata alltogether.
Instead of generating different images, which are harder to track and
clean, we generate a single image with various tags, corresponding to
the packages available in the repositories.
Tagging, and pushing separate images will be possible with the plugin
mechanism
Drop image-repository on create-repo. In case of a docker repository, --output is the image reference to use.
Also restore default output build dir.
See also: #169
Now it's possible disable color and emoji on standard
output with:
$> luet <cmd> --color=false --emoji=false
Hereinafter, the list of changes:
* Added logging option logging.color (default true)
* Added logging option logging.enable_emoji (default true)
* Added persistent flag --color
* Added persistent flag --emoji
Fixup a regression, in this way we respect the user configuration in
regards to a repository to be consumed (priority and repository type)
regardless of the one advertized remotely.
Also add informative message about prio and type.
* cmd/search: Add support for search of the packages
with a specific label.
* review Search method of Repositories for permit
different search modes.
* labels are k/v attributes and could be matched
through label key (with HasLabel method) or through
regex that use "$key" + "=" + "$value"