script-security-plugin icon indicating copy to clipboard operation
script-security-plugin copied to clipboard

performant multi-run support

Open akostadinov opened this issue 7 years ago • 5 comments

Hello, I want to be able to run a groovy script many times without needless overhead. This is needed for me to implement custom log lines processing in Logstash plugin. At the same time I'd like the convenience and safety of all the magic presently done by the secure groovy script plugin. This modification is to allow that.

Sorry about white-space changes. It's because of the editor settings. If you don't want them, I'll go ahead and revert them. Same about the EditorConfig file. Just thought it is a useful addition. If you like to keep the removed needless whilte spaces, you could add ?w=1 to url of the file diff to have them filtered out while reviewing: https://github.com/jenkinsci/script-security-plugin/pull/169/files?w=1

akostadinov avatar Dec 05 '17 22:12 akostadinov

Any thoughts on this one? Would be really useful to know whether such functionality can be eventually accepted and whether this is the right approach for it.

Thank you.

akostadinov avatar Dec 13 '17 13:12 akostadinov

If you don't want them, I'll go ahead and revert them.

Yes please. It is not just about comfort when reviewing diffs; if we ever need to git cherry-pick changes, etc., it is important for changes to be textually minimal.

jglick avatar Jan 10 '18 20:01 jglick

Hello, updated according to your reasonable comments. Please let me know if you see further possible improvements (or if I missed anything).

One question - would the automatic PR test job deploy a timestamped snapshot or does it have to be deployed in some other way?

akostadinov avatar Jan 18 '18 23:01 akostadinov

would the automatic PR test job deploy a timestamped snapshot

Afraid not.

does it have to be deployed in some other way?

IIRC you just need a jenkins.io account, then I use a helper script:

mvn clean install source:jar deploy:deploy -DaltDeploymentRepository=maven.jenkins-ci.org::default::https://repo.jenkins-ci.org/snapshots/ -DskipTests

Plain mvn deploy will work well enough in most cases (the above handles some corner cases in Jenkins components released to OSSRH etc.).

jglick avatar Mar 20 '18 18:03 jglick

would the automatic PR test job deploy a timestamped snapshot

BTW that has been superseded by JEP-305. Docs

jglick avatar Jun 26 '18 23:06 jglick