Can a plugin access the workspace from the job configuration page?

14 views
Skip to first unread message

Andrew Sumner

unread,
Sep 3, 2016, 6:37:34 AM9/3/16
to jenkin...@googlegroups.com

I’d like to place a validation button on the job configuration page to verify that an ant fileset is valid AND finds something in the workspace.

 

Is anyone aware of any plugins that do this? Its always easier to copy someone else’s code when dealing with this stuff 😊

 

Regards

  Andrew

 

 

 

 

Robert Sandell

unread,
Sep 5, 2016, 9:25:33 AM9/5/16
to jenkin...@googlegroups.com
The archive artefacts publisher (in core) does this iirc, but you aren't guaranteed that a workspace can be provided for you always, like never for pipelines and only sometimes for freestyle, like if the job has never been built or the node where the last build ran is gone etc.

/B

--
You received this message because you are subscribed to the Google Groups "Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-dev+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/BAY402-EAS247BEE683215985DE2B0700BCE40%40phx.gbl.
For more options, visit https://groups.google.com/d/optout.



--
Robert Sandell
Software Engineer
CloudBees Inc.

Daniel Beck

unread,
Sep 5, 2016, 10:04:05 AM9/5/16
to jenkin...@googlegroups.com

> On 03.09.2016, at 12:37, Andrew Sumner <andrew...@xtra.co.nz> wrote:
>
> I’d like to place a validation button on the job configuration page to verify that an ant fileset is valid AND finds something in the workspace.

The regular ArtifactArchiver in core does that as part of the path form validation. Check ArtifactArchiver.DescriptorImpl#doCheckArtifacts(…).

Reply all
Reply to author
Forward
0 new messages