Make env in ImageConfig a map
Fields in CUE were renamed to the lowercase version of Dockerfile instructions. There's now opportunity to make other fields simpler to use (e.g., healthcheck), this commit is focused on env. Signed-off-by: Helder Correia <174525+helderco@users.noreply.github.com>
This commit is contained in:
@@ -18,8 +18,8 @@ engine.#Plan & {
|
||||
"""
|
||||
} & {
|
||||
config: {
|
||||
Env: ["PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin", "test=foobar"]
|
||||
Cmd: ["/bin/sh", "-c", "/test-cmd"]
|
||||
env: test: "foobar"
|
||||
cmd: ["/bin/sh", "-c", "/test-cmd"]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -11,8 +11,8 @@ engine.#Plan & {
|
||||
// assert result
|
||||
digest: "sha256:e7d88de73db3d3fd9b2d63aa7f447a10fd0220b7cbf39803c803f2af9ba256b3"
|
||||
config: {
|
||||
Env: ["PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"]
|
||||
Cmd: ["/bin/sh"]
|
||||
env: PATH: "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
|
||||
cmd: ["/bin/sh"]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -20,8 +20,8 @@ engine.#Plan & {
|
||||
// assert result
|
||||
digest: "sha256:c74f1b1166784193ea6c8f9440263b9be6cae07dfe35e32a5df7a31358ac2060"
|
||||
config: {
|
||||
Env: ["PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"]
|
||||
Cmd: ["/bin/sh"]
|
||||
env: PATH: "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
|
||||
cmd: ["/bin/sh"]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -42,7 +42,7 @@ engine.#Plan & {
|
||||
push: engine.#Push & {
|
||||
dest: "daggerio/ci-test:\(randomString.output)"
|
||||
input: randomString.image.output
|
||||
config: Env: ["FOO=\(randomString.output)"]
|
||||
config: env: FOO: randomString.output
|
||||
auth: #auth
|
||||
}
|
||||
|
||||
@@ -54,9 +54,7 @@ engine.#Plan & {
|
||||
// check digest
|
||||
digest: strings.Split(push.result, "@")[1]
|
||||
// check image config
|
||||
config: {
|
||||
Env: ["FOO=\(randomString.output)"]
|
||||
}
|
||||
config: env: FOO: randomString.output
|
||||
}
|
||||
|
||||
pullOutputFile: engine.#ReadFile & {
|
||||
|
Reference in New Issue
Block a user