Issue Type: New Feature New Feature
Assignee: Jesse Glick
Components: workflow-plugin
Created: 17/Dec/14 12:05 AM
Description:

Adding classpath from workspace?

By constructing URL with an instance of URLStreamHandler we can create a URL space that can access files over FilePath. This would enable primitives like this:

node {
  git url:'my-shared-script.git', credentialId: '1234-5678-deadbeefdeadbeef'
  
  addClassPath "."

  ...
}

There's some details that need to be figured out how to prevent classloader from continuing to use workspace after the workspace goes out of scope.

"Add classpath from SCMSource" primitive

The idea is similar here except the custom URLStreamHandler uses SCMSource to access files without ever checking out anything.

library type:'git', remote:'my-shared-script.git', credentialId: '1234-5678-deadbeefdeadbeef'
  
...

Primitive that uses SCM to checkout stuff into the master

Instead of messing around with URLStreamHandler, just use ordinary SCM and checkout code into some hidden locations on the master and adds that local directory as classpath.

Needs to be seen if SCM checkout have any unwanted side-effect to the project or to the master.

Security Considerations

In all the cases, do not allow class files, jar files to be added directly to the classpath as it'd bypass the sandbox.

Project: Jenkins
Priority: Major Major
Reporter: Jesse Glick
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