Commit Graph

15 Commits

Author SHA1 Message Date
Ettore Di Giacinto
797a34ba49 Reuse same dockerfile gen logic between prelude and steps
As now we build only when necessary, we need to make sure the images are
built similarly. The discrepancies between the two are less now, and
they can share the same logic.

This fixes a regresion where when no prelude is defined, the build
context isn't copied over
2020-12-12 11:16:34 +01:00
Ettore Di Giacinto
3c0dd2b71d Adapt test 2020-12-07 00:07:57 +01:00
Ettore Di Giacinto
44d33eceba Set workdir also on step image
Otherwise with DOCKER_SQUASH=true it wouldn't be coherent on where to
find the package files
2020-11-28 12:07:07 +01:00
Ettore Di Giacinto
95e640c9d0 Make solver type switchable 2020-10-29 16:32:13 +01:00
Ettore Di Giacinto
c7253ac8ad
Adapt test to spec changes 2020-02-14 08:04:26 +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
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
58169770e1
Add test for FindPackageCandidate
Adapt tests for env
2019-12-01 23:24:42 +01:00
Ettore Di Giacinto
ebf818ff08
Add Environment to compilespec #24
Now compilespecs can define envs and have PACKAGE_NAME, PACKAGE_VERSION and PACKAGE_CATEGORY injected
2019-12-01 21:20:16 +01:00
Ettore Di Giacinto
fa46601638
Adapt compiler and installer to Tree removal 2019-11-29 19:01:49 +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
639d4438e1
Adapt tests 2019-11-08 18:30:53 +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
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