fao89 / pulpcore

Repository for pulpcore package https://pypi.org/project/pulpcore/
GNU General Public License v2.0
0 stars 0 forks source link

As CI team member, I want an easy way to monitor all CI build states #148

Open fao89 opened 2 years ago

fao89 commented 2 years ago

Author: @fao89 (fao89)

Redmine Issue: 6126, https://pulp.plan.io/issues/6126


For improving our response to broken builds, it would be useful to have an easy way to check the state of all builds.

As PoC:

for REPO in $(http https://api.github.com/orgs/pulp/repos | jq '.[].full_name' | sed 's/"//g')
do
  repo=$(echo $REPO | sed 's/\//%2F/g')
  state=$(http https://api.travis-ci.com/repo/${repo}/builds\?event_type\=cron\&limit\=1 Travis-API-Version:3 'Authorization:token <<PULP_TRAVIS_TOKEN>>' | jq '.builds[].state')
  echo "${REPO} state = ${state}"
done

Reference: