-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(Public ECR): Build Images (#2793)
* feat(Public ECR): Changed Build Image Registry to Public ECR (#2708) * Changed Build Image Registry to Public ECR * Added _IMAGE_URI_PREFIX * Fixed Unit Tests * Updated Image Format * feat(Public ECR): Updated Test Image Name and Added Latest Tag Check (#2720) * Added Tests for Latest Tag * Added use_container Check for Verify Latest Tag Tests * Fixed DotNet and Go Build Tests * Added Missing use_container Check for test_build_function_and_layer * feat(Public ECR): Changed Build Image Registry to Public ECR (#2708) * Changed Build Image Registry to Public ECR * Added _IMAGE_URI_PREFIX * Fixed Unit Tests * Updated Image Format * feat(Public ECR): Updated Test Image Name and Added Latest Tag Check (#2720) * Added Tests for Latest Tag * Added use_container Check for Verify Latest Tag Tests * Fixed DotNet and Go Build Tests * Added Missing use_container Check for test_build_function_and_layer * feat(Public ECR): Added --build-image Options (#2725) * Added Latest Tag Check * Added --build-image Option * Added Unit Tests * Added Help Text and Fixed PyLint * Fixed Path Validation for Unit Tests * Updated Type Hintings * Added _parse_key_value_pair * Updated tag Handling for Image Pulls * Added Throwing Exception with Invalid Build Images * Fixed PyLint Issue * Feat: added integration tests, container tag check and layer support (#2780) * Added integration tests * Added click requirement on -u presence for container based options * Added click class that checks -u presence for container based options * Reformatting and fixing test cases * Fix for integration test failures * Added support for layers * Resolve conflict * Refactoring file location * Addressing review comments, refactoring * Reformatting logging sentence * Refactoring container check for simplicity * Clarifying test case * Added unit tests on layer builds * Improving readability * Refactoring to simplify * Removing unnecessary lines * Refactoring integration test * Shortening error message * Adjusting test behaviour * Added new unit tests * Test refactoring * Added new test class * Removed unused import * Improving help text Co-authored-by: Qingchuan Ma <69653965+qingchm@users.noreply.github.com>
- Loading branch information
Showing
16 changed files
with
550 additions
and
80 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
""" | ||
Module to check container based cli parameters | ||
""" | ||
import click | ||
|
||
|
||
class ContainerOptions(click.Option): | ||
""" | ||
Preprocessing checks for presence of --use-container flag for container based options. | ||
""" | ||
|
||
def handle_parse_result(self, ctx, opts, args): | ||
if "use_container" not in opts and self.name in opts: | ||
opt_name = self.name.replace("_", "-") | ||
msg = f"Missing required parameter, need the --use-container flag in order to use --{opt_name} flag." | ||
raise click.UsageError(msg) | ||
# To make sure no unser input prompting happens | ||
self.prompt = None | ||
return super().handle_parse_result(ctx, opts, args) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.