Ettore Di Giacinto
a1f4c28973
Add GenerateFinalImage to package artifacts
...
GenerateFinalImage generates a docker image from scratch with the
artifact content.
Related to #169
2021-01-18 12:08:47 +01:00
Ettore Di Giacinto
43b0b11028
Define a build context for backends
2021-01-18 11:06:54 +01:00
Ettore Di Giacinto
457acd0d8a
Add virtual packages support
2021-01-03 20:08:04 +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
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
b5990b5333
Generate changes from CompilerBackendOptions and pass by image name so img can unpack images
2020-12-09 00:27:37 +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
d92ee9e1d9
Add preliminar support for excludes
2020-11-08 15:35:24 +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
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
Ettore Di Giacinto
9e0e1199df
Check if image exists before skipping compilation
2020-06-03 21:00:30 +02:00
Ettore Di Giacinto
51711dafba
Add package_dir to pack a spec dir as the main artifact
2020-05-16 21:34:27 +02:00
Ettore Di Giacinto
528f481a7b
Annotate package files in metadata
...
Fixes #87
2020-04-13 10:52:41 +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
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
f329e1d5e0
Add retrieve to compilation spec
...
It allows to copy build artifact during buildtime. In this way
artifacts between different seed images can be shared
```
retrieve:
- a-test-1.0.package.*
- https://...
```
They will be available under WORKDIR
2020-02-13 14:15:43 +01:00
Ettore Di Giacinto
07a154474b
Consume SolverOptions in compiler
2020-02-12 11:21:55 +01:00
Ettore Di Giacinto
c6fe34b059
Support compression and checksum for trees
...
Fixes #33 #34 #35
2020-01-28 17:46:32 +01:00
Daniele Rondina
07633dc307
Add container-diff summary
2020-01-05 18:05:56 +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
d23e1dee78
Default to Clean true in CompilerOptions
2020-01-05 16:08:40 +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
Ettore Di Giacinto
f71c9937c4
Add compression to build CLI
...
Also handle how concurrency is set now.
Adds also an accessor to compiler to set the desired compression type
Refers to #33
2019-12-30 16:35:21 +01:00
Ettore Di Giacinto
475b63be95
Consume concurrency from compiler
...
Refers to #33
2019-12-30 16:35:18 +01:00
Ettore Di Giacinto
d2d72c3fc4
Add package compression type
...
TODO: Handle the path substitution in a separate field
Adds GZip support and allows the compiler to switch compression type.
It also adds Concurrency as a compiler attribute (not consumed yet)
Refers to #33
2019-12-30 16:34:41 +01:00
Ettore Di Giacinto
eeb6719529
Add accessors to Hash and Verify artifacts
...
Refers to #28
2019-12-29 13:59:58 +01:00
Ettore Di Giacinto
2fa9c754ae
Move archive helpers to artifact
...
This allow in the future to swap and provide archive/compression methods without hijacking the code.
Refers to #33
2019-12-28 16:48:05 +01:00
Ettore Di Giacinto
fa46601638
Adapt compiler and installer to Tree removal
2019-11-29 19:01:49 +01:00
Ettore Di Giacinto
df78308e98
Annotate artifact metadata after compiling
2019-11-22 21:01:29 +01:00
Ettore Di Giacinto
b2060c82e3
Make DB Switchable
...
Fixes races conditions and make the DB Switchable. Also prepare inside
the CompilationSpec the tree of the deps to be built, and parallelize
only the building jobs.
Closes #7
Signed-off-by: Ettore Di Giacinto <mudler@gentoo.org>
2019-11-16 13:26:33 +01:00
Ettore Di Giacinto
c95e0ed91d
Add revdep calculation
...
Add CompilationSpecs type to handle slices of CompilationSpec, to
perform operation such as Unique() and Remove().
Add also dependencies and the spec associated to the Artifact, to track
how the artifact was generated.
Add revdeps compilation wrapper, and unit tests
2019-11-15 18:11:26 +01:00
Ettore Di Giacinto
0eef18d75c
Add 'includes' to CompileSpec
...
The includes field is an array of regexp used to indicate what include
inside the packag. It can be omitted to default behavior (all)
2019-11-14 17:43:47 +01:00
Ettore Di Giacinto
d752c0572b
Add unpack field to specify a package used as layer
...
Closes #9
2019-11-13 09:43:54 +01:00
Ettore Di Giacinto
ebd4cfc318
Make Compile work in parallel
...
Also make the spinner thread-safe
2019-11-11 10:22:55 +01:00
Ettore Di Giacinto
ea2a51ce66
Implement compilation with images
...
A compilespec with an image defined (and no seed) can now be compiled,
and an artifact delta is provided at the end of the process.
2019-11-10 10:48:07 +01:00
Ettore Di Giacinto
c51c6264d7
Backend nows must expose a way to unpack rootfs of images
2019-11-10 10:47:28 +01:00
Ettore Di Giacinto
45651a3bcc
Define Artifact diffs layers
...
It also add in simpledocker a naive implementation using the container-diff binary, which is supposed to go away with a proper API implementation.
2019-11-09 13:58:15 +01:00
Ettore Di Giacinto
0672dd792e
Add WIP Compiler steps for rootfs
2019-11-08 19:57:23 +01:00
Ettore Di Giacinto
300e60984a
CompilerBackend now consumes a CompilerOptions
2019-11-08 18:29:51 +01:00
Ettore Di Giacinto
0321973359
Add PreBuild steps
...
They are executed when building the "builder" image, those are not accounted to the diffs when producing the final artifact
2019-11-08 18:28:01 +01:00
Ettore Di Giacinto
ff88ff67c2
Add Separate tree for build dependency
...
Reuse the Recipe and extend it to read a separate tree for build
dependencies.
Also add accessors to compilespec to produce dockerfile image format.
2019-11-05 17:36:22 +01:00
Ettore Di Giacinto
b62966ca35
Consume CompilerBackend in Compiler
2019-11-04 17:21:19 +01:00
Ettore Di Giacinto
add0021cfd
Add compiler interfaces and build definition skeleton
...
Create compiler interface with switchable backends. For now it can resolve and
parse a `build.yaml` which is in the same folder as in `definition.yaml`
Add also tests to cover this and new fixtures
2019-11-04 17:21:19 +01:00