Skip to content

Instantly share code, notes, and snippets.

@shykes
Created November 9, 2021 17:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save shykes/8b24a9949664f27f184cc65838905fc2 to your computer and use it in GitHub Desktop.
Save shykes/8b24a9949664f27f184cc65838905fc2 to your computer and use it in GitHub Desktop.
Looking for clean dependency API with Guillaume
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