use the correct api endpoint
This commit is contained in:
parent
05faca1b7f
commit
0842e4d334
1 changed files with 3 additions and 3 deletions
|
@ -76,7 +76,7 @@ steps:
|
||||||
- apk add jq curl
|
- apk add jq curl
|
||||||
- |
|
- |
|
||||||
while true; do
|
while true; do
|
||||||
if [[ $(curl https://git.chir.rs/api/v1/repos/darkkirb/nixos-config/commits/$DRONE_COMMIT | jq '[.statuses[] | select(.target_url | contains("https://hydra.chir.rs/"))] | length') != 0 ]]; then
|
if [[ $(curl https://git.chir.rs/api/v1/repos/darkkirb/nixos-config/commits/$DRONE_COMMIT/statuses | jq '[.statuses[] | select(.target_url | contains("https://hydra.chir.rs/"))] | length') != 0 ]]; then
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
sleep 5
|
sleep 5
|
||||||
|
@ -87,7 +87,7 @@ steps:
|
||||||
- apk add jq curl
|
- apk add jq curl
|
||||||
- |
|
- |
|
||||||
while true; do
|
while true; do
|
||||||
if [[ $(curl https://git.chir.rs/api/v1/repos/darkkirb/nixos-config/commits/$DRONE_COMMIT | jq '[.statuses[] | select(.target_url | contains("https://hydra.chir.rs/")) | select(.status == "pending") ] | length') == 0 ]]; then
|
if [[ $(curl https://git.chir.rs/api/v1/repos/darkkirb/nixos-config/commits/$DRONE_COMMIT/statuses | jq '[.statuses[] | select(.target_url | contains("https://hydra.chir.rs/")) | select(.status == "pending") ] | length') == 0 ]]; then
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
sleep 5
|
sleep 5
|
||||||
|
@ -99,7 +99,7 @@ steps:
|
||||||
- mkdir ~/.ssh
|
- mkdir ~/.ssh
|
||||||
- echo $SSH_KEY > ~/.ssh/id_ed25519
|
- echo $SSH_KEY > ~/.ssh/id_ed25519
|
||||||
- |
|
- |
|
||||||
for build in $(curl https://git.chir.rs/api/v1/repos/darkkirb/nixos-config/commits/$DRONE_COMMIT | jq -r '.statuses[] | select(.target_url | contains("https://hydra.chir.rs/")) | select(.status == "success ") | .target_url'); do
|
for build in $(curl https://git.chir.rs/api/v1/repos/darkkirb/nixos-config/commits/$DRONE_COMMIT/statuses | jq -r '.statuses[] | select(.target_url | contains("https://hydra.chir.rs/")) | select(.status == "success ") | .target_url'); do
|
||||||
JOB_JSON=$(curl -H "Accept: application/json" $build)
|
JOB_JSON=$(curl -H "Accept: application/json" $build)
|
||||||
PROJECT=$(echo "$JOB_JSON" | jq '.project')
|
PROJECT=$(echo "$JOB_JSON" | jq '.project')
|
||||||
JOBSET=$(echo "$JOB_JSON" | jq '.jobset')
|
JOBSET=$(echo "$JOB_JSON" | jq '.jobset')
|
||||||
|
|
Loading…
Reference in a new issue