Created
November 9, 2021 17:53
-
-
Save shykes/8b24a9949664f27f184cc65838905fc2 to your computer and use it in GitHub Desktop.
Looking for clean dependency API with Guillaume
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
registryURL: string | |
runRegistry: docker.#Run & { | |
args: ["registry", "-h", registryURL] // bla bla | |
// Wait for registry port to be available | |
hooks: post: waitRegistry: { | |
args: """ | |
while true; do | |
curl -L -S "localhost:foo" && exit | |
sleep 1 | |
done | |
""" | |
} | |
} | |
if registryHealthcheck.exit == 0 { | |
if runRegistry.hooks. | |
push: docker.#Push & { | |
target: "\(registryURL)/bla" | |
} | |
} | |
if registryHealthcheck.exit != 0 { | |
// fancy error reporting | |
// this will never be evaluated in the current runtime version | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment