How to see running SSH jobs

Once you navigate away from a running SSH job in the newly redesigned UI, this job will not appear in the pipelines view.

You can regain access to the SSH job page (and if needed cancel the job), using either of the following methods:

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:

Screen_Shot_2020-08-10_at_11.59.56_AM.png

 

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:

Screen_Shot_2020-08-12_at_2.33.01_PM.png

 

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>"
Was this article helpful?
7 out of 9 found this helpful

Comments

0 comments

Article is closed for comments.