Fix broken docker.#Command secrets mount

Signed-off-by: guillaume <guillaume.derouville@gmail.com>
This commit is contained in:
guillaume
2021-12-03 13:10:08 +01:00
parent 764ef2761c
commit 7d753660d0
3 changed files with 19 additions and 14 deletions

View File

@@ -5,19 +5,22 @@ import (
)
TestConfig: {
host: string @dagger(input)
user: string @dagger(input)
key: dagger.#Secret @dagger(input)
host: dagger.#Input & {string}
user: dagger.#Input & {string}
key: dagger.#Input & {dagger.#Secret}
}
TestPassword: dagger.#Input & {dagger.#Secret}
TestSSH: client: #Command & {
command: #"""
docker $CMD
docker $CMD && [ -f /run/secrets/password ]
"""#
ssh: {
host: TestConfig.host
user: TestConfig.user
key: TestConfig.key
}
env: CMD: "version"
secret: "/run/secrets/password": TestPassword
env: CMD: "version"
}