-
Notifications
You must be signed in to change notification settings - Fork 235
Adding support for CodeBuild to pull from docker hub #349
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
Conversation
|
Hi @pozeus, Thanks for your contribution here. I would like to propose a slight modification so we can support other registries later as well. Could you change this to check if the string starts with: "docker-hub://${image-goes-here}"? Let me know if it is unclear or if I can support you with these changes. Many Thanks, |
sbkok
left a comment
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.
Hi @pozeus,
Could you also update the PR to include the following statement?
This is specified as part of the template of our PRs and is required for all contributions to our repository.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
Many thanks,
Simon
|
Dear @pozeus, I put the "on hold" tag on the pull request, as we cannot merge this fix before you agree to the licensing terms. If you don't have time to work on the fix, please agree with the licensing terms and state so here, so we can work on the improvements instead. Best regards, |
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.
Sorry for the delay, I will fix this coming week.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
Added Simon's suggested change of adding a prefix on images pulled form docker-hub.
|
@sbkok Hi Simon, |
sbkok
left a comment
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 making these improvements @pozeus.
The CI build process reported the following linting issues:
src/lambda_codebase/initial_commit/bootstrap_repository/adf-build/shared/cdk/cdk_constructs/adf_codebuild.py:161:0: C0303: Trailing whitespace (trailing-whitespace)
src/lambda_codebase/initial_commit/bootstrap_repository/adf-build/shared/cdk/cdk_constructs/adf_codebuild.py:165:65: C0303: Trailing whitespace (trailing-whitespace)
src/lambda_codebase/initial_commit/bootstrap_repository/adf-build/shared/cdk/cdk_constructs/adf_codebuild.py:196:58: C0303: Trailing whitespace (trailing-whitespace)
src/lambda_codebase/initial_commit/bootstrap_repository/adf-build/shared/cdk/cdk_constructs/adf_codebuild.py:163:4: R1710: Either all return statements in a function should return an expression, or none of them should. (inconsistent-return-statements)
Could you fix those too, so we can merge the changes after?
You can run the test suite + linting by running tox locally too.
|
@sbkok I've now fixed the return which was missing in the function and added the suggested example. Please review 😊 |
...ase/initial_commit/bootstrap_repository/adf-build/shared/cdk/cdk_constructs/adf_codebuild.py
Outdated
Show resolved
Hide resolved
|
@sbkok Any comment regarding this? |
sbkok
left a comment
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.
Perfect. Thanks for making these changes and contributing this feature!
StewartW
left a comment
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 to me. ![]()
Adding support for CodeBuild to pull images from docker hub using LinuxBuildImage classmethod from_docker_registry (https://docs.aws.amazon.com/cdk/api/latest/python/aws_cdk.aws_codebuild/LinuxBuildImage.html#aws_cdk.aws_codebuild.LinuxBuildImage.from_docker_registry).
I added some documentation and an example as well, please feel free to change if you think it's not explanatory enough.
Images can be provided like: