Skip to content

Conversation

@samrocketman
Copy link
Member

@samrocketman samrocketman commented Jun 23, 2023

Relates to jenkinsci/snakeyaml-api-plugin#75

I'll need to make a followup release for snakeyaml fix (after autorelease). There will be breaking code changes for the jervis library update (jervis 1.7 -> jervis 2.0) so this should be a separate PR.

- Convert from building with Gradle to Maven.
- Update plugin for continuous automated release.
samrocketman added a commit to samrocketman/repository-permissions-updater that referenced this pull request Jun 23, 2023
Repository link
---------------

https://github.com/jenkinsci/scm-filter-jervis-plugin

Enabling auto-release
---------------------

See my PR; please review jenkinsci/scm-filter-jervis-plugin#6

My checklist:

- [x] I have provided a link to the pull request in my plugin, which enables CD according to the documentation.

Reviewer checklist
------------------

- [ ] Check that the `$pluginId Developers` team has `Admin` permissions while granting the access.
- [ ] In the case of plugin adoption, ensure that the Jenkins Jira default assignee is either removed or changed to the new maintainer.
- [ ] If security contacts are changed (this includes add/remove), ping the security officer (currently `@Wadeck`) in this pull request. If an email contact is changed, wait for approval from the security officer.

There are [IRC Bot commands](https://jenkins.io/projects/infrastructure/ircbot/#issue-tracker-management) for it.
@samrocketman
Copy link
Member Author

samrocketman commented Jun 23, 2023

@timja I can't get this plugin to work in the latest version of Jenkins.

I can bootstrap the latest version of jenkins and install this plugin. No filter traits show up in GitHub branch source plugin. It worked in Gradle; it currently does not work building with Maven.

@samrocketman
Copy link
Member Author

I verified the jars are in the classpath via script console.

import net.gleske.jervis.tools.AutoRelease
import net.gleske.scmfilter.credential.GraphQLTokenCredential

AutoRelease.getScriptFromTemplate('${hello} ${world}', [hello: 'goodbye', world: 'friend'])

I'm a bit stumped as to why the filter doesn't show up as an SCM filter trait. I can't release it in this condition...

@samrocketman
Copy link
Member Author

samrocketman commented Jun 23, 2023

In the new Jar I see META-INF/services/annotations/org.kohsuke.accmod.Restricted which contains my messages class net.gleske.scmfilter.impl.trait.Messages; that seems to be missing in the old?

edit: scm-filter-branch-pr-plugin has the same thing and it works so I don't think that's it.

@samrocketman
Copy link
Member Author

I guess the next thing to try is look to other plugins using maven to compile groovy like job-dsl.

@samrocketman
Copy link
Member Author

Switching to GMavenPlus (which is what Job DSL plugin uses to compile groovy) fixed everything. I also upgraded to Java bytecode to Java 1.8. It took a bit for me to figure out how and I documented this process in a false bug report groovy/GMavenPlus#256

@samrocketman samrocketman merged commit 7c0bc18 into main Jun 24, 2023
@samrocketman samrocketman deleted the auto-release branch June 24, 2023 17:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants