-
Notifications
You must be signed in to change notification settings - Fork 224
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
Adding in a pipeline type param. #285
Conversation
Changing the logic of cdk_stacks/main.py so that it will use that param in order to select the right type of pipeline to deploy. Also added in some unit tests to ensure it throws an exception when an invalid type is used as well as some unit tests to ensure that the adf_standard_pipeline type works as intended. As it has now been moved into its file so that main.py can be easily extended to add new pipeline types. Initial Commit at seperating out pipeline generation from main.py Unit tests Documentation Update
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.
Thanks @StewartW for adding these changes and refactoring as you go.
...nitial_commit/bootstrap_repository/adf-build/shared/cdk/cdk_stacks/adf_standard_pipelines.py
Outdated
Show resolved
Hide resolved
...nitial_commit/bootstrap_repository/adf-build/shared/cdk/cdk_stacks/adf_standard_pipelines.py
Outdated
Show resolved
Hide resolved
docs/pipeline-types-guide.md
Outdated
@@ -0,0 +1,58 @@ | |||
# Pipeline Types Guide | |||
|
|||
In order to enhance the flexibility of ADF, it's possible to define custom pipeline types as separate CDK Stacks (either installed via PIP or added to the bootstrap repository) |
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.
Could you add a segment at the top section of adding custom pipeline types to state that this is for developers/advanced user of ADF. To contribute new pipeline types back into ADF.
The wording of custom pipeline types makes it sound like this can be Company/ADF deployment specific.
So you can define your own Company-A specific Pipeline Type. However, if someone would add this in their local installation of ADF (i.e. the bootstrap repo), it will get overwritten with each version upgrade of ADF.
Unfortunately there is no easy way to work around this limitation at the moment. So I would recommend highlighting that here.
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.
I've added in a section below this. Let me know if it reads correctly for you.
src/lambda_codebase/initial_commit/bootstrap_repository/adf-build/shared/schema_validation.py
Outdated
Show resolved
Hide resolved
...nitial_commit/bootstrap_repository/adf-build/shared/cdk/cdk_stacks/adf_standard_pipelines.py
Outdated
Show resolved
Hide resolved
...nitial_commit/bootstrap_repository/adf-build/shared/cdk/cdk_stacks/adf_standard_pipelines.py
Outdated
Show resolved
Hide resolved
...nitial_commit/bootstrap_repository/adf-build/shared/cdk/cdk_stacks/adf_standard_pipelines.py
Outdated
Show resolved
Hide resolved
...nitial_commit/bootstrap_repository/adf-build/shared/cdk/cdk_stacks/adf_standard_pipelines.py
Outdated
Show resolved
Hide resolved
@@ -0,0 +1,142 @@ | |||
# Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. |
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.
Thanks for adding tests for some of the changes you made, I appreciate this!
Renamed adf_standard_pipelines to adf_default_pipeline. Also renamed the generate function inside it. Standardised default pipeline type to "default". It was previously mixed between "Default" and "default" General linting
@sbkok thanks for pulling in the latest patches. One less thing of my to-do list. |
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.
Looks great @StewartW, thanks for adding this.
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.
LGTM
**Why?** When generating a pipeline, the code optimization introduced by PR awslabs#285 broke the notification_endpoint configuration. When set, it would try to configure the notification in the main generator as well as in the default ADF pipeline generator. **What?** Removing the notification endpoint configuration from the main template, as that is replaced by the default ADF pipeline generator implementation.
**Why?** When generating a pipeline, the code optimization introduced by PR awslabs#285 broke the notification_endpoint configuration. When set, it would try to configure the notification in the main generator as well as in the default ADF pipeline generator. **What?** Removing the notification endpoint configuration from the main template, as that is replaced by the default ADF pipeline generator implementation.
* Fix duplicate notification endpoint setup in pipeline generation **Why?** When generating a pipeline, the code optimization introduced by PR #285 broke the notification_endpoint configuration. When set, it would try to configure the notification in the main generator as well as in the default ADF pipeline generator. **What?** Removing the notification endpoint configuration from the main template, as that is replaced by the default ADF pipeline generator implementation. * Upgrade to latest CDK, pylint, and others Upgrade to CDK v1.105 and latest version of pylint and other libraries. Upgrade of pylint resulted in new errors as listed below. These errors have been fixed as part of this commit too.
**Why?** When generating a pipeline, the code optimization introduced by PR #285 broke the notification_endpoint configuration. When set, it would try to configure the notification in the main generator as well as in the default ADF pipeline generator. **What?** Removing the notification endpoint configuration from the main template, as that is replaced by the default ADF pipeline generator implementation. Co-authored-by: Stewart Wallace <[email protected]>
Issue #, if available: #185
Description of changes:
I've re-introduced a pipeline type param, I hope you find this useful. The primary motivation is to make the overall shape of pipelines more configurable. For example we currently have pipelines at Skyscanner that are used for deploying CloudCustodian to all of our accounts, or executing CDK in them. (And I would like to eventually share some of these back to the ADF community at some point too.)
I also think it is a good starting place to resolving issue #282 by creating a CDK pipeline type, and utilising the new CDK Pipeline Construct.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.