Edit workspace files via jenkins UI

jenkins, jenkins-plugins, python

Solution

The closest I can think of that Jenkins offers is a file upload. You can upload file with local changes and then trigger a build. This file will be replaced at already specified location. This feature can be used by making your build parameterized and adding `File Parameter` option. Below is what Jenkins says about the description of this feature.

Accepts a file submission from a browser as a build parameter. The uploaded file will be placed at the specified location in the workspace, which your build can then access and use. This is useful for many situations, such as:

Letting people run tests on the artifacts they built.

Automating the upload/release/deployment process by allowing the user to place the file. Perform data processing by uploading a dataset. It is possible to not submit any file. If it's case and if no file is already present at the specified location in the workspace, then nothing happens. If there's already a file present in the workspace, then this file will be kept as-is.

Problem

Is there an easy way to edit our python files in the Jenkins workspace UI? It would be super nice if we could get code highlighting too!

Original source