-
Notifications
You must be signed in to change notification settings - Fork 157
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
optionally allow asset publishing #38
base: main
Are you sure you want to change the base?
Conversation
flag `enable_asset_publishing` is used to control whether to add an optional step to publish cdk assets to s3, this is useful if the target code repository makes use of assets (for example lambda function code as an asset) Can be further improved by: - looping over assets manifests (for now the 3 asset manifests for 3 environments are hardcoded) - externalising this logic to a separate script/construct to be reusable in any pipeline construct
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just minor comments before approving this request
...e-rt/mlops_sm_project_template_rt/templates/pipeline_constructs/deploy_pipeline_construct.py
Outdated
Show resolved
Hide resolved
@@ -45,6 +45,7 @@ def __init__( | |||
preprod_account: int, | |||
prod_account: int, | |||
deployment_region: str, | |||
enable_asset_publishing: bool = False, # set to true if you would like to enable an asset publishing stage |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
might be worth having this be controlled by a CFN Parameter and be part of the template itself, this will allow the creation of projects with asset publishing enabled and disabled as desired by the user.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do you mean to expose it all the way up on the service catalog product level ?
If so i think it will create some pain since we won't be able to easily toggle the creation of the resources based on the parameter value ( it won't be a straight forward if statement and we will need to use CfnConditions, something like this: https://loige.co/create-resources-conditionally-with-cdk/ ) or may be i am mistaken, let me know what you think
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yh or can also be a condition inside the codebuild as workaround as well this is just to ensure no error arise when running the code with no assets to publish.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Fatema how about this ?
so now we have: the overall controlling flag which has a default value of false, then these if conditions which makes sure the build won't fail even if no assets are to be published
This looks good! please pull latest changes then will merge this to the main branch :) |
* adding template for custom image handling * adding byoc setup * fixed script * adding more seed code and upating the docker build script * fixes to typos and iam * fix some errors in the code and added a read me for advanced topics * byoc changes * renamed folder name to mlops_sm_project_template * modified description * fixes to BYOC seed code * reformatting and adding more docs * more docs * more docs * first commit * minor bug fixes Co-authored-by: Fatema Alkhanaizi <[email protected]> Co-authored-by: Georgios Schinas <[email protected]>
flag `enable_asset_publishing` is used to control whether to add an optional step to publish cdk assets to s3, this is useful if the target code repository makes use of assets (for example lambda function code as an asset) Can be further improved by: - looping over assets manifests (for now the 3 asset manifests for 3 environments are hardcoded) - externalising this logic to a separate script/construct to be reusable in any pipeline construct
… assets doesn't exist
changes pulled for this pr and the other one with the policies change |
flag
enable_asset_publishing
is used to control whether to add an optional step to publish cdk assets to s3, this is useful if the target code repository makes use of assets (for example lambda function code as an asset)Can be further improved by:
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.