executable_jenkins-active-jobs 331 B

1234567891011121314151617
  1. #!/bin/sh
  2. output=$(curl --silent \
  3. --user "admin:$(pass show magnolia/jenkins/admin)" \
  4. https://jenkins.wugi.info/api/json/ \
  5. | jq -r '.jobs[] | select(.color | endswith("_anime")) | .name')
  6. if test -z "$output"
  7. then
  8. printf 0
  9. else
  10. printf "%s" "$output" | wc -l | tr -d '\n'
  11. fi