This commit is contained in:
parent
3740ce4ac8
commit
5d0fa89fed
1 changed files with 11 additions and 1 deletions
|
|
@ -79,7 +79,17 @@ jobs:
|
||||||
--retry-all-errors \
|
--retry-all-errors \
|
||||||
-H "X-Nomad-Token: $NOMAD_TOKEN" \
|
-H "X-Nomad-Token: $NOMAD_TOKEN" \
|
||||||
"$NOMAD_ADDR/v1/job/familyfed" \
|
"$NOMAD_ADDR/v1/job/familyfed" \
|
||||||
| jq '(.TaskGroups[].Tasks[].Env //= {}) | .TaskGroups[].Tasks[].Env.DEPLOY_COMMIT = env.DEPLOY_COMMIT | {Job: .}' \
|
| jq '
|
||||||
|
(.TaskGroups[].Tasks[].Env //= {})
|
||||||
|
| .TaskGroups[].Tasks[].Env.DEPLOY_COMMIT = env.DEPLOY_COMMIT
|
||||||
|
| (.TaskGroups[].Tasks[].Artifacts[]?.GetterSource |=
|
||||||
|
if startswith("git::") and test("[?&]ref=") then
|
||||||
|
sub("ref=[^&]*"; "ref=" + env.DEPLOY_COMMIT)
|
||||||
|
elif startswith("git::") then
|
||||||
|
. + (if contains("?") then "&" else "?" end) + "ref=" + env.DEPLOY_COMMIT
|
||||||
|
else . end)
|
||||||
|
| {Job: .}
|
||||||
|
' \
|
||||||
> /tmp/familyfed-job.json
|
> /tmp/familyfed-job.json
|
||||||
|
|
||||||
curl -fsS -X POST \
|
curl -fsS -X POST \
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue