Configure a private registry credential for self-hosted runners
Use the following instructions to configure a registry credential for a self-hosted runner.
Note
Note that these credentials will only be used if the images are overridden with those from private registries.
- AWS Management Console
-
-
Open the AWS CodeBuild console at https://console.aws.amazon.com/codesuite/codebuild/home
. -
Create a build project or select an existing project. For information, see Create a build project (console) and Change a build project's settings (console).
-
In Environment, choose Additional configuration.
-
In Additional configuration, enter the name or ARN of the secret from AWS Secrets Manager for Registry credential - optional.
-
- AWS CLI
-
-
If you'd like to create a new project, run the create-project command.
aws codebuild create-project \ --nameproject-name\ --source type=source-type,location=source-location\ --environment "type=environment-type,image=image,computeType=compute-type,registryCredential={credentialProvider=SECRETS_MANAGER,credential=secret-name-or-arn},imagePullCredentialsType=CODEBUILD|SERVICE_ROLE" \ --artifacts type=artifacts-type\ --service-role arn:aws:iam::account-ID:role/service-role/service-role-name -
If you'd like to update an existing project, run the update-project command.
aws codebuild update-project \ --nameproject-name\ --environment "type=environment-type,image=image,computeType=compute-type,registryCredential={credentialProvider=SECRETS_MANAGER,credential=secret-name-or-arn}"
-