diff --git a/ci_action/implementation.py b/ci_action/implementation.py index 7417d6d..e2ce34a 100644 --- a/ci_action/implementation.py +++ b/ci_action/implementation.py @@ -20,7 +20,7 @@ LOG = logging.getLogger("implementation") -BUILD_CACHE_BUCKET = os.environ.get('BUILD_CACHE_BUCKET', 'jcsda-usaf-ci-build-cache') +TEST_JOB_TIMEOUT_HOURS = 6 class TimeCheckpointer: @@ -66,7 +66,7 @@ def prepare_and_launch_ci_test( infra_config: The infrastructure configuration for the CI test, pulled from the cloud formation application resources. config: The GitHub action environment configuration including - PR metadata and passed config variables. + PR metadata and passed config variables. bundle_repo_path: The path to the bundle repository. target_repo_path: The path to the target repository. @@ -193,7 +193,7 @@ def prepare_and_launch_ci_test( ) s3_client = boto3.client('s3') configured_bundle_tarball_s3_path = upload_to_aws( - BUILD_CACHE_BUCKET, s3_client, bundle_tarball, s3_file + config['build_cache_bucket'], s3_client, bundle_tarball, s3_file ) # Select the build environments to test. @@ -243,7 +243,7 @@ def prepare_and_launch_ci_test( batch_config_builder = aws_client.BatchSubmitConfigBuilder( job_name_map=infra_config['batch_job_name_map'], job_queue=infra_config['batch_queue'], - timeout=60 * 240 + timeout=60 * 60 * TEST_JOB_TIMEOUT_HOURS, ) # write the test github check runs to the PR. diff --git a/ci_action/main.py b/ci_action/main.py index 38b993d..f5fd155 100644 --- a/ci_action/main.py +++ b/ci_action/main.py @@ -129,6 +129,9 @@ def get_environment_config(): # Ensure that the test dependencies include the target project. test_deps = [d for d in set(test_deps + [target_project_name])] + # Get the build cache bucket. + build_cache_bucket = os.environ.get('BUILD_CACHE_BUCKET', 'jcsda-usaf-ci-build-cache') + config = { 'repository': repository, 'owner': owner, @@ -148,6 +151,7 @@ def get_environment_config(): 'unittest_tag': test_tag, 'test_script': test_script, 'target_project_name': target_project_name, + 'build_cache_bucket': build_cache_bucket } return config