os.#Container: mount secrets with a more consistent API

Signed-off-by: Solomon Hykes <solomon@dagger.io>
This commit is contained in:
Solomon Hykes
2021-06-23 10:46:56 +00:00
committed by Solomon Hykes
parent 9d85bab9e7
commit aa6335246b
6 changed files with 69 additions and 5 deletions

View File

@@ -48,14 +48,14 @@ import (
// Mount contents from other artifacts.
// Mount is active when executing `command`, but not `setup`.
mount: [string]: {
from: dagger.#Artifact
// FIXME: support source path
} | {
secret: dagger.#Secret
}
// Safely mount secrets (in cleartext) as non-persistent files
secret: [string]: dagger.#Secret
// Mount persistent cache directories
cache: [string]: true
@@ -113,6 +113,9 @@ import (
"\(dest)": o
// FIXME: support source path
}
for dest, s in secret {
"\(dest)": secret: s
}
for dest, _ in cache {
"\(dest)": "cache"
}