How can I view a list of jobs by tag name?

At the moment, there isn't a straightforward way to get a list of jobs by tag name, from the CircleCI UI. However, you could use our API (https://circleci.com/docs/api/#recent-builds-for-a-single-project) to retrieve such information. Here are some examples of how to do that (a CircleCI API token will be necessary - see: https://circleci.com/docs/2.0/managing-api-tokens/)

Get jobs matching a tag name

curl -s "https://circleci.com/api/v1.1/project/<vcs-name>/<org-name>/<project-name>?circle-token=$CIRCLE_TOKEN&limit=100" | jq -r '.[] | select (.vcs_tag? == "<tag-name>") | {build_url, subject}'

Get all jobs that ran for any tag

curl -s "https://circleci.com/api/v1.1/project/<vcs-name>/<org-name>/<project-name>?circle-token=$CIRCLE_TOKEN&limit=100" | jq -r '.[] | select (.vcs_tag? != null) | {build_url, subject}'

Was this article helpful?
0 out of 0 found this helpful

Comments

0 comments

Please sign in to leave a comment.