dagger.#FS support
- Implement dagger.#FS support - Migrate `context.imports` to dagger.#FS - Backward compat: dagger.#FS can be passed in lieu of a dagger.#Artifact - For instance, an import (`dagger.#FS`) can be passed to the current `yarn.#Package` implementation Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
This commit is contained in:
@@ -5,6 +5,16 @@ import (
|
||||
"alpha.dagger.io/dagger/op"
|
||||
)
|
||||
|
||||
// A reference to a filesystem tree.
|
||||
// For example:
|
||||
// - The root filesystem of a container
|
||||
// - A source code repository
|
||||
// - A directory containing binary artifacts
|
||||
// Rule of thumb: if it fits in a tar archive, it fits in a #FS.
|
||||
#FS: {
|
||||
_fs: id: string
|
||||
}
|
||||
|
||||
// An artifact such as source code checkout, container image, binary archive...
|
||||
// May be passed as user input, or computed by a buildkit pipeline
|
||||
#Artifact: {
|
||||
@@ -21,7 +31,12 @@ import (
|
||||
id: string
|
||||
}
|
||||
|
||||
// Secret value
|
||||
// A reference to an external secret, for example:
|
||||
// - A password
|
||||
// - A SSH private key
|
||||
// - An API token
|
||||
// Secrets are never merged in the Cue tree. They can only be used
|
||||
// by a special filesystem mount designed to minimize leak risk.
|
||||
#Secret: {
|
||||
@dagger(secret)
|
||||
|
||||
|
@@ -20,8 +20,10 @@ package op
|
||||
}
|
||||
|
||||
#Local: {
|
||||
do: "local"
|
||||
id: string
|
||||
do: "local"
|
||||
dir: string
|
||||
include: [...string]
|
||||
exclude: [...string]
|
||||
}
|
||||
|
||||
// FIXME: bring back load (more efficient than copy)
|
||||
|
@@ -20,7 +20,7 @@ package dagger
|
||||
path: string
|
||||
include?: [...string]
|
||||
exclude?: [...string]
|
||||
fs: #Artifact
|
||||
fs: #FS
|
||||
}
|
||||
|
||||
// Securely load external secrets
|
||||
|
Reference in New Issue
Block a user