Commit Graph

250 Commits

Author SHA1 Message Date
Andrea Luzzardi
85114025e6 engine: exec: add mount service tests
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2021-12-17 15:39:32 +01:00
Andrea Luzzardi
e7d8f17884 exec: mount: fs: support readonly mounts
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2021-12-17 15:39:14 +01:00
Andrea Luzzardi
12be9a7dd8 WIP: engine.#Exec
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2021-12-17 15:13:13 +01:00
Joel Longtine
348765bfba dagger -> "$DAGGER"
Signed-off-by: Joel Longtine <joel@dagger.io>
2021-12-16 13:42:28 -07:00
Joel Longtine
d7621e24ec Change test names
Signed-off-by: Joel Longtine <joel@dagger.io>
2021-12-15 13:09:20 -07:00
Joel Longtine
9f9168ab60 Clean up test code
Signed-off-by: Joel Longtine <joel@dagger.io>
2021-12-15 10:27:37 -08:00
Joel Longtine
be3628d93c Remove tests/cue.mod
Signed-off-by: Joel Longtine <joel@dagger.io>
2021-12-15 10:27:37 -08:00
Joel Longtine
94f59a76cf alpha.dagger.io/dagger/engine -> alpha.dagger.io/europa/dagger/engine
Signed-off-by: Joel Longtine <joel@dagger.io>
2021-12-15 10:27:37 -08:00
Joel Longtine
380c15f5f4 engine.#WriteFile
Signed-off-by: Joel Longtine <joel@dagger.io>
2021-12-15 10:27:37 -08:00
Richard Jones
da054231d2
updated imports to europa/dagger
Signed-off-by: Richard Jones <richard@dagger.io>
2021-12-15 10:33:53 -07:00
Richard Jones
7601433729 cue fmt
Signed-off-by: Richard Jones <richard@dagger.io>
2021-12-15 10:22:38 -07:00
Richard Jones
c422512155 fixed test, and added more failure modes
Signed-off-by: Richard Jones <richard@dagger.io>
2021-12-15 10:22:38 -07:00
Richard Jones
ceb1827526 cue fmt
Signed-off-by: Richard Jones <richard@dagger.io>
2021-12-15 10:22:38 -07:00
Richard Jones
a78b84429d refactored to follow the original stream test
Signed-off-by: Richard Jones <richard@dagger.io>
2021-12-15 10:22:38 -07:00
Richard Jones
94ed741320 cleanup container after test
Signed-off-by: Richard Jones <richard@dagger.io>
2021-12-15 10:22:38 -07:00
Richard Jones
2569e76eeb implemented services unix and npipe complete with test
Signed-off-by: Richard Jones <richard@dagger.io>
2021-12-15 10:22:38 -07:00
Andrea Luzzardi
dd2fef8a2d engine.#ReadFile
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2021-12-15 14:35:08 +01:00
Solomon Hykes
c1c585bcd5 Europa: integrate core packages, separate universe
Signed-off-by: Solomon Hykes <solomon@dagger.io>
2021-12-15 09:27:58 +00:00
Andrea Luzzardi
ff6c7d1c1f engine.#Pull implementation
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2021-12-13 16:13:49 +01:00
Richard Jones
33db6ab90a
using "$DAGGER"
Signed-off-by: Richard Jones <richard@dagger.io>
2021-12-10 11:02:34 -07:00
Richard Jones
518d76cbe2
previous cd fixed cue loading but broke reference to dagger binary
Signed-off-by: Richard Jones <richard@dagger.io>
2021-12-09 15:59:48 -07:00
Richard Jones
72708f9870
fixed test by CD
Signed-off-by: Richard Jones <richard@dagger.io>
2021-12-09 14:32:26 -07:00
Richard Jones
a80c48f241
removed --no-cache
Signed-off-by: Richard Jones <richard@dagger.io>
2021-12-09 11:36:30 -07:00
Richard Jones
026c7641b3
refactored test to use CUE validations rather than container stdout
Signed-off-by: Richard Jones <richard@dagger.io>
2021-12-09 11:30:15 -07:00
Richard Jones
69ee3750b8
cue fmt
Signed-off-by: Richard Jones <richard@dagger.io>
2021-12-08 16:45:54 -07:00
Richard Jones
28cebb1bf0
added test
Signed-off-by: Richard Jones <richard@dagger.io>
2021-12-08 16:24:16 -07:00
Andrea Luzzardi
1872af9b18 tests: move compute tests away
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2021-12-08 15:30:41 -05:00
Andrea Luzzardi
5b7b1cab79 Migrate dagger.#Secret and dagger.#Stream to new format
- Refactored to keep every transformation of built-in types (e.g. FS,
  Secret, etc) to/from CUE in the same place (plancontext)
- dagger.#Service and dagger.#Secret are now following the new FS-like format
  (e.g. `_service: id: string`)
- Backward compatibility
- dagger.#Stream is now an alias for dagger.#Service

Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2021-12-01 17:33:35 -08:00
Andrea Luzzardi
a61e8dcb62 prepare the transition to #Plan.context
This change helps the transition between `dagger input` and `#Plan.context`.

In summary, the codebase now relies on a *context* for execution with mapping to *IDs*.
In the future, *context* will come from a `#Plan.context`.
In the meantime, a bridge converts `dagger input` to a plan context. This allows both *old* and *new* style configurations to co-exist with the same underlying engine.

- Implement `plancontext`. Context holds the execution context for a plan. Currently this includes the platform, local directories, secrets and services (e.g. unix/npipe).
- Contextual data can be registered at any point. In the future, this will be done by `#Plan.context`
- Migrated the `dagger input` codebase to register inputs in a `plancontext`
- Migrated low-level types/operations to the *Context ID* pattern.
  - `dagger.#Stream` now only includes an `id` (instead of `unix` path)
  - `dagger.#Secret` still includes only an ID, but now it's based off `plancontext`
  - `op.#Local` now only includes an `id` (instead of `path`, `include`, `exclude`.

Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2021-11-19 11:29:38 -08:00
Tom Chauveau
a63c4e989a
Change "arch" into "platform" because it's more accurate.
Signed-off-by: Tom Chauveau <tom.chauveau@epitech.eu>
2021-11-05 16:21:21 +01:00
Tom Chauveau
8a3a3028fb
Add tests on architecture configuration
Signed-off-by: Tom Chauveau <tom.chauveau@epitech.eu>
2021-10-22 22:25:06 +02:00
Andrea Luzzardi
d763976ea9 tests: convert tests to new style
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2021-10-20 12:27:31 -07:00
Andrea Luzzardi
dd1bf18ec2 logger: TTY logs support (live update)
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2021-10-05 15:38:34 -07:00
Guillaume de Rouville
a7ca7e11ba Fix/dagger edit: wrong dir Path leads to infinite loop
Signed-off-by: Guillaume de Rouville <guillaume.derouville@gmail.com>
2021-09-26 20:56:22 +02:00
Richard Jones
68f18887da
changed workspace to project for tests
Signed-off-by: Richard Jones <richard@dagger.io>
2021-09-23 12:07:09 -06:00
Andrea Luzzardi
0f4a55a482 socket -> stream
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2021-09-17 15:19:15 -07:00
Andrea Luzzardi
408f147fab socket: add tests
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2021-09-17 11:53:09 -07:00
Richard Jones
e86985da16 adjust test to account for the new hash
Signed-off-by: Richard Jones <richard@dagger.io>
2021-09-16 09:23:51 -06:00
Guillaume de Rouville
0273fead4d fix/bug: infinite loop non-existent input dir path
Signed-off-by: Guillaume de Rouville <guillaume.derouville@gmail.com>
2021-09-14 16:26:27 +02:00
Tom Chauveau
a00fbb0f68
Update op.#PushContainer test to use secrets
Signed-off-by: Tom Chauveau <tom.chauveau@epitech.eu>
2021-08-31 13:04:57 +02:00
Guillaume de Rouville
08f395b70d Add auth to Git.#Repository
Signed-off-by: Guillaume de Rouville <guillaume.derouville@gmail.com>
2021-08-27 15:58:55 +02:00
Guillaume de Rouville
3b0e3f6919 Move private repository tests + implement env helper function
Signed-off-by: Guillaume de Rouville <guillaume.derouville@gmail.com>
2021-08-27 14:41:31 +02:00
Guillaume de Rouville
6fe0ec367a dagger input bool implementation
Signed-off-by: Guillaume de Rouville <guillaume.derouville@gmail.com>
2021-08-24 16:07:28 +02:00
Sam Alba
cb746e165f
Merge pull request #891 from TomChv/fix/input-git-subdir
Fix input git subdir argument
2021-08-19 20:30:15 +02:00
Tom Chauveau
3c1c0f13f6
Improve dagger input UX (solve #874)
Add new argument `--show-optional` to `dagger input list`.
Now by default, `dagger input list` will only show required input.
To get all inputs (including those with default value), you can use
that new argument.

Test has been updated to support changes.

Signed-off-by: Tom Chauveau <tom.chauveau@epitech.eu>
2021-08-17 17:13:30 +02:00
Tom Chauveau
c637549b15
Fix input git to correctly handle subdir argument (solve #884)
Previously, the subdir argument wa ignored by dagger input git.
I've fix that behavior and add a test.

Signed-off-by: Tom Chauveau <tom.chauveau@epitech.eu>
2021-08-17 15:06:28 +02:00
Sam Alba
2e883ae47c test: implemented test for invalid input
Signed-off-by: Sam Alba <sam.alba@gmail.com>
2021-07-12 11:10:18 +02:00
Andrea Luzzardi
06b671a528 commit missing cue.mod
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2021-07-08 17:52:21 +02:00
Andrea Luzzardi
f58ee5811b universe vendoring
Rather than injecting universe at runtime, this change will vendor
alpha.dagger.io in `cue.mod` directly.

Fixes #700

Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2021-07-08 17:52:21 +02:00
Andrea Luzzardi
f8531fdb0b
Merge pull request #772 from aluzzardi/default-plan-dir
plan: default cue module to .
2021-07-07 17:34:23 +02:00