From 0de011c31ace84c1c90454cb2616856a2da04e4f Mon Sep 17 00:00:00 2001 From: Sean Rastatter Date: Thu, 5 Oct 2023 09:16:12 -0400 Subject: [PATCH] updated github actions generation --- CHANGELOG.md | 10 ++++++++++ google_cloud_automlops/AutoMLOps.py | 4 ++-- google_cloud_automlops/__init__.py | 2 +- google_cloud_automlops/utils/constants.py | 10 +++++++--- setup.py | 2 +- 5 files changed, 21 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c6d57ba..3351286 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,16 @@ # Change Log All notable changes to this project will be documented in this file. +## [1.2.5] - 2023-10-05 + +### Added + +### Changed + +### Fixed + +- Fixed bug with generating .github/workflows directories + ## [1.2.4] - 2023-10-03 ### Added diff --git a/google_cloud_automlops/AutoMLOps.py b/google_cloud_automlops/AutoMLOps.py index f9b0256..9774b1d 100644 --- a/google_cloud_automlops/AutoMLOps.py +++ b/google_cloud_automlops/AutoMLOps.py @@ -38,10 +38,10 @@ GENERATED_GITHUB_ACTIONS_FILE, GENERATED_DEFAULTS_FILE, GENERATED_DIRS, + GENERATED_GITHUB_DIRS, GENERATED_RESOURCES_SH_FILE, GENERATED_SERVICES_DIRS, GENERATED_TERRAFORM_DIRS, - GITHUB_DIR, OUTPUT_DIR ) from google_cloud_automlops.utils.utils import ( @@ -278,7 +278,7 @@ def generate( if provisioning_framework == Provisioner.TERRAFORM.value: make_dirs(GENERATED_TERRAFORM_DIRS) if deployment_framework == Deployer.GITHUB_ACTIONS.value: - make_dirs(GITHUB_DIR) + make_dirs(GENERATED_GITHUB_DIRS) # Set derived vars if none were given for certain variables derived_artifact_repo_name = f'{naming_prefix}-artifact-registry' if artifact_repo_name is None else artifact_repo_name diff --git a/google_cloud_automlops/__init__.py b/google_cloud_automlops/__init__.py index d8b1b04..377efc3 100644 --- a/google_cloud_automlops/__init__.py +++ b/google_cloud_automlops/__init__.py @@ -23,6 +23,6 @@ series of directories to support the creation of Vertex Pipelines. """ # pylint: disable=invalid-name -__version__ = '1.2.4' +__version__ = '1.2.5' __author__ = 'Sean Rastatter' __credits__ = 'Google' diff --git a/google_cloud_automlops/utils/constants.py b/google_cloud_automlops/utils/constants.py index ec32b68..76b8b14 100644 --- a/google_cloud_automlops/utils/constants.py +++ b/google_cloud_automlops/utils/constants.py @@ -58,7 +58,6 @@ # AutoMLOps file paths BASE_DIR = 'AutoMLOps/' -GITHUB_DIR = BASE_DIR + '.github/workflows/' GENERATED_DEFAULTS_FILE = BASE_DIR + 'configs/defaults.yaml' GENERATED_PIPELINE_SPEC_SH_FILE = BASE_DIR + 'scripts/build_pipeline_spec.sh' GENERATED_BUILD_COMPONENTS_SH_FILE = BASE_DIR + 'scripts/build_components.sh' @@ -67,7 +66,7 @@ GENERATED_RESOURCES_SH_FILE = BASE_DIR + 'provision/provision_resources.sh' GENERATED_PUBLISH_TO_TOPIC_FILE = BASE_DIR + 'scripts/publish_to_topic.sh' GENERATED_CLOUDBUILD_FILE = BASE_DIR + 'cloudbuild.yaml' -GENERATED_GITHUB_ACTIONS_FILE = GITHUB_DIR + 'github_actions.yaml' +GENERATED_GITHUB_ACTIONS_FILE = BASE_DIR + '.github/workflows/github_actions.yaml' GENERATED_PIPELINE_REQUIREMENTS_FILE = BASE_DIR + 'pipelines/requirements.txt' GENERATED_PIPELINE_FILE = BASE_DIR + 'pipelines/pipeline.py' GENERATED_PIPELINE_RUNNER_FILE = BASE_DIR + 'pipelines/pipeline_runner.py' @@ -97,7 +96,12 @@ GENERATED_TERRAFORM_DIRS = [ BASE_DIR + 'provision/state_bucket', - BASE_DIR + 'provision/environment', + BASE_DIR + 'provision/environment' +] + +GENERATED_GITHUB_DIRS = [ + BASE_DIR + '.github', + BASE_DIR + '.github/workflows' ] # temporary files diff --git a/setup.py b/setup.py index 161dbc8..ede2098 100644 --- a/setup.py +++ b/setup.py @@ -20,7 +20,7 @@ setup( name='google-cloud-automlops', - version='1.2.4', + version='1.2.5', description='Build MLOps Pipelines in Minutes.', long_description=readme_contents, long_description_content_type='text/markdown',