Improve #docker.Push definition :
- Push to private registry - Output ref and digest - Update doc - Add tests to universe.bats Signed-off-by: Tom Chauveau <tom.chauveau@epitech.eu>
This commit is contained in:
34
stdlib/.dagger/env/docker-push-invalid-creds/plan/push.cue
vendored
Normal file
34
stdlib/.dagger/env/docker-push-invalid-creds/plan/push.cue
vendored
Normal file
@@ -0,0 +1,34 @@
|
||||
package docker
|
||||
|
||||
import (
|
||||
"dagger.io/docker"
|
||||
"dagger.io/random"
|
||||
)
|
||||
|
||||
TestRegistry: {
|
||||
username: string @dagger(input)
|
||||
secret: string @dagger(input)
|
||||
}
|
||||
|
||||
TestPush: {
|
||||
tag: random.#String & {seed: "docker push and pull should fail"}
|
||||
|
||||
name: "daggerio/ci-test:\(tag.out)"
|
||||
|
||||
image: docker.#ImageFromDockerfile & {
|
||||
dockerfile: """
|
||||
FROM alpine
|
||||
RUN echo "test" > /test.txt
|
||||
"""
|
||||
context: ""
|
||||
}
|
||||
|
||||
push: docker.#Push & {
|
||||
"name": name
|
||||
source: image
|
||||
registry: {
|
||||
username: TestRegistry.username
|
||||
secret: TestRegistry.secret
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user