-
Notifications
You must be signed in to change notification settings - Fork 225
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
Ability to use codestar sources in deployment map #312
Conversation
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 this contribution!
I've reviewed the code, a few small changes are required to get this merged.
properties: | ||
repository: my-ecs-app # Optional, above name property will be used if this is not specified | ||
owner: github-enterprise-team-org | ||
codestar_connection_path: /ghes/connection1/arn # The path in AWS Systems Manager Parameter Store that holds the AWS CodeStar Connection arn |
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.
This looks like a path used in an organization. Can you make it easier to read so people will understand they can change the value to their own preference? In its current form it looks like I cannot change it, while you can, am I right?
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.
yes, this is path is arbitrary. will update it to /path/to/parameter
owner: github-enterprise-team-org | ||
codestar_connection_path: /ghes/connection1/arn # The path in AWS Systems Manager Parameter Store that holds the AWS CodeStar Connection arn | ||
params: | ||
notification_endpoint: [email protected] |
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.
To prevent spam and mixing different email examples in our code base, can you change this to [email protected]?
params: | ||
notification_endpoint: [email protected] | ||
targets: | ||
- [ /ecoin/testing, /ephone/testing ] |
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.
Same here, can you change this to be more generic?
try: | ||
response = ssm_client.get_parameter(Name=codestar_connection_path) | ||
except Exception as e: | ||
print(f"No parameter found at {codestar_connection_path}. Check the path/value.") |
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 change this print to use the logger instead. Like we do here? But using error instead.
@@ -436,6 +436,10 @@ Resources: | |||
Resource: | |||
- !Sub arn:aws:codepipeline:${AWS::Region}:${AWS::AccountId}:webhook:adf-webhook-* | |||
- !Sub arn:aws:codepipeline:${AWS::Region}:${AWS::AccountId}:${PipelinePrefix}* | |||
- Effect: Allow | |||
Action: | |||
- "codestar-connections:*" |
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.
Can you change this to list the actions that it really needs, instead of all?
- Effect: Allow | ||
Sid: "AllowCodeStarConnections" | ||
Action: | ||
- "codestar-connections:*" |
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.
Same here, please list the exact actions this policy will need.
The AWS CodeStar connection needs to already exist and be in the "Available" Status. To use the AWS CodeStar Connection with ADF, its arn needs to be stored in AWS Systems Manager Parameter Store in the deployment account's main region (see details below). Read the CodePipeline documentation for more [information on how to setup the connection](https://docs.aws.amazon.com/dtconsole/latest/userguide/getting-started-connections.html). | ||
|
||
Provider type: `codestar`. | ||
#### Properties |
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.
Can you add a newline above the Properties title 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.
done
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 good, thanks for updating the PR and submitting these changes!
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 and thanks for this contribution @ivan-aws !
Issue #, if available:
Description of changes:
Added the ability to use AWS Codestar as the source for pipelines defined in the deployment map.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.