-
Notifications
You must be signed in to change notification settings - Fork 48
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
PR to fix https://github.com/salesforce/dockerfile-image-update/issues/236, to bring in support for sending PRs to docker-compose files #687
Conversation
search.filename("Dockerfile"); | ||
search.filename("docker-compose"); |
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 we move these filenames to come from CLI where we have a default list of "Dockerfile", "docker-compose"
there? Then this part of code would do search.filename on a list
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
assertEquals(new ImageKeyValuePair(fromInstruction).hasADifferentTag(tagToCheck), expectedResult); | ||
} | ||
|
||
/* @DataProvider |
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.
do we need to keep this commented?
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.
Removed
Additionally updated to ignore sending PR for latest tag in docker-compose. Also ignore changing invalid tags which include variables like ${ITEST}/${version} Updated mockito-all to mockito-core as prior is deprecated.
Codecov Report
@@ Coverage Diff @@
## main #687 +/- ##
============================================
+ Coverage 83.33% 84.40% +1.07%
- Complexity 320 374 +54
============================================
Files 26 27 +1
Lines 1140 1244 +104
Branches 137 164 +27
============================================
+ Hits 950 1050 +100
- Misses 155 157 +2
- Partials 35 37 +2
|
@DataProvider | ||
public Object[][] imageNameSpecifiedBranchAndFilenameSearched() { | ||
return new Object[][]{ | ||
/*{"docker.io/some/container", "", "blah", "dockerfile", "blah"}, |
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.
Do you need these commented?
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.
That was added for some debugging, uncommented now. Thanks @afalko
if (!validTag.matcher(tag.trim()).matches()) { | ||
log.warn("{} is not a valid value for image tag. So will be ignored!", tag); | ||
return false; | ||
} else if (tag.trim().equals("latest")) { |
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 think we'll want to parameterize this at some point. For now this is good to have in this PR
Following changes are being implemented in this PR: