-
Notifications
You must be signed in to change notification settings - Fork 354
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
Add Docker Image reference, to be used for gitlab, docker, etc #4793
Open
jevanlingen
wants to merge
30
commits into
main
Choose a base branch
from
introduce-image-reference-and-recipe
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+190
−204
Conversation
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
jevanlingen
requested review from
timtebeek,
knutwannheden,
nielsdebruin and
Laurens-W
December 17, 2024 13:31
rewrite-java/src/main/java/org/openrewrite/java/ImageMatcher.java
Outdated
Show resolved
Hide resolved
rewrite-java/src/test/java/org/openrewrite/java/FindImageTest.java
Outdated
Show resolved
Hide resolved
rewrite-yaml/src/main/java/org/openrewrite/yaml/trait/YamlApplicationConfigReference.java
Show resolved
Hide resolved
rewrite-yaml/src/main/java/org/openrewrite/yaml/trait/YamlImageReference.java
Outdated
Show resolved
Hide resolved
rewrite-yaml/src/main/java/org/openrewrite/yaml/trait/YamlImageReference.java
Outdated
Show resolved
Hide resolved
timtebeek
reviewed
Dec 17, 2024
rewrite-java/src/main/java/org/openrewrite/java/ImageMatcher.java
Outdated
Show resolved
Hide resolved
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
jevanlingen
force-pushed
the
introduce-image-reference-and-recipe
branch
from
December 17, 2024 13:58
67fbd7f
to
2ad2e6f
Compare
rewrite-core/src/main/java/org/openrewrite/text/DockerImageReference.java
Outdated
Show resolved
Hide resolved
Laurens-W
reviewed
Dec 20, 2024
rewrite-xml/src/main/java/org/openrewrite/xml/trait/SpringReference.java
Outdated
Show resolved
Hide resolved
# Conflicts: # rewrite-xml/src/main/java/org/openrewrite/xml/trait/SpringXmlReference.java
3 tasks
Moved implementation files to So in the core it's just the Image reference + all needed things to set it up. In |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What's changed?
Added a new
IMAGE
reference type, which points to a docker image. Could be used for gitlab-ci files, docker files, testcontainers etc.Also did a little refactoring in the SourceFileWithReferences:
getReferences
cache logic can be once instead of every implementation.findMatches
method did also check for kind; as theReference.Matcher
does already do that, no need to do it here too.What's your motivation?
Run one find (and replace?) recipe to search for your docker images in one go, no matter how the image has been configured.
Anything in particular you'd like reviewers to focus on?
Be extra observant, as this is the first time I touch the Reference code. I put most of the code in the
rewrite-java
package, so maybe that could be improved as well.Checklist