Commit Graph

419 Commits

Author SHA1 Message Date
Sam Alba
428aca1c03
Merge pull request #1070 from jhult/cue-repo-link
Link to new CUE GitHub repository
2021-10-20 17:39:05 -07:00
Andrea Luzzardi
d01940b9a1 debug
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2021-10-20 13:10:11 -07:00
Jonathan Hult
d0e7d9b564
Link to new CUE GitHub repository
https://github.com/cue-lang/cue/issues/1078

Signed-off-by: Jonathan Hult <Jonathan@JonathanHult.com>
2021-10-20 14:49:26 -04:00
Andrea Luzzardi
c08f619b02 Fix local directory error handling
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2021-10-20 11:38:42 -07:00
Sam Alba
aa491ae67c
Merge pull request #1049 from PaulBarrie/feature/aws/add-cli-v2
Feature:  allow to use AWS CLI v2
2021-10-18 20:48:21 -07:00
guillaume
de8cd3a52a Add secrets for secure mount of .env local files inside Dagger
Signed-off-by: guillaume <guillaume.derouville@gmail.com>
2021-10-14 13:34:58 +02:00
Andrea Luzzardi
322997b74a stdlib: docker: clean up docker.#Command inputs
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2021-10-12 17:10:46 -07:00
Andrea Luzzardi
b2c4fea73d tests: add docker load test
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2021-10-12 15:39:04 -07:00
Andrea Luzzardi
50d55a8885 op.#SaveImage: export the image ID
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2021-10-12 15:39:04 -07:00
Andrea Luzzardi
5a1d4bff62 Support loading artifacts into a Docker Engine
This adds support to loading artifacts (e.g. docker.#Build,
os.#Container, ...) into any arbitrary docker engine (through a
dagger.#Stream for UNIX sockets or SSH for a remote engine)

Implementation:
- Add op.#SaveImage which serializes an artifact into an arbitrary path
  (docker tarball format)
- Add docker.#Load which uses op.#SaveImage to serialize to disk and
  executes `docker load` to load it back

Caveats: Because we're doing this in userspace rather than letting
dagger itself load the image, the performance is pretty bad.

The buildkit API is meant for streaming (get a stream of a docker image
pipe it into docker load). Because of userspace, we have to load the
entire docker image into memory, then serialize it in a single WriteFile
LLB operation.

Example:

```cue
package main

import (
	"alpha.dagger.io/dagger"
	"alpha.dagger.io/docker"
)

source: dagger.#Input & dagger.#Artifact

dockersocket: dagger.#Input & dagger.#Stream

build: docker.#Build & {
	"source": source
}

load: docker.#Load & {
	source: build
	tag:    "testimage"
	socket: dockersocket
}
```

Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2021-10-12 14:16:01 -07:00
paulb
7d9db41f4b feat: allow use of v2 AWS CLI
Signed-off-by: paulb <barrie.paul@protonmail.com>
2021-10-08 17:43:54 +02: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
ce02caff51 Improve/git: Git.#Repository's origin now uses the provided URL
Signed-off-by: Guillaume de Rouville <guillaume.derouville@gmail.com>
2021-10-04 16:45:34 +02:00
Richard Jones
4a21475b1e
one last var needed quotes
Signed-off-by: Richard Jones <richard@dagger.io>
2021-09-28 10:00:26 -06:00
Richard Jones
d63ac607a4
added quotes to fix GHA
Signed-off-by: Richard Jones <richard@dagger.io>
2021-09-28 09:52:49 -06:00
Richard Jones
d496b77c71
added test for docker run with ports
Signed-off-by: Richard Jones <richard@dagger.io>
2021-09-28 09:33:02 -06:00
Richard Jones
c04ef323d2
cue fmt
Signed-off-by: Richard Jones <richard@dagger.io>
2021-09-27 20:40:55 -06:00
Richard Jones
9f16bcdadb added ports to docker.#Run
Signed-off-by: Richard Jones <richard@dagger.io>
2021-09-27 20:39:28 -06:00
Sam Alba
9c32c8a564
Merge pull request #1010 from talentedmrjones/rename-workspace-flag
Rename workspace to project including flag, references, and tests
2021-09-23 16:01:26 -07:00
Sam Alba
b5f2f65bfd
Merge pull request #1008 from grouville/fix/netlify
Fix/Netlify package: reinsert always:true
2021-09-23 15:31:44 -07:00
Sam Alba
e757af6706
Merge pull request #980 from VazeeKevin/tasks/docker-args-secrets
Add #Secret type to Docker #Build args
2021-09-23 15:31:03 -07:00
Sam Alba
9120c52545
Merge pull request #1003 from samalba/docker-run-local
Docker run local
2021-09-23 15:28:26 -07: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
Guillaume de Rouville
512b7f722b Fix/Netlify package: reinsert always:true
Signed-off-by: Guillaume de Rouville <guillaume.derouville@gmail.com>
2021-09-23 19:24:48 +02:00
Kevin Poirot
51f96172bd Add #Secret type to Docker #Build args
Signed-off-by: Kevin Poirot <kevin@vazee.fr>
2021-09-23 11:13:59 +02:00
Guillaume de Rouville
240ee6b318 fix ecr typo on localMode
Signed-off-by: Guillaume de Rouville <guillaume.derouville@gmail.com>
2021-09-23 00:14:44 +02:00
Tom Chauveau
016e3764f1
Update Github PAT for CI
Signed-off-by: Tom Chauveau <tom.chauveau@epitech.eu>
2021-09-22 21:38:40 +02:00
Tom Chauveau
7991991a3c
Update documentation
Signed-off-by: Tom Chauveau <tom.chauveau@epitech.eu>
2021-09-22 20:29:20 +02:00
Tom Chauveau
56083ed3d0
helm #Chart definition now support secret kubeconfig
Signed-off-by: Tom Chauveau <tom.chauveau@epitech.eu>
2021-09-22 19:11:23 +02:00
Tom Chauveau
1f5a9a9fa9
kubernetes #Resources definition now support secret kubeconfig
Signed-off-by: Tom Chauveau <tom.chauveau@epitech.eu>
2021-09-22 19:11:04 +02:00
Sam Alba
4ccf030db8 stdlib: tests local docker socket
Signed-off-by: Sam Alba <sam.alba@gmail.com>
2021-09-21 17:21:32 -07:00
Sam Alba
eaa965127a stdlib: added support for local docker socket
Signed-off-by: Sam Alba <sam.alba@gmail.com>
2021-09-21 17:19:00 -07:00
Andrea Luzzardi
fb7cb95b06
Merge pull request #986 from aluzzardi/socket-support
dagger.#Stream support
2021-09-20 11:08:06 -07:00
Andrea Luzzardi
0f4a55a482 socket -> stream
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2021-09-17 15:19:15 -07:00
Andrea Luzzardi
5480fb991d dagger.#Socket support
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2021-09-17 11:53:09 -07:00
Sam Alba
12e457e9e9
Merge pull request #971 from VazeeKevin/tasks/improve-stdlib-docker
stdlib/docker: update #Build to incorporate image from Dockerfile
2021-09-16 17:50:28 -07:00
Kevin Poirot
a364307f0e Add test build with args to Docker #Build
Signed-off-by: Kevin Poirot <kevin@vazee.fr>
2021-09-15 10:48:17 +02:00
Kevin Poirot
3e14920062 Update Docker #Build to incorporate image from Dockerfile
Signed-off-by: Kevin Poirot <kevin@vazee.fr>
2021-09-15 08:55:59 +02:00
Guillaume de Rouville
46362ed247 Add zone in GCP.#Config
Signed-off-by: Guillaume de Rouville <guillaume.derouville@gmail.com>
2021-09-14 13:43:31 +02:00
Scott
8e2dea148b stdlib: Update gcp.#GCloud to set compute/region instead of compute/zone
If a users correctly sets `region` to a valid GCP region, a warning would be
presented (but is hidden by `-q`):

```
) gcloud config set compute/zone asia-northeast1
Updated property [compute/zone].
WARNING: asia-northeast1 is not a valid zone. Run `gcloud compute zones list` to get all zones.
```

This makes it consistent with AWS where a region is set. However, an optional
`zone` field could also be added to `gcp.#Config`, which would be used to
(conditionally?) set the zone.

AFAICT, there is no option to set a zone in AWS CLI.

Signed-off-by: Scott <slewiskelly@slewiskel.ly>
2021-09-14 12:13:27 +02:00
Sam Alba
4d45e269e0
Merge pull request #967 from VazeeKevin/tasks/docker-build-args
stdlib/docker: Add args option to Docker #Build
2021-09-13 15:26:09 -07:00
Sujay Pillai
48560b4546 Adding support for azure static webapp
Signed-off-by: Sujay Pillai <sujayopillai@gmail.com>
2021-09-13 10:39:20 -07:00
Sujay Pillai
439fb4ee82 Adding support for azure static webapp
Signed-off-by: Sujay Pillai <sujayopillai@gmail.com>
2021-09-13 10:39:18 -07:00
Kevin Poirot
924fd163eb Add args option to Docker #Build
Signed-off-by: Kevin Poirot <kevin@vazee.fr>
2021-09-13 14:38:20 +02:00
Sam Alba
af1d06f503
Merge pull request #945 from benja-M-1/feat/gcp-secrets
Add secrets deployment for GCP
2021-09-10 11:09:25 -07:00
Tom Chauveau
fede72db58 Update environment SOPS Key to use CI key
Signed-off-by: Tom Chauveau <tom.chauveau@epitech.eu>
2021-09-10 09:21:34 -07:00
Benjamin Grandfond
45ea30da55 Add secrets deployment for GCP
Signed-off-by: Benjamin Grandfond <benjamin.grandfond@gmail.com>
2021-09-10 09:21:34 -07:00
Tom Chauveau
733cac09d3 argocd.#Sync now retrieve status
Signed-off-by: Tom Chauveau <tom.chauveau@epitech.eu>
2021-09-10 09:10:21 -07:00
Tom Chauveau
ef112e21ec Fix caching issue on argoCD package
Signed-off-by: Tom Chauveau <tom.chauveau@epitech.eu>
2021-09-10 09:10:21 -07:00
Tom Chauveau
05b165bcc8 Supports both basicAuth & Token
Signed-off-by: Tom Chauveau <tom.chauveau@epitech.eu>
2021-09-10 09:10:21 -07:00
Tom Chauveau
d34200c9f6 Fix CI check
Signed-off-by: Tom Chauveau <tom.chauveau@epitech.eu>
2021-09-10 09:10:21 -07:00
Kevin Poirot
083fee85a5 Fix ArgoCD outputs parse
Signed-off-by: Kevin Poirot <kevin@vazee.fr>
2021-09-10 09:10:21 -07:00
Tom Chauveau
0fe8b14e78 Improve ArgoCD and fix CI
Signed-off-by: Tom Chauveau <tom.chauveau@epitech.eu>
2021-09-10 09:10:21 -07:00
Tom Chauveau
2a91ae1d80 Update argoCD test
Signed-off-by: Tom Chauveau <tom.chauveau@epitech.eu>
2021-09-10 09:10:21 -07:00
Tom Chauveau
a73b34d096 Add argocd-infra deployment to deploy it to a cluster
Signed-off-by: Tom Chauveau <tom.chauveau@epitech.eu>
2021-09-10 09:10:21 -07:00
Tom Chauveau
b136cdcaaf Split definition into files and add #App to create argocd project
Signed-off-by: Tom Chauveau <tom.chauveau@epitech.eu>
2021-09-10 09:10:05 -07:00
Tom Chauveau
f038e11fc5 Update argoCD test file to use os.#Container
Signed-off-by: Tom Chauveau <tom.chauveau@epitech.eu>
2021-09-10 09:10:05 -07:00
Tom Chauveau
7299cb4d1d Update argoCD environment with CI key
Signed-off-by: Tom Chauveau <tom.chauveau@epitech.eu>
2021-09-10 09:10:05 -07:00
Kevin Poirot
f8f39ca75b stdlib: argocd app support
Signed-off-by: Kevin Poirot <kevin@vazee.fr>
2021-09-10 09:10:03 -07:00
Tom Chauveau
c05f7d50d4
Update kubernetes testing policy to test deployment from url
Signed-off-by: Tom Chauveau <tom.chauveau@epitech.eu>
2021-09-06 16:25:51 +02:00
Tom Chauveau
97cd00332a
Improve kubernetes package to handle deployment from url
When I was working on ArgoCD test integration, I found
that to expose ArgoCD server, we need to add `ingress`
to expose an endpoint.

To do it with Kind, it's necessary to apply a custom yaml
available on Github. It simply then need `kubectl apply -f <url>`

Signed-off-by: Tom Chauveau <tom.chauveau@epitech.eu>
2021-09-06 15:17:38 +02:00
Benjamin Grandfond
830ad87ced Add env var support on GCP cloudrun
Signed-off-by: Benjamin Grandfond <benjamin.grandfond@gmail.com>
2021-09-05 20:54:53 +02:00
Guillaume de Rouville
9448fba997 Fix structural cycle error
Signed-off-by: Guillaume de Rouville <guillaume.derouville@gmail.com>
2021-09-03 02:29:31 +02:00
Tom Chauveau
95040d8320 Improve git package according to Sam comments
Signed-off-by: Tom Chauveau <tom.chauveau@epitech.eu>
2021-09-03 02:29:31 +02:00
Tom Chauveau
4ad2c8e7e5 Add test on git.#Commit
Signed-off-by: Tom Chauveau <tom.chauveau@epitech.eu>
2021-09-03 02:29:31 +02:00
Tom Chauveau
c8e3755188 Add git.#Commit definition and git.#Image
This definition allow user to commit & push new content to repository.
I've also add a quick feature to os.#Container to write files.

Signed-off-by: Tom Chauveau <tom.chauveau@epitech.eu>
2021-09-03 02:29:31 +02:00
Tom Chauveau
019b56891d Update old git test
Signed-off-by: Tom Chauveau <tom.chauveau@epitech.eu>
2021-09-03 02:29:31 +02:00
Sam Alba
28eb785203
Merge pull request #929 from TomChv/feat/docker-secret
op.#PushContainer secret management
2021-09-01 15:27:07 -07:00
Guillaume de Rouville
3453675a3f rebase merge conflicts fix
Signed-off-by: Guillaume de Rouville <guillaume.derouville@gmail.com>
2021-09-01 12:14:57 +02:00
Guillaume de Rouville
99d2494033 Fix localstack setup issue on local run
Signed-off-by: Guillaume de Rouville <guillaume.derouville@gmail.com>
2021-09-01 11:20:51 +02:00
Sam Alba
2d30e3e9ef
Merge pull request #931 from grouville/localstack/fix-input-bool-type
localstack tests: convert back str input to bool type
2021-08-31 09:23:46 -07:00
Guillaume de Rouville
6360ccc92b localstack/fix-input-bool-type: change localstack test input from str to bool
Signed-off-by: Guillaume de Rouville <guillaume.derouville@gmail.com>
2021-08-31 17:51:56 +02:00
Tom Chauveau
eabf1b52e5
Update docker push tests
Signed-off-by: Tom Chauveau <tom.chauveau@epitech.eu>
2021-08-31 14:44:06 +02:00
Guillaume de Rouville
74b1ac3632 ci: re-enable localstack tests
Signed-off-by: Guillaume de Rouville <guillaume.derouville@gmail.com>
2021-08-31 14:39:45 +02:00
Tom Chauveau
7cc1c8e5dd
Update docker package according to op.#PushContainer improvement
Signed-off-by: Tom Chauveau <tom.chauveau@epitech.eu>
2021-08-31 13:05:22 +02:00
Tom Chauveau
a9fd97d7fe
Handle secrets in DockerLogin operation
Before, secret was a plain text string, but it could lead to security issue
so we are now handling secrets as `dagger.#Secret` or string.
I've add a new struct SecretStore that expose the inputStore to easily
retrieve secret value.

Signed-off-by: Tom Chauveau <tom.chauveau@epitech.eu>
2021-08-31 13:04:16 +02:00
Sam Alba
4213491ad8 ci: disabled localstack tests temporarily
Signed-off-by: Sam Alba <sam.alba@gmail.com>
2021-08-30 14:03:04 -07: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
Tom Chauveau
a987d1dc34 Add test on op.#FetchGit for private repository
Signed-off-by: Tom Chauveau <tom.chauveau@epitech.eu>
2021-08-27 14:41:31 +02:00
Tom Chauveau
d7194f161d Add secret management to op.#FetchGit operation to fetch private repository
- Update `op.cue` to support secrets
- Update `pipeline.go` to use authTokenSecret & authHeaderSecret

Signed-off-by: Tom Chauveau <tom.chauveau@epitech.eu>
2021-08-27 14:41:31 +02:00
Guillaume de Rouville
a2ef5dc6e0 Add cleanup and setup of Localstack instances on local mode
Signed-off-by: Guillaume de Rouville <guillaume.derouville@gmail.com>
2021-08-23 17:44:34 +02:00
Guillaume de Rouville
58209b87d1 Doc update + linting + fix CI typo + fix port issue ECR
Signed-off-by: Guillaume de Rouville <guillaume.derouville@gmail.com>
2021-08-23 17:44:34 +02:00
Guillaume de Rouville
a7189084c0 Update Helpers.bash - Universe.bats
Signed-off-by: Guillaume de Rouville <guillaume.derouville@gmail.com>
2021-08-23 17:44:34 +02:00
Guillaume de Rouville
e29bdfb422 ECR: Implement localstack env
Signed-off-by: Guillaume de Rouville <guillaume.derouville@gmail.com>
2021-08-23 17:44:34 +02:00
Guillaume de Rouville
68707d93ae S3: Implement localstack env
Signed-off-by: Guillaume de Rouville <guillaume.derouville@gmail.com>
2021-08-23 17:44:33 +02:00
Guillaume de Rouville
a33a4f4749 AWS - Implement backward compatible localstack
Signed-off-by: Guillaume de Rouville <guillaume.derouville@gmail.com>
2021-08-23 17:44:33 +02:00
Tom Chauveau
970a1988eb
Remove skip for docker.#Push tests
Signed-off-by: Tom Chauveau <tom.chauveau@epitech.eu>
2021-08-20 14:08:34 +02:00
Sujay Pillai
7481294a8c Adding support for azure storage
Signed-off-by: Sujay Pillai <sujayopillai@gmail.com>
2021-08-17 17:23:01 +08:00
Sam Alba
1e7c3cbc15
Merge pull request #881 from sujaypillai/azure-cli
Adding support for azure and create a resource group
2021-08-13 22:54:46 +02:00
Sam Alba
35fb7e0cfc stdlib/aws/s3: replaced sync with cp by default to avoid cache issues
Signed-off-by: Sam Alba <sam.alba@gmail.com>
2021-08-13 13:37:24 -07:00
Sujay Pillai
a99fc52eeb Amending changes from @TomChv
Signed-off-by: Sujay Pillai <sujayopillai@gmail.com>
2021-08-12 01:44:03 +08:00
Sujay Pillai
d74753bca7 Amending changes from @TomChv
Signed-off-by: Sujay Pillai <sujayopillai@gmail.com>
2021-08-12 01:37:17 +08:00
Guillaume de Rouville
bdd6b5a56e Port azure.#CLI from up to os.#Container + manual testing + integrate bats test
Signed-off-by: Guillaume de Rouville <guillaume.derouville@gmail.com>
2021-08-11 16:39:35 +02:00
Sujay Pillai
5908aa628e Adding support for azure and create a resource group
Signed-off-by: Sujay Pillai <sujayopillai@gmail.com>
2021-08-11 01:20:16 +08:00
Andrea Luzzardi
db459ae04d os.#Container: inherit PATH from the container image
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2021-08-04 16:56:52 +02:00
Guillaume de Rouville
9f90aca2b7 op.#Exec hack: improve performance by 100x on big configs
Signed-off-by: Guillaume de Rouville <guillaume.derouville@gmail.com>
2021-07-29 16:37:47 +02:00
Andrea Luzzardi
04d8e25e4d
Merge pull request #788 from grouville/fix-git-package
git package - add keepGitDir option
2021-07-28 18:32:22 +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