prereceivecli package

Submodules

prereceivecli.configuration module

Main code for configuration.

prereceivecli.prereceivecli module

Main code for prereceivecli.

class prereceivecli.prereceivecli.AwsCredentials(access_key_id: str, secret_access_key: str, session_token: str)[source]

Bases: object

Stores AWS Credentials.

prereceivecli.prereceivecli.get_arguments()[source]

Gets us the cli arguments.

Returns the args as parsed from the argsparser.

prereceivecli.prereceivecli.get_credentials(args)[source]

Gets AWS credentials.

Needs the args to either assume role or get credentials

Credentials:
Credentials: The AWS credentials to set for our environment
prereceivecli.prereceivecli.main()[source]

Main method.

This method holds what you want to execute when the script is run on command line.

prereceivecli.prereceivecli.setup_logging(level, config_file=None)[source]

Sets up the logging.

Parameters:
  • level – The level to log for.
  • config_file – The config file with the logging configuration. If provided it superseeds the level arg.
Returns:

The parsed arguments.

Return type:

args

prereceivecli.prereceivecli.validate_commit(project, dynamodb_table, web_hook, aggressive_checking)[source]

Validates that no unauthorized change has been performed on protected files on a specified commit.

Parameters:
  • project (Project) – An object exposing attributes of the required variables.
  • dynamodb_table (Table) – The dynamodb table with the entries for the projects.
  • web_hook (str) – The url of the slack webhook.
  • aggressive_checking (bool) – If set any unmatched repositories will be rejected.
Returns:

True if the commit is valid False otherwise.

Return type:

success (bool)

prereceivecli.prereceivecliexceptions module

Custom exception code for prereceivecli.

exception prereceivecli.prereceivecliexceptions.GitExecutionPathNotFound[source]

Bases: Exception

Git execution path not found.

Module contents

prereceivecli package.

Import all parts from prereceivecli here.