Jenkins Pipeline Builds: Viewing Workspace in the UI

Jenkinsjenkins-pipeline

We are now experimenting with multi-branch Pipeline builds. The main advantage of the feature is that it allows us to automatically create new Jenkins jobs whenever a new branch is created.

However, it also is a bit more difficult to implement than the old way of selecting how to do the build using the UI. Plus, certain features seem to be missing.

For example, in Jenkins Freestyle jobs, we are able to use the Jenkins UI to browse through the workspace, download individual files, and even wipe out the workspace. We found this helpful when builds went awry or if the developer needed a particular built asset that wasn't archived.

I've noticed in the Jenkins Pipeline jobs the UI no longer offers access to the workspace. I know I can archive the workspace, but I really don't want to save it — especially for each and every build. I simply want to be able to browse the workspace or clean it out if something is causing problems with the build process.

Is there a way to get back this feature via the pipeline? I don't want to archive the workspace for each build (space issues), but I do want to be able to see what the workspace looks like if there are problems.

Freestyle Job with *Workspace* UI

Freestyle Job with Workspace UI


Pipeline Job. No ability to browse Workspace

Pipeline Job. No ability to browse Workspace

Best Answer

You can see your work space in three simple steps:

  1. First, go to the build run you are interested in and click “pipeline steps”.

  2. Then click “allocate node: start”. If you have multiple nodes, you’ll need to do this more than once.

  3. Then you click the workspace link. (it appears on the left pane).