You may want to see forgotten SSH jobs when hitting concurrency limits.
From the UI:
Visit the legacy jobs page:
https://app.circleci.com/pipelines/{vcs}/{org}/{project}/jobs
inserting vcs
(gh
or bb
), org
, and project
where appropriate. This page displays jobs rather than pipelines.
For example, if I wanted to see all of the currently running jobs for our CircleCI CLI repository, I would visit:
https://app.circleci.com/pipelines/github/CircleCI-Public/circleci-cli/jobs
This will show a jobs view:
You will then be able to see and access running SSH jobs from this view.
Note: This jobs view is on a per-project basis. That means you can only see all of the jobs for a given project, but you will not be able to see all jobs across all projects.
To cancel the currently running SSH job, click the job on the list and it will take you to the workflows page. From this page, you will be able to cancel the job from the Rerun
menu as follows:
Using the CircleCI API
Note: You'll need to use a personal API token
This method relies on the "Recent Builds Across All Projects" API endpoint.
- Open a terminal and run the following cURL request:
curl -G "https://circleci.com/api/v1.1/recent-builds?shallow=true" \
-H "Circle-Token: <your_API_Token>"| jq '.[] | select(.why == "ssh") | select(.status == "running")|{build_url, build_num}'
The above request will return the URL (build_url) and the ID (build_num) of all your currently running SSH jobs.
- You can then copy and paste the URL into your browser's address, which will take you to the job's page where you'll be able to view the job's details, and if you wish to do so, cancel it.
- You can also use the ID to cancel the job using the "Cancel a Build" API endpoint.
curl -X POST https://circleci.com/api/v1.1/project/:vcs-type/:username/:project/:build_num/cancel \
-H "Circle-Token: <circle-token>"
Comments
Article is closed for comments.