-
Notifications
You must be signed in to change notification settings - Fork 179
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use pr default tag together with user provided tags (#11981)
* Use config to provide a default tag for images build for pr or commit. Added validation tag field to provide validation regex together with a tag. Update kaniko-build-config.yaml to provide default tag for pr and commit images with validation regex. Validating tag when parsing it's value. Added TagOption to add PR number to the Tagger instance. Using pull request default tag together with user provided tags instead replacing all values with default tag. This allows users to provide their own tag to the images build on pr. * Do not set base sha for pull request images. Set only tagger fields needed for image type. Fix validation regex for commit to align with expected date format. Return error from TagOption to signal problems with setting it. Checking if pr or sha strings passed to TagOption is empty. Return error when trying to set empty string. * Use config to provide a default tag for images build for pr or commit. Added validation tag field to provide validation regex together with a tag. Update kaniko-build-config.yaml to provide default tag for pr and commit images with validation regex. Validating tag when parsing it's value. Added TagOption to add PR number to the Tagger instance. Using pull request default tag together with user provided tags instead replacing all values with default tag. This allows users to provide their own tag to the images build on pr. * Do not set base sha for pull request images. Set only tagger fields needed for image type. Fix validation regex for commit to align with expected date format. Return error from TagOption to signal problems with setting it. Checking if pr or sha strings passed to TagOption is empty. Return error when trying to set empty string. * Adjusting tests * Updated tests to verify changed features. Small fixes in application. * Aligned DateFormat TagOption to check for empty format string. Added tests for options. * Test getDefaultTag function. * Remove test custom unmarshaller. * Keep old tag template definition for migration purposes. * Config will be changed together with gh action in separate PR.
- Loading branch information
Showing
10 changed files
with
399 additions
and
164 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
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.