From 7de77520a58a151b790046681062eebe531968ef Mon Sep 17 00:00:00 2001 From: guillaume Date: Tue, 14 Dec 2021 01:44:24 +0100 Subject: [PATCH] Add env vars inside http.#Wait package to enable env dependency hacks with the package until a cleaner solution is found Signed-off-by: guillaume --- stdlib/http/http.cue | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/stdlib/http/http.cue b/stdlib/http/http.cue index 00d006a5..a1d4fb6e 100644 --- a/stdlib/http/http.cue +++ b/stdlib/http/http.cue @@ -103,6 +103,9 @@ import ( // Time until timeout (sec.) timeout: int | *30 + // Env variables + env: [string]: string + #up: [ op.#Load & { from: alpine.#Image & { @@ -141,12 +144,15 @@ import ( """#, ] always: true - env: { + "env": { HEALTH_URL: url INTERVAL: "\(interval)" NB_RETRIES: "\(retries)" START_PERIOD: "\(startPeriod)" TIMEOUT: "\(timeout)" + for k, v in env { + "\(k)": v + } } }, ]