Create a hudson/jenkins job with a web-form upload

2019-02-11 20:06发布

问题:

I have a requirement to create a job where a web upload (IE a post with a file) is going to be required. Is there a way to do this? (I've tried searching the web). Note that the files in question could be very large.

Workflow (for clarity): User clicks build in job menu, user can set parameters and make an upload, user clicks submit and job is built with that file as a source.

Other use case: The job is started remotely with a POST operation to upload the file and set the parameters.

回答1:

You can create a Parameterized Build in which there is a File parameter for the user to upload their file.

File parameter allows a build to accept a file, to be submitted by the user when scheduling a new build. The file will be placed inside the workspace at the known location after the check-out/update is done, so that your build scripts can use this file.