codecommit

This module defines the CodeCommit event handling logics.

class aws_ci_bot.codecommit.CodeCommitEventHandler(bsm: boto_session_manager.manager.BotoSesManager, cc_event: aws_codecommit.notification.CodeCommitEvent, s3_console_url: str, s3_uri: str)[source]

Handle CodeCommit event. Determine whether we should trigger a CodeBuild job? trigger what build project? how to trigger it? include what env var?

Parameters
  • bsm – where the original event is stored.

  • cc_event – the CodeCommit event object.

  • s3_console_url – where the original event is stored.

  • s3_uri – where the original event is stored.

property pr_commit_console_url: str

Return the link can jump to AWS CodeCommit Pull Request commit console.

It only works when the CodeCommit event is a PR event.

run_build_job(build_job_config: aws_ci_bot.code_build_config.BuildJobConfig, additional_env_var: dict) aws_codebuild.arn_and_console.BuildJobRun[source]

Based on build job config from the codebuild-config.json file, run the CodeBuild job.

Parameters
  • build_job_config

  • additional_env_var

Returns