Commit Graph

190 Commits

Author SHA1 Message Date
Sam Alba
5692accf37 implemented fetch-git buildkit options (keepdir and auth secrets)
Signed-off-by: Sam Alba <sam.alba@gmail.com>
2021-05-13 10:39:29 -07:00
dubo-dubon-duponey
91c4f9c8e6
Adding additional error verification
Signed-off-by: dubo-dubon-duponey <dubodubonduponey+github@pm.me>
2021-05-12 16:11:19 -07:00
dubo-dubon-duponey
e9968e4c90
Fix crasher
Signed-off-by: dubo-dubon-duponey <dubodubonduponey+github@pm.me>
2021-05-12 15:47:20 -07:00
Solomon Hykes
d3f3799976 log operations in debug. Precursor to more readable operation logging at the cue layer
Signed-off-by: Solomon Hykes <sh.github.6811@hykes.org>
2021-05-12 14:55:17 -07:00
dubo-dubon-duponey
ca6930bd02 Implement user & hosts for Exec
Signed-off-by: dubo-dubon-duponey <dubodubonduponey+github@pm.me>
2021-05-12 14:53:52 -07:00
dubo-dubon-duponey
53611be733
Add add-hosts to DockerBuild
Signed-off-by: dubo-dubon-duponey <dubodubonduponey+github@pm.me>
2021-05-10 15:06:50 -07:00
dubo-dubon-duponey
38200f556c
Add target opt to DockerBuild
Signed-off-by: dubo-dubon-duponey <dubodubonduponey+github@pm.me>
2021-05-09 21:09:13 -07:00
Andrea Luzzardi
52048e1f24 complete deployment->environment rename
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2021-05-07 14:39:12 -07:00
Andrea Luzzardi
d8a1f35f68 fix pipeline caching when using cache mounts
Force the Pipeline to resolve the canonical Cue value before computing.
This ensures that `.Path()` gives a constant result even on references.

Fixes #399

Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2021-05-07 11:54:45 -07:00
Andrea Luzzardi
82b08b7d85 refactor for cue 0.4
cue deprecated the use of instances in favor of values. Refactored the
code to accomodate the new changes.

Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2021-04-30 18:05:37 -07:00
Solomon Hykes
5f23f29b3f Fix broken store layout from terminology change
Signed-off-by: Solomon Hykes <sh.github.6811@hykes.org>
2021-04-27 18:01:53 -07:00
Solomon Hykes
e6e8ab390d Rename "deployment" to "environment": code
Signed-off-by: Solomon Hykes <sh.github.6811@hykes.org>
2021-04-27 13:59:27 -07:00
Sam Alba
520030d4ee fixed tests creds + added authprovider to client solver
Signed-off-by: Sam Alba <sam.alba@gmail.com>
2021-04-26 18:00:31 -07:00
Sam Alba
45ecc32423 implemented docker-login op to add custom registry credentials to the buildkit from a pipeline
Signed-off-by: Sam Alba <sam.alba@gmail.com>
2021-04-26 17:40:51 -07:00
Tom Chauveau
907430d409 Fix Subdir op
Signed-off-by: Tom Chauveau <tom.chauveau@epitech.eu>
2021-04-24 19:31:36 +02:00
Andrea Luzzardi
2b7dfcae29 Revert "support registry auth"
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2021-04-23 16:59:22 -07:00
Andrea Luzzardi
d77c6f46ff
Merge pull request #342 from verdverm/scan-for-inputs
add cmd/input/list to scan a plan for inputs
2021-04-22 18:41:23 -07:00
Tony Worm
6488d41603 add cmd/input/list to scan a plan for inputs
Signed-off-by: Tony Worm <tony@hofstadter.io>
2021-04-22 17:39:36 -04:00
Andrea Luzzardi
8cadd97c60
Merge pull request #344 from aluzzardi/registry-auth
support registry auth
2021-04-22 12:14:59 -07:00
Sam Alba
d000b2912b
Merge pull request #338 from dagger/pushcontainer-image-ref
Pushcontainer image ref
2021-04-22 11:49:35 -07:00
Sam Alba
6e16207221 pipeline: better error handling on WriteFile
Signed-off-by: Sam Alba <sam.alba@gmail.com>
2021-04-22 09:43:45 -07:00
Andrea Luzzardi
692bd72095 support registry auth
HACK: the way buildkit works, we can only supply an Auth Provider for the entirety of the build session (`dagger up`). Therefore, we start by scanning all auth in the entire Cue tree and supply an auth provider for all of them.

Drawbacks:
- As soon as you add `auth` in a Pipeline for a registry, all other Pipelines have access to the same registry
- You can't use different credentials for the same registry

