Commit Graph

2275 Commits

Author SHA1 Message Date
Tom Chauveau
a3b6940d0b
Improve version checking to also check universe
In the future, universe will not be embedded anymore in dagger,
instead, it will be remotely vendor from `dagger/universe` repository.

To make sure that users always use the latest universe version, the
version checking now also verify that universe is not outdated.
If universe needs an update, a message is printed to standard output.

Signed-off-by: Tom Chauveau <tom.chauveau@epitech.eu>
2021-10-29 17:18:45 +02:00
guillaume
3fb03cd2d7 Fix packages + Implement working tests
Signed-off-by: guillaume <guillaume.derouville@gmail.com>
2021-10-29 01:29:55 +02:00
dependabot[bot]
1b61f91486
build(deps): bump go.opentelemetry.io/otel from 1.0.1 to 1.1.0
Bumps [go.opentelemetry.io/otel](https://github.com/open-telemetry/opentelemetry-go) from 1.0.1 to 1.1.0.
- [Release notes](https://github.com/open-telemetry/opentelemetry-go/releases)
- [Changelog](https://github.com/open-telemetry/opentelemetry-go/blob/main/CHANGELOG.md)
- [Commits](https://github.com/open-telemetry/opentelemetry-go/compare/v1.0.1...v1.1.0)

---
updated-dependencies:
- dependency-name: go.opentelemetry.io/otel
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-10-28 19:33:36 +00:00
guillaume
8f6b3e95a8 Fix lint issues
Signed-off-by: guillaume <guillaume.derouville@gmail.com>
2021-10-28 17:58:18 +02:00
jffarge
40f132b77b Execute os file before Atoi execution
Signed-off-by: jffarge <slumbering.pierrot@gmail.com>
2021-10-28 17:20:41 +02:00
jffarge
0e3ca30189 remove comments
Signed-off-by: jffarge <slumbering.pierrot@gmail.com>
2021-10-28 17:20:41 +02:00
jffarge
04781f4e07 add more args for http container test
Signed-off-by: jffarge <slumbering.pierrot@gmail.com>
2021-10-28 17:20:41 +02:00
jffarge
b94b8c0c70 create http universe package
Signed-off-by: jffarge <slumbering.pierrot@gmail.com>
2021-10-28 17:20:41 +02:00
Tom Chauveau
0839cfd1d0
Change default architecture to linux/amd64
Signed-off-by: Tom Chauveau <tom.chauveau@epitech.eu>
2021-10-28 16:17:00 +02:00
guillaume
701be92dad Implement #Image
Signed-off-by: guillaume <guillaume.derouville@gmail.com>
2021-10-28 15:52:20 +02:00
guillaume
aac70c2f17 Implement Trivy Config && Trivy CLI
Signed-off-by: guillaume <guillaume.derouville@gmail.com>
2021-10-28 15:52:20 +02:00
jffarge
541d1a7032 init trivy universe
Signed-off-by: jffarge <slumbering.pierrot@gmail.com>
2021-10-28 15:52:20 +02:00
Sam Alba
fa334f4a86
Merge pull request #1076 from samalba/remote-stdlib
Support version constraints on remote modules
2021-10-26 14:54:52 -07:00
Sam Alba
258b321735
Merge pull request #1075 from dagger/dependabot/npm_and_yarn/website/sass-1.43.3
build(deps): bump sass from 1.42.1 to 1.43.3 in /website
2021-10-22 15:55:55 -07:00
Sam Alba
994a8034c5 state: force use of stdlib embed - temporarily until universe repo is ready
Signed-off-by: Sam Alba <samalba@users.noreply.github.com>
2021-10-22 15:41:14 -07:00
Sam Alba
5e6d1261f7 mod: lock the version of universe for updates of package
Signed-off-by: Sam Alba <samalba@users.noreply.github.com>
2021-10-22 15:37:28 -07: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
Tom Chauveau
e9de597654
Update dagger new cmd to specify architecture when creating an environment
Signed-off-by: Tom Chauveau <tom.chauveau@epitech.eu>
2021-10-22 21:54:18 +02:00
dependabot[bot]
6d311c7df5
build(deps): bump sass from 1.42.1 to 1.43.3 in /website
Bumps [sass](https://github.com/sass/dart-sass) from 1.42.1 to 1.43.3.
- [Release notes](https://github.com/sass/dart-sass/releases)
- [Changelog](https://github.com/sass/dart-sass/blob/main/CHANGELOG.md)
- [Commits](https://github.com/sass/dart-sass/compare/1.42.1...1.43.3)

---
updated-dependencies:
- dependency-name: sass
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-10-22 19:15:50 +00:00
Tom Chauveau
caa03a37cc
Update dagger engine to uses a given architecture instead of default one.
Check #1071 for more details

Signed-off-by: Tom Chauveau <tom.chauveau@epitech.eu>
2021-10-22 21:02:12 +02:00
Sam Alba
779dda1aca mod: added basic logging + context in sub libs
Signed-off-by: Sam Alba <samalba@users.noreply.github.com>
2021-10-22 11:02:34 -07:00
Sam Alba
d34bd86d99 mod: added unit tests for version constraint support
Signed-off-by: Sam Alba <samalba@users.noreply.github.com>
2021-10-22 10:00:21 -07:00
Sam Alba
cee8c91e50 mod: added support for version constraint when fetching a remote version
Signed-off-by: Sam Alba <samalba@users.noreply.github.com>
2021-10-21 17:50:18 -07:00
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
Sam Alba
bc3e8658ae
Merge pull request #1068 from aluzzardi/fix-localdirs
Fix local directory error handling
2021-10-20 17:38:36 -07:00
Andrea Luzzardi
e37f8c5e53 pipeline: analysis: ignore CUE errors
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2021-10-20 14:37:31 -07:00
Andrea Luzzardi
d01940b9a1 debug
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2021-10-20 13:10:11 -07:00
Andrea Luzzardi
6c48f8b7a9 pipeline: more explicit non-executable errors
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2021-10-20 12:27:58 -07: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
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
36f468577a
Merge pull request #1069 from samalba/fix-test-pkg
mod: fixed unit tests to match the new universe repo structure
2021-10-19 18:48:06 -07:00
Sam Alba
20ccf71654 mod: fixed unit tests to match the new universe repo structure
Signed-off-by: Sam Alba <sam.alba@gmail.com>
2021-10-19 17:48:09 -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
Sam Alba
3b71ecd7ad
Merge pull request #1060 from grouville/yarn-add-secrets
Add secrets to yarn.#Package
2021-10-18 20:47:16 -07:00
Andrea Luzzardi
3f8b21cd44
Merge pull request #1063 from dagger/dependabot/go_modules/golang.org/x/mod-0.5.1
build(deps): bump golang.org/x/mod from 0.4.2 to 0.5.1
2021-10-18 16:24:37 -07:00
dependabot[bot]
ed37b9c98e
build(deps): bump golang.org/x/mod from 0.4.2 to 0.5.1
Bumps [golang.org/x/mod](https://github.com/golang/mod) from 0.4.2 to 0.5.1.
- [Release notes](https://github.com/golang/mod/releases)
- [Commits](https://github.com/golang/mod/compare/v0.4.2...v0.5.1)

---
updated-dependencies:
- dependency-name: golang.org/x/mod
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-10-14 19:29:53 +00: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
Sam Alba
63bb368d08
Merge pull request #934 from tjovicic/vendoring-improved
Use package manager when vendoring stdlib
2021-10-13 20:30:17 -07:00
Sam Alba
fe83b578f6 state: disabled remote stdlib install (keep vendoring until migration is complete)
Signed-off-by: Sam Alba <sam.alba@gmail.com>
2021-10-13 15:25:57 -07:00
Sam Alba
e9ca8f38e6 Vendoring improved
* update dagger init with package manager downloading stdlib

Signed-off-by: Tihomir Jovicic <tihomir.jovicic.develop@gmail.com>

* split mod get and update functions

Signed-off-by: Tihomir Jovicic <tihomir.jovicic.develop@gmail.com>

* write to package checksum to dagger.sum when installing/updating

Signed-off-by: Tihomir Jovicic <tihomir.jovicic.develop@gmail.com>

* encure checksums are valid when compiling input

Signed-off-by: Tihomir Jovicic <tihomir.jovicic.develop@gmail.com>

* remove references to github.com/tjovicic in docs 1010 and 1011

Signed-off-by: Tihomir Jovicic <tihomir.jovicic.develop@gmail.com>

* refactor mod get command

Signed-off-by: Tihomir Jovicic <tihomir.jovicic.develop@gmail.com>

* update logic of moving dir when installing packages

Signed-off-by: Tihomir Jovicic <tihomir.jovicic.develop@gmail.com>

* fix linting errors

Signed-off-by: Tihomir Jovicic <tihomir.jovicic.develop@gmail.com>

* revert changes to 1010 docs

Signed-off-by: Tihomir Jovicic <tihomir.jovicic.develop@gmail.com>

* updating error log line in mod/get

Signed-off-by: Tihomir Jovicic <tihomir.jovicic.develop@gmail.com>

* fix ci tests when using vendoring

Signed-off-by: Tihomir Jovicic <tihomir.jovicic.develop@gmail.com>

* update alpha.dagger.io version to v0.1

Signed-off-by: Tihomir Jovicic <tihomir.jovicic.develop@gmail.com>

* fix mod repo test

Signed-off-by: Tihomir Jovicic <tihomir.jovicic.develop@gmail.com>

* return error if package already installed

Signed-off-by: Tihomir Jovicic <tihomir.jovicic.develop@gmail.com>

* remove already installed packages when installing

Signed-off-by: Tihomir Jovicic <tihomir.jovicic.develop@gmail.com>

* fix issue when vendoring stdlib

Signed-off-by: Tihomir Jovicic <tihomir.jovicic.develop@gmail.com>

* update mod command with filelock while installing

Signed-off-by: Tihomir Jovicic <tihomir.jovicic.develop@gmail.com>

* fix linting errors

Signed-off-by: Tihomir Jovicic <tihomir.jovicic.develop@gmail.com>

* fix path of mod lock file

Signed-off-by: Tihomir Jovicic <tihomir.jovicic.develop@gmail.com>

Co-authored-by: Tihomir Jovicic <tihomir.jovicic.develop@gmail.com>

Signed-off-by: Sam Alba <sam.alba@gmail.com>
2021-10-13 15:25:30 -07:00
Andrea Luzzardi
31255f75ad
Merge pull request #1055 from dagger/dependabot/npm_and_yarn/website/cypress-8.6.0
build(deps-dev): bump cypress from 8.5.0 to 8.6.0 in /website
2021-10-13 10:54:34 -07:00
Andrea Luzzardi
ed3bb775cd
Merge pull request #1050 from dagger/dependabot/docker/golang-1.16.9-alpine
build(deps): bump golang from 1.16.8-alpine to 1.16.9-alpine
2021-10-13 10:54:13 -07:00
Andrea Luzzardi
16b14524d5
Merge pull request #1056 from aluzzardi/docker-load
Support loading artifacts into a Docker Engine
2021-10-12 17:51:51 -07: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
e5c571b8a9 op.#SaveImage: fix data race
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2021-10-12 16:05:43 -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
dependabot[bot]
b51ad0021e
build(deps-dev): bump cypress from 8.5.0 to 8.6.0 in /website
Bumps [cypress](https://github.com/cypress-io/cypress) from 8.5.0 to 8.6.0.
- [Release notes](https://github.com/cypress-io/cypress/releases)
- [Changelog](https://github.com/cypress-io/cypress/blob/develop/.releaserc.base.js)
- [Commits](https://github.com/cypress-io/cypress/compare/v8.5.0...v8.6.0)

---
updated-dependencies:
- dependency-name: cypress
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-10-12 19:22:39 +00:00