Adds the ability to select a template which will create a new file
in the CWD with the template name. Templates present in the
"cmd/dagger/project/templates" directory are automatically embedded in the dagger
binary when building and then listed in the `dagger project init` help output.
Usage:
dagger project init -t <template_name>
One idea that we had while pairing on this is to eventually try
improving this UX by extending the `dagger project` command by adding
sub-commands like `dagger project templates [list, new, output, ...]`.
Pair: gerhard
Signed-off-by: Marcos Lilljedahl <marcosnils@gmail.com>
Before this change, if BUILDKIT_HOST was set to an invalid value that
resulted in the connection of the grpc client to the server to fail,
then deadlock occured waiting for the `eventsCh` to be closed.
This happened because the call to the buildkit client's Build method
returned an error before the provided callback was executed, which is
where the `eventsCh` gets closed.
This change places the creation of `eventsCh` inside the Build callback,
which avoids the increment of the WaitGroup and thus the deadlock in
this error path.
Signed-off-by: Erik Sipsma <erik@sipsma.dev>
This commit adds a global --experiemntal flag so we can start
gatekeeping some features where we know beforehand that the UX will very
likely change. It also refactors the current --platform flag to be
avaiable under this experimental flag for the moment
Signed-off-by: Marcos Lilljedahl <marcosnils@gmail.com>
Add an --experimental-platform flag to the do command to allow
overriding the default auto-detected build platform until we find the
time to think about the definitive multi-platform builds UX
Signed-off-by: Marcos Lilljedahl <marcosnils@gmail.com>
Errors out in the PreRun phase of the clientfilesystemreader task since
otherwise, dagger execution would hang
Fixes#1977
Signed-off-by: Marcos Lilljedahl <marcosnils@gmail.com>
Resolve#1551 and #1020.
We are never returning the result of solved operations so Buildkit could not
cache the layer.
This commit implements a simple system to forward operations' result to the
main build to cache it.
Signed-off-by: Vasek - Tom C <tom.chauveau@epitech.eu>
This commit enables PR's to run inegration tests by relying on keys with
only the necessary permissions to run on CI workloads
Signed-off-by: Marcos Lilljedahl <marcosnils@gmail.com>