Fixes #301

Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2021-04-20 15:28:33 -07:00
Sam Alba
6818659c14 op: push-container stores metadata on fs, under /dagger/
Signed-off-by: Sam Alba <sam.alba@gmail.com>
2021-04-16 16:18:33 -07:00
Andrea Luzzardi
84f914216d
Merge pull request #331 from dagger/fix-double-exec
Fixed duplicated execution on `op.#Exec.always: true`
2021-04-15 13:09:00 -07:00
Sam Alba
d8a632064b removed dead code
Signed-off-by: Sam Alba <sam.alba@gmail.com>
2021-04-15 12:37:17 -07:00
Sam Alba
468ac1220a added comment about always flag + cue fmt
Signed-off-by: Sam Alba <sam.alba@gmail.com>
2021-04-15 12:34:15 -07:00
Sam Alba
f4c712e373 pipeline: implemented op.#Exec.always correctly
Signed-off-by: Sam Alba <sam.alba@gmail.com>
2021-04-15 12:09:01 -07:00
Sam Alba
075fbbf3d5 pipeline: forward the no-cache option to the dockerbuild frontend
Signed-off-by: Sam Alba <sam.alba@gmail.com>
2021-04-15 11:26:01 -07:00
Sam Alba
9ffe5c053c solver: fixed lint error (double import)
Signed-off-by: Sam Alba <sam.alba@gmail.com>
2021-04-14 16:27:15 -07:00
Sam Alba
83f56897a7 solver/client: add ability to disable the cache at the LLB level
Signed-off-by: Sam Alba <sam.alba@gmail.com>
2021-04-14 16:21:18 -07:00
Andrea Luzzardi
bb5542e26e Proper support for Docker Image metadata
- Both FetchContainer and DockerBuild read the image metadata and
  convert to LLB (e.g. `ENV foo bar` in Dockerfile shows up in
  `op.#Exec`)
- Image metadata is "sticky" between Pipelines (e.g. `op.#Load` will
  re-use the same metadata)
- Image metadata is injected back to #PushContainer, so that
  DockerBuild+PushContainer and FetchContainer+PushContainer do not lose
  any metadata.
- Tests for all the above

Fixes #142

Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2021-04-12 17:47:58 -07:00
Andrea Luzzardi
0fa8e18d81
Merge pull request #305 from fkautz/pr_out_add_support_for_input_file_in_dagger_compute
Add support for input file in dagger compute
2021-04-12 10:42:33 -07:00
Frederick F. Kautz IV
e595e1d833 variables shouldn't shadow packages
Signed-off-by: Frederick F. Kautz IV <fkautz@alumni.cmu.edu>
2021-04-11 16:30:48 -07:00
Frederick F. Kautz IV
0458c0a838 * add support for --input-file in dagger compute
* secrets now supports bytes
* error reporting for unhandled content data types in WriteFile

Signed-off-by: Frederick F. Kautz IV <fkautz@alumni.cmu.edu>
2021-04-11 16:18:59 -07:00
Andrea Luzzardi
60db93a246 client: pass through the deployment directly
we can't serialize Cue in a lossless way. The current architecture has
the frontend serialize the state (plan, input, computed) to Cue files,
then the client loads them back. We lose information by doing this, and
therefore the merge fails.

This change removes the abstraction so that we operate directly on the
cue.Instance.

Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2021-04-08 18:11:06 -07:00
Andrea Luzzardi
8b0eea6e7f compiler: simplify InstanceMerge
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2021-04-08 17:22:25 -07:00
Andrea Luzzardi
b4c530653c compiler: fix data race issue
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2021-04-08 16:30:55 -07:00
Andrea Luzzardi
e54f1b0c3a store only computed values in compute layer
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2021-04-07 19:37:48 -07:00
Andrea Luzzardi
5381d0bfe1 up: store outputs and merge in query
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2021-04-07 19:05:09 -07:00
Andrea Luzzardi
5a6a8c0ff6 store: fix duplicate paths
A deployment with multiple times the same path would appear repeated in
`LookupDeploymentByPath`.

This change indexes paths as a map rather than a list, thus avoiding the
issue altogether.

Fixes #276

Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2021-04-05 14:28:59 -07:00
Frederick F. Kautz IV
cb59e23cd4 fix build break
Signed-off-by: Frederick F. Kautz IV <fkautz@alumni.cmu.edu>
2021-04-04 20:00:22 -07:00
Andrea Luzzardi
0c79488a18
Merge pull request #268 from dagger/deployment-multi-path
store: support multiple deployments per path
2021-04-02 17:54:11 -07:00
Sam Alba
a79e13a35c test: fixed input_test.go
Signed-off-by: Sam Alba <sam.alba@gmail.com>
2021-04-02 17:32:05 -07:00
Sam Alba
ce6ce871ab moved abs path to DirInput
Signed-off-by: Sam Alba <sam.alba@gmail.com>
2021-04-02 17:26:19 -07:00
Sam Alba
a799dd05d7 cli: moved abs path resolve to input.go
Signed-off-by: Sam Alba <sam.alba@gmail.com>
2021-04-02 17:14:01 -07:00
Sam Alba
d3fc31ab57 fixed inputs when input target is overriden
Signed-off-by: Sam Alba <sam.alba@gmail.com>
2021-04-02 16:47:49 -07:00
Andrea Luzzardi
33a7770459 store: support multiple deployments per path
- Add support for multiple deployments per path in the Store
- Add a bunch of tests
- Change the Lookup deployment API
- Add disambiguation in the CLI commands

Fixes #231

Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2021-04-02 16:40:20 -07:00
Sam Alba
540f373993
Merge pull request #265 from dagger/query-formats
dagger query [--format cue|json|text|yaml] (default is json)
2021-04-02 16:20:39 -07:00
Andrea Luzzardi
8a4aa4d42b pipeline: #compute -> #up
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2021-04-02 16:08:15 -07:00
Solomon Hykes
e2e56a5143 dagger query [--format cue|json|text|yaml] (default is json)
Signed-off-by: Solomon Hykes <sh.github.6811@hykes.org>
2021-04-02 23:05:08 +00:00