-
Notifications
You must be signed in to change notification settings - Fork 428
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
feat: add support for docker build args to the task run command #5377
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.
This is so much needed and the implementation is awesome! Thank you very much ❤️
@@ -1193,6 +1199,7 @@ func BuildTaskRunCmd() *cobra.Command { | |||
cmd.Flags().StringVarP(&vars.groupName, taskGroupNameFlag, nameFlagShort, "", taskGroupFlagDescription) | |||
|
|||
cmd.Flags().StringVar(&vars.dockerfilePath, dockerFileFlag, defaultDockerfilePath, dockerFileFlagDescription) | |||
cmd.Flags().StringToStringVar(&vars.dockerfileBuildArgs, dockerFileBuildArgsFlag, nil, dockerFileBuildArgsFlagDescription) |
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 an example to the [task run help menu] about how we can run task from dockerfile 🙏
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 added an example to the help menu showing how to use the --build-args flag. Thanks for the suggestion!
🍕 Here are the new binary sizes!
|
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 great - thank you! I'm adding the DNM label for you to address iamhopaul123@'s comment!
@@ -192,6 +193,8 @@ var ( | |||
imageFlagDescription = fmt.Sprintf(`The location of an existing Docker image. | |||
Cannot be specified with --%s or --%s.`, dockerFileFlag, dockerFileContextFlag) | |||
dockerFileFlagDescription = fmt.Sprintf(`Path to the Dockerfile. | |||
Cannot be specified with --%s.`, imageFlag) | |||
dockerFileBuildArgsFlagDescription = fmt.Sprintf(`Key-value pairs converted to --build-args. | |||
Cannot be specified with --%s.`, imageFlag) |
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.
Cannot be specified with --%s.`, imageFlag
aw yay thank you for adding this in the help menu message !
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.
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## mainline #5377 +/- ##
=========================================
Coverage 69.86% 69.87%
=========================================
Files 297 297
Lines 45190 45198 +8
Branches 287 287
=========================================
+ Hits 31574 31580 +6
- Misses 12079 12080 +1
- Partials 1537 1538 +1
☔ View full report in Codecov by Sentry. |
Adds the ability to pass build args into the docker build when running the
copilot task run
command.Addresses #5376
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the Apache 2.0 License.