Daniel Beck commented on Improvement JENKINS-25330

Ali Raza:

Here's a build of a plugin that adds this feature to the configuration of folders (needs Folders 4.6.1, Jenkins 1.565.3; but that can be changed):
https://dl.dropboxusercontent.com/u/29853/short-workspace.hpi

  • Allows enabling option per folder on the folder's config screen ("Use short workspace paths")
    • has additional option "Place short workspace inside the workspace of this folder" to place workspace directory with short name inside folder's workspace, to still have some organization
  • Works for freestyle projects, matrix projects, and build flows (and everything else with regular workspace implementation)
  • Uses JENKINS_HOME/workspace/... on master, configured slave workspace directory (hudson.model.Slave.workspaceRoot) on slaves
  • Tested with Windows slaves, works like a charm (except Subversion checkout in Build Flow didn't work for some reason – build.workspace.child("foo").write("bar", "UTF-8") in the DSL however did).

Diagnostic information is logged to org.jenkinsci.plugins.shortworkspace.ShortWorkspaceLocator.

Configure the name of the top-level workspace folder on the Jenkins master node (default: "workspace") by setting the system property org.jenkinsci.plugins.shortworkspace.ShortWorkspaceLocator.defaultWorkspaceFolder. Example: java -Dorg.jenkinsci.plugins.shortworkspace.ShortWorkspaceLocator.defaultWorkspaceFolder=ws -jar jenkins.war


The following requirements were possibly not followed to the letter; clarification would be appreciated:

  • "No forking, release required" – I opted for a new plugin (that will be published to github.com/jenkinsci and released to Update Center).
  • "As long as it can be applied globally" – It's configurable per folder; let me know if you need a fully global option
  • "must apply to both freestyle job type and buildflow job type" – This plugin applied to all regular job types

Let me know what you think.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira

--
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to