jenkinsci / jenkinsci/script-security-plugin

[JENKINS-17418] Enhancement to all Groovy Editing Interfaces to allow easy use of External Groovy Editors

Open
#637 3 comments 0 reactions 0 assignees View on GitHub
component:groovy-plugin component:script-security-plugin component:scriptler-plugin imported-jira-issue priority:minor resolution:unresolved
Dominant language
Java
Stars
76
Forks
181
Avg merge
14h 55m
Merged PRs (30d)
3

Description

In all cases the Jenkins Groovy editors are limited. No, I am not asking for more features for the editor itself, but it occurs to me that a fairly simple enhancement to all of these interfaces could make it very easy to hop in/out of your favorite Groovy Editor; Mine is Netbeans.

Like most editors, Netbeans monitors the disk to notice if the file has been changed outside the editor.

So if Script Console for instance would after 5 seconds of no typing, save the file to %JENKINS_HOME%/GroovyScript/ScriptConsole.groovy (or whatever) ... I could then stop typing and almost immediately have the current script in Netbeans (assuming Netbeans currently had that file open). Similarly then, once I finish all my auto-tab, intellisensed changes in Netbeans, I hit "save" and the Groovy Console could then pull back in my changes and I could run them. I could easily make changes in either editor as was most convenient and jump back and forth without all the usual copy/paste nonsense.

Script Console could even offer the previous script back on the start of a new session.

Groovy Postbuild has the additional issue that Postbuild is on a job by job basis, so it save area might be %JENKINS_HOME%/GroovyScript/%ITEM_ROOTDIR.groovy. (The name isn't important, but you get the idea).

Scriptler in a sense already has the files saved, but in an XML file with lots of other metadata that gets in the way. It might save a "clean" version of the groovy in %JENKINS_HOME%/GroovyScript/Scripter.groovy. It would not need to offer all the scripts this way . . . only the script currently being edited.

---
Originally reported by fmerrow, imported from: Enhancement to all Groovy Editing Interfaces to allow easy use of External Groovy Editors


  • assignee: vjuranek
  • status: Open
  • priority: Minor
  • component(s): groovy-plugin, script-security-plugin, scriptler-plugin
  • resolution: Unresolved
  • votes: 0
  • watchers: 4
  • imported: 2025-12-09

Raw content of original issue

In all cases the Jenkins Groovy editors are limited. No, I am not asking for more features for the editor itself, but it occurs to me that a fairly simple enhancement to all of these interfaces could make it very easy to hop in/out of your favorite Groovy Editor; Mine is Netbeans.

Like most editors, Netbeans monitors the disk to notice if the file has been changed outside the editor.

So if Script Console for instance would after 5 seconds of no typing, save the file to %JENKINS_HOME%/GroovyScript/ScriptConsole.groovy (or whatever) ... I could then stop typing and almost immediately have the current script in Netbeans (assuming Netbeans currently had that file open). Similarly then, once I finish all my auto-tab, intellisensed changes in Netbeans, I hit "save" and the Groovy Console could then pull back in my changes and I could run them. I could easily make changes in either editor as was most convenient and jump back and forth without all the usual copy/paste nonsense.

Script Console could even offer the previous script back on the start of a new session.

Groovy Postbuild has the additional issue that Postbuild is on a job by job basis, so it save area might be %JENKINS_HOME%/GroovyScript/%ITEM_ROOTDIR.groovy. (The name isn't important, but you get the idea).

Scriptler in a sense already has the files saved, but in an XML file with lots of other metadata that gets in the way. It might save a "clean" version of the groovy in %JENKINS_HOME%/GroovyScript/Scripter.groovy. It would not need to offer all the scripts this way . . . only the script currently being edited.


  • environment: All Groovy Editors: Script Console, groovy-postbuild, scriptler (others?)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.