-
Notifications
You must be signed in to change notification settings - Fork 16
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
Recipe for Jenkinsfile updates #531
Comments
jenkins-infra/pipeline-library#897 As information related to implicit settings |
But only if the plugin is not running Docker-based tests. A few previous modernization PRs incorrectly added |
@basil Thanks, do you have any example of such recent PR ? The current state is to not overwrite anything if a Jenkinsfile is present until we have logic : plugin-modernizer-tool/plugin-modernizer-core/src/main/resources/META-INF/rewrite/recipes.yml Line 26 in a5c2da3
I think we should be able to detect such types (pom, import) to know detect if we are using docker tests or not The idea behind openrewrite is not not do any destructive changes (For example a Jenkinsfile adding configuration like https://github.com/jenkinsci/warnings-ng-plugin/blob/main/Jenkinsfile#L9-L11 should not lost it's information |
An example is jenkinsci/saml-plugin#157, which (incorrectly) set To be clear, it is always* OK to add an explicit |
Thanks. I almost forget about the spotless issue (that I was facing 1-2 times). I did a small PR to detect such test : https://github.com/jenkins-infra/plugin-modernizer-tool/pull/604/files#diff-bb3dc0c26bd6ab3a8127376a14a65c96c2d5711b783a53a587baa4ae0fc6e690R22-R25 This would help setting the useContainerAgent attribute if missing (typically the if (_import.getPackageName().startsWith("org.testcontainers.containers")) { By experience to you know other framework/library that execute docker test (that are not testcontainer) |
The only other one I have seen is https://github.com/jenkinsci/docker-fixtures which is our homegrown (but less well maintained these days) predecessor to Testcontainers. |
And https://github.com/jenkinsci/kubernetes-plugin/blob/c91e951eaebd823be6ad34478eba9fd50e6a631d/Jenkinsfile#L23-L29 is clearly a snowflake. |
What feature do you want to see added?
Right now the recipes doesn't override the Jenkinsfile in order to not alternate exotic configuration.
We need more logic here when we modernize a plugin. For example
Etc.
See already groovy visitor that extract such information
Upstream changes
None
Are you interested in contributing this feature?
None
The text was updated successfully, but these errors were encountered: