Ettore Di Giacinto
5b4e930fc3
Do implement a real cache
...
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.
2021-10-19 21:25:01 +02:00
Ettore Di Giacinto
5a63bbd0d2
Deprecate parallel solver
2021-10-10 00:28:54 +02:00
Ettore Di Giacinto
b81d33f182
Fixup luet tree pkglist/images while having shared templates
2021-08-11 12:52:16 +02:00
Ettore Di Giacinto
2789f59f53
Add --values flag also to luet tree images
2021-08-09 12:57:36 +02:00
Ettore Di Giacinto
33b1c63815
Allow to have shared templates across packages
...
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
2021-08-04 16:35:28 +02:00
Ettore Di Giacinto
74402fae81
Re-organize common CLI code
...
Signed-off-by: Ettore Di Giacinto <mudler@sabayon.org>
2021-08-03 16:48:34 +02:00
Ettore Di Giacinto
9d2ee1b760
Add hashtree and extract hash logic from compiler
...
Add unit tests, consume imagehashtree in compiler and cleanup
Fixes : #203
2021-05-17 15:22:08 +02:00
Ettore Di Giacinto
0288eedbc3
Always resolve buildhash image, add --rebuild to build
2021-04-23 12:02:41 +02:00
Ettore Di Giacinto
7ba7add2a8
Allow to pull specfiles from published repositories
...
- Interpolates values from the repositories compilespec if present
- Automatically merge cache images coming from specified repository when
necessary
Fixes #194
2021-04-16 13:58:51 +02:00
Ettore Di Giacinto
57c769b4a5
Refactor compiler and annotate buildoptions into compiler metadata
...
This allows to later pick up values used during build of each package
2021-04-16 13:57:54 +02:00
Ettore Di Giacinto
44cae094e8
Allow multiple build values files
...
Fixes #198
2021-04-16 13:56:51 +02:00
Ettore Di Giacinto
ec19b34ca8
Allow to pull from multiple repositories
...
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 #185
Fixes #184
Closes #161
2021-04-08 09:17:54 +02:00
Ettore Di Giacinto
c736c002af
build: Set privileged to true by default
2021-03-18 10:47:39 +01:00
Ettore Di Giacinto
749a4cb615
Add --backend-args
...
Allow to add arguments to the backend build arguments
Fixes #146
2021-02-22 13:49:29 +01:00
Daniele Rondina
c1fe3278fa
backend: Add realtime output on building phase
...
The realtime output could be configured through
LUET_GENERAL__SHOW_BUILD_OUTPUT environment
variable or related config option or through
`--live-output` option.
2021-02-02 12:58:34 +01:00
Ettore Di Giacinto
7d11df3225
Simplify delta generation, and avoid two-pass with img backend
...
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.
2021-01-24 12:27:07 +01:00
Ettore Di Giacinto
322fe72ef2
Generate repository metadata and packages for docker repository type
...
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
2021-01-22 16:53:52 +01:00
Ettore Di Giacinto
429e9757db
Select cwd as default tree path for commands
2021-01-18 10:40:41 +01:00
Ettore Di Giacinto
2b6fe2baa1
Add luet build --wait
...
It allows to wait for intermediate images to be available instead of
building all of them
2020-12-18 23:19:18 +01:00
Ettore Di Giacinto
f0fae82ad9
Add experimental zstd support
...
Closes #97
2020-12-18 21:24:01 +01:00
Ettore Di Giacinto
70f05f41e8
Check only if package image exists
...
We don't need to look after the builder image as its optional. In this
way we can also reduce the compiler options, as we don't require a
--clean flag anymore. --only-target-package is sufficient to determine
what we can skip and how.
2020-12-14 18:41:39 +01:00
Ettore Di Giacinto
ef034d87b0
Detect if images are available if we don't have to generate a Package
...
While building, if we aren't doing a clean build, we scan now to see if
images are available and we skip, in case we don't find a metadata
already.
2020-12-14 18:32:32 +01:00
Ettore Di Giacinto
9423b7c1e3
Add image build events, and add luet replace
...
Enhance also some commands descriptions
2020-12-02 18:24:35 +01:00
Ettore Di Giacinto
0fe30ddcfd
Add ability to interpolate during build
...
Now build takes a --values argument, which is a yaml file that can be
used to interpolate the specs that are going to be compiled.
2020-11-28 15:47:29 +01:00
Ettore Di Giacinto
9aa352dec8
Add json output to build
2020-11-03 18:06:56 +01:00
Ettore Di Giacinto
1956f476cc
Set concurrency when building
2020-10-29 16:32:13 +01:00
Ettore Di Giacinto
a216f71d53
Inverted options
2020-10-29 16:32:13 +01:00
Ettore Di Giacinto
95e640c9d0
Make solver type switchable
2020-10-29 16:32:13 +01:00
Ettore Di Giacinto
1c1bdca343
Add only-target-package option to luet build
2020-10-06 17:57:57 +02:00
Ettore Di Giacinto
07a1058ac1
Add cli option to skip packages if only metadata is present (without checking the image)
2020-07-17 22:42:03 +02:00
Ettore Di Giacinto
03cc5fcb76
Use cobra for build --full
2020-06-06 11:20:48 +02:00
Ettore Di Giacinto
8aafc7600c
Print selected packages
2020-06-06 11:18:54 +02:00
Ettore Di Giacinto
90a25406a0
Add --full option to build
...
Don't compile dependencies when computing all the compilation specs from
a tree if are among the target deps
Fixes #41
2020-06-06 08:58:18 +02:00
Daniele Rondina
dba6c361c2
Move helpers/cli to cmd/helpers
2020-05-23 08:51:33 +02:00
Daniele Rondina
2cb79c0071
cmd/build: Add support for multiple trees
2020-05-10 20:02:12 +02:00
Ettore Di Giacinto
07610bc216
Add build option to remove backend artifacts
...
Add keep-exported-images to build to instruct to remove backend artifacts (docker images)
2020-02-21 22:33:18 +01:00
Daniele Rondina
a04dadf100
Add support for parsing version with build
2020-02-21 21:56:32 +01:00
Ettore Di Giacinto
2ce427d601
Add Nodeps, Onlydeps and Force options to Compiler
...
See #41
2020-02-18 18:36:44 +01:00
Ettore Di Giacinto
fcec6c5699
Add Push to hub feature
...
Add to the backends the Push capabilities to push images that were correctly built.
Also expose them to the CLI, along with KeepImg which was hidden.
2020-02-15 14:45:05 +01:00
Ettore Di Giacinto
d527eaed60
Allow to override default image repository
2020-02-15 14:31:23 +01:00
Ettore Di Giacinto
a756c802f9
Hook config when generating the SolverOptions, display debug message about solver type
2020-02-12 12:24:07 +01:00
Ettore Di Giacinto
3cd87abafe
Consume SolverOptions in cli
2020-02-12 11:23:38 +01:00
Ettore Di Giacinto
d5fd14bceb
Merge branch 'build_clean' into develop
2020-01-05 16:27:31 +01:00
Ettore Di Giacinto
d2abaa9cc1
Add message asserting skip. Also return pointer to allow to edit Options
2020-01-05 16:26:42 +01:00
Ettore Di Giacinto
6d745ef915
Add build --clean to CLI
2020-01-05 16:08:39 +01:00
Ettore Di Giacinto
bcc6ce19ea
Move compiler options to its own struct
...
Also add Clean attribute, to handle a future build clean method
2020-01-05 14:32:26 +01:00
Daniele Rondina
db7301f7bf
Align selector logic for explicit version with PkgSelectorConditionFromInt
2020-01-01 22:58:19 +01:00
Daniele Rondina
16453bd09f
Concurrency option is now global
...
* concurrency could be configured now from cmdline,
configuration file or LUET_GENERAL__CONCURRENCY env variable
* verbose option is now related to debug option
2020-01-01 13:43:22 +01:00
Daniele Rondina
a7e262cc48
cmd/build: Now support package without version/selector
2020-01-01 13:43:21 +01:00
Daniele Rondina
bbeb800611
cmd/build: selector is defined inside version
2020-01-01 13:43:21 +01:00