Skip to main content

CircleCI

The Operations Engineering team have Admin permissions in CircleCI and may be called upon to answer questions regarding the service, it’s availability and behaviour. We do not provide support for issues with Circle setup, so if the issue isn’t clear or listed here, we should point users to an appropriate channel.

Github PR workflows don’t fire

This usually means Circle doesn’t think the user is authenticated/has access to the repository or team. This is a known issue and has happened multiple times to MoJ users. Usually there are failed Webhooks on Github and the way to restore order is to log out of GH and follow these Circle instructions https://support.circleci.com/hc/en-us/articles/360044395953-GitHub-Updates-Results-in-400-Response-for-Webhook

Some variation of degraded job performance

This could be due to resource constraints on the container the user is using to run the job. Circle now provides resource information in the “Resources” tab on each job so that can be easily verified.

Sometimes multiple teams are running multiple workflows which strains Circle and things take longer. That is very rare now that we have upgraded our plan, but users might need to rerun workflows they suspect have become victim of account resource constraints.

Permission denied reading from GitHub

The following error can occur when running a CircleCI pipeline:

git@github.com: Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists

The steps to resolve this issue are as follows:

  1. Navigate to the project settings SSH page: https://app.circleci.com/settings/project/github/ministryofjustice/{PROJECT_NAME}/ssh

If there is a deploy key already present it may be a different issue

  1. Navigate to the GitHub repo settings SSH page: https://github.com/ministryofjustice/{PROJECT_NAME}/settings/keys

There should not be a deploy key already preset, if there is, it may be a different issue

  1. Click the Stop Building button via the CircleCI Project Overview: https://app.circleci.com/settings/project/github/ministryofjustice/{PROJECT_NAME}
  2. Wait a few minutes for everything to stop in the CircleCI Project
  3. Click the Follow Project button
  4. Navigate to the CircleCI Projects Dashboard: https://app.circleci.com/pipelines/github/ministryofjustice/{PROJECT_NAME}
  5. Rerun one of the failed builds for the project

Deploy keys should now be created in both the CircleCI settings page and the GitHub settings page. If this is not the case, please contact #operations-engineering.

Troubleshooting Builds “Unauthorised” due to contexts error

User may get the following error:

The user who triggered the build may not have permission to a context being used. Visit our help article, Troubleshooting Builds "Unauthorized" due to contexts.

This issue is most likley caused by a user not being in the same GitHub Team that has access to the conext. CircleCI Guide for reference

You can check Context restictions (i.e. the GitHub Team that has access to the Context) via the Contexts section of Organisational Settings.

This will appear under the “Security” heading in the Contexts list, or if you click on the specific Context, the Team value will be shown under the heading “Group”.

To resolve the the authentication error the user must be added to the correct Team. Advise user to contact the GitHub Team Maintainer.

This page was last reviewed on 24 June 2024. It needs to be reviewed again on 24 September 2024 by the page owner #operations-engineering-alerts .
This page was set to be reviewed before 24 September 2024 by the page owner #operations-engineering-alerts. This might mean the content is out of date.