Commit Graph

375 Commits

Author SHA1 Message Date
Andrea Luzzardi
d8193e55f1 tests: add test AWS config
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2021-04-21 11:03:32 -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
Tom Chauveau
46b8b92002 misc(README): update README.md to use bats tests
Signed-off-by: Tom Chauveau <tom.chauveau@epitech.eu>
2021-04-16 22:27:26 +02:00
Tom Chauveau
b691c95f2c fix(tests): Improve the verification of local kubernetes cluster to ignore "kind: Config" field of kubeconfig
fix(tests): Update documentation
fix(tests): Enable kubernetes tests

Signed-off-by: Tom Chauveau <tom.chauveau@epitech.eu>
2021-04-16 16:10:58 +02:00
Andrea Luzzardi
feda737d71 tests: convert stdlib to bats
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2021-04-15 16:09:19 -07:00
Andrea Luzzardi
ce2e00cfa2 tests: migrate compute tests to bats
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2021-04-15 15:55:51 -07:00
Andrea Luzzardi
1ac0041c53 test: react example: use dagger up instead of compute
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2021-04-15 15:09:39 -07:00
Andrea Luzzardi
14ca028918
Merge pull request #332 from dagger/dagger-inputs
support yaml and json inputs
2021-04-15 14:59:43 -07:00
Andrea Luzzardi
46ab44a69f input: support file/stdin source for text/json/yaml
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2021-04-15 13:04:52 -07:00
Andrea Luzzardi
6f57ed1b9d input: support yaml and json inputs
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2021-04-15 13:04:52 -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
cfa9f08bc9 tests: added test to ensure an op.#Exec with no cache will not execute twice
Signed-off-by: Sam Alba <sam.alba@gmail.com>
2021-04-15 12:10:14 -07:00
Tom Chauveau
32d523aa71 tests(stdlib/k8s/helm): test basic helm chart
tests(stdlib/k8s/helm): add verification
style(tests/): rename helper into verify to confirm that deployments works

Signed-off-by: Tom Chauveau <tom.chauveau@epitech.eu>
2021-04-15 14:24:42 +02:00
Tom Chauveau
e19a71e67c tests(stdlib): add kubernetes in testing suite
tests(stdlib/kubernetes): add kubernetes basic Apply test

Signed-off-by: Tom Chauveau <tom.chauveau@epitech.eu>
2021-04-15 12:37:32 +02:00
Andrea Luzzardi
d46be324e5 tests: improve bats/gh integration
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2021-04-15 00:48:49 -07:00
Andrea Luzzardi
fb2e140b91 tests: convert react example test to bats
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2021-04-14 17:19:53 -07:00
Andrea Luzzardi
1f640d3e25 tests: ops: use proper imports
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2021-04-14 16:44:34 -07:00
Andrea Luzzardi
381db37ca3 tests: migrate ops test to bats
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2021-04-14 16:15:04 -07:00
Andrea Luzzardi
e7458e9ca2 tests: use bats for integration tests
Converted the CLI tests to using bats to get started

Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2021-04-14 15:18:34 -07:00
Sam Alba
5d22e9ed43 stdlib: updated alpine base image and fixed pkg dependencies in sub libs
Signed-off-by: Sam Alba <sam.alba@gmail.com>
2021-04-14 14:06:51 -07:00
Sam Alba
8e5024db37 fix alpine test + only select major versions for aws pkgs
Signed-off-by: Sam Alba <sam.alba@gmail.com>
2021-04-14 13:54:21 -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
a92423f186 tests: fix react example test
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2021-04-08 18:48:23 -07:00
Andrea Luzzardi
65ebbc8ecb tests: add query tests
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2021-04-08 18:38:18 -07:00
Andrea Luzzardi
43a34f0b04 tests: re-enable CLI tests, use the brand new query
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2021-04-08 18:11:15 -07:00
Solomon Hykes
ee621590ff stdlib: dagger.io/js/react
Signed-off-by: Solomon Hykes <sh.github.6811@hykes.org>
2021-04-07 16:28:39 -07:00
Solomon Hykes
6673ae69b3 stdlib: rename dagger.io/llb to dagger.io/dagger/op
Signed-off-by: Solomon Hykes <sh.github.6811@hykes.org>
2021-04-06 10:28:40 -07:00
Sam Alba
21e0ac21de fixed tests
Signed-off-by: Sam Alba <sam.alba@gmail.com>
2021-04-02 17:16:57 -07:00
Sam Alba
e6b0ca5109 cue fmt
Signed-off-by: Sam Alba <sam.alba@gmail.com>
2021-04-02 16:47:49 -07:00
Sam Alba
b12a3bf45f test: implemented cli tests for input git,dir
Signed-off-by: Sam Alba <sam.alba@gmail.com>
2021-04-02 16:47:49 -07:00
Sam Alba
f5afb97d03 test: implemented cli test for plan *
Signed-off-by: Sam Alba <sam.alba@gmail.com>
2021-04-02 16:47:22 -07:00
Sam Alba
8bb2cfbb21 test: added cli test for new --plan-git
Signed-off-by: Sam Alba <sam.alba@gmail.com>
2021-04-02 16:47:22 -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
c16455249e cue files: #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
Andrea Luzzardi
98c4dc790c tests: SUITE=all, SUITE=name, SUITE=-name
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2021-04-01 19:13:08 -07:00
Andrea Luzzardi
b229119a3d tests: split integration tests
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2021-04-01 18:46:08 -07:00
Andrea Luzzardi
429820036f tests: add basic cli tests
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2021-04-01 16:46:05 -07:00
Solomon Hykes
e701de01c1 Improve react example
Signed-off-by: Solomon Hykes <sh.github.6811@hykes.org>
2021-04-01 14:46:39 -07:00
Andrea Luzzardi
8917017e16 tests: move input inside compute
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2021-03-31 19:15:48 -07:00
Andrea Luzzardi
4b682a8e3f tests: reorganize test suite
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2021-03-31 19:04:37 -07:00
Andrea Luzzardi
93296fa358 tests: move llb tests into tests/llb
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2021-03-31 18:49:53 -07:00
Andrea Luzzardi
f1bf58ed86 tests: fix invalid dockerbuild test
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2021-03-31 18:34:23 -07:00
Sam Alba
3aec0337d2 tests: fixed invalid test
Signed-off-by: Sam Alba <sam.alba@gmail.com>
2021-03-31 18:10:20 -07:00
Andrea Luzzardi
cba524eb0f merge Route into Env, rebase dagger compute to use the new API
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2021-03-25 22:29:11 +00:00
Andrea Luzzardi
d351b0086a debug
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2021-03-18 18:37:45 -07:00
Andrea Luzzardi
fbdfe27103 stdlib: netlify: export the deployUrl and logsUrl
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2021-03-18 18:37:45 -07:00
Andrea Luzzardi
5438e4177c stdlib: add tests for netlify
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2021-03-18 18:37:45 -07:00
Andrea Luzzardi
657b100ff1 ci: test react-netlify using secrets
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2021-03-18 18:37:45 -07:00
Andrea Luzzardi
87d576e936 ci: remove git-crypt, switch to sops
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2021-03-18 18:37:45 -07:00
Tony Worm
3dab86694e impl test, log patterns when .daggerignore found, lint, fix stdlib/file test imports
Signed-off-by: Tony Worm <tony@hofstadter.io>
2021-03-18 12:38:50 -04:00
Tony Worm
a1ba7aa59c implement .daggerignore
Signed-off-by: Tony Worm <tony@hofstadter.io>
2021-03-17 19:55:28 -04:00
Solomon Hykes
54a2fe4393 stdlib package: llb
Signed-off-by: Solomon Hykes <sh.github.6811@hykes.org>
2021-03-15 22:25:18 -07:00
Tony Worm
b1b534992a fix lint errors
Signed-off-by: Tony Worm <tony@hofstadter.io>
2021-03-15 22:08:54 -07:00
Tony Worm
0e32bc68f8 add file ops
Signed-off-by: Tony Worm <tony@hofstadter.io>
2021-03-15 22:08:54 -07:00
Solomon Hykes
6460a5c9fc Rename dagger.#Dir to dagger.#Artifact
Signed-off-by: Solomon Hykes <sh.github.6811@hykes.org>
2021-03-13 00:11:59 -08:00
Andrea Luzzardi
b04c046234 test: lint cue test files
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2021-03-12 18:12:58 -08:00
Andrea Luzzardi
657ba7ce34
Merge pull request #175 from dagger/test-push
test: PushContainer
2021-03-12 18:12:01 -08:00
Solomon Hykes
1f874025aa Improve examples using go & docker stdlib packages
Signed-off-by: Solomon Hykes <sh.github.6811@hykes.org>
2021-03-12 18:10:36 -08:00
Andrea Luzzardi
e7ecc87631 ci: login to dockerhub
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2021-03-12 17:12:55 -08:00
Andrea Luzzardi
9887166c71 test: add push-container
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2021-03-12 17:12:55 -08:00
Andrea Luzzardi
9725b8de69 test: add secrets for testing
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2021-03-12 17:03:22 -08:00
Sam Alba
3f55f4cd1d ported tests + examples to new syntax
Signed-off-by: Sam Alba <sam.alba@gmail.com>
2021-03-10 13:51:03 -08:00
Tony Worm
0d3aace2b9 test.sh: fix relpath to dagger, enable stdlib/{go,yarn} tests
Signed-off-by: Tony Worm <tony@hofstadter.io>
2021-03-08 11:05:57 -05:00
Solomon Hykes
7a77466a66 DX: change "#dagger: compute: " to "#compute: "
Signed-off-by: Solomon Hykes <sh.github.6811@hykes.org>
2021-03-06 19:39:22 -08:00
Sam Alba
3f445f2421
Merge pull request #158 from dagger/fix-mount-tmpfs
Fix mount tmpfs
2021-03-04 18:32:28 -08:00
Sam Alba
aef0139920 implemented tmpfs mount test
Signed-off-by: Sam Alba <sam.alba@gmail.com>
2021-03-04 14:06:48 -08:00
Andrea Luzzardi
81cdccf541 basic tests for alpine go and yarn
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2021-03-04 11:31:00 -08:00
Andrea Luzzardi
39a7ebd176 tests: enable mount cache test, fix mount component test
Related to #46

Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2021-03-01 18:20:54 -08:00
Andrea Luzzardi
bc2dae7e32 docker build support
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2021-02-22 14:14:51 -08:00
Andrea Luzzardi
579908dbfa tests: add test for examples/simple
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2021-02-18 18:48:49 -08:00
Andrea Luzzardi
3ab0563e80 cue module is now dagger.io
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2021-02-17 13:21:41 -08:00
Solomon Hykes
acba8b3988 Simplify runtime code by removing layers of abstraction
- Remove intermediary types `Component`, `Script`, `Op`, `mount`: just use
  `cc.Value` directly
- Remove `Executable` interface.
- Execute llb code with a simple concrete type `Pipeline`
- Analyze llb code with a simple utility `Analyze`

Signed-off-by: Solomon Hykes <sh.github.6811@hykes.org>
2021-02-12 22:20:20 +00:00
Solomon Hykes
622de21883 {do:"subdir"} to select a subdirectory in a script
Signed-off-by: Solomon Hykes <sh.github.6811@hykes.org>
2021-02-05 15:27:37 -08:00
Andrea Luzzardi
89c7136f75 tests: move tests top-level
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2021-02-03 15:02:43 -08:00