ExecutorStep adds a WorkspaceAction to track the fact that the flow build used a workspace, and if you navigate the flow graph UI you can get to a workspace browser, but there is not much more than that available. Need:

      • Analogue of noWorkspace.jelly in case a workspace cannot be loaded
      • Nicer DirectoryBrowserSupport.title: WorkflowRun.getFullDisplayName, computer, path, ...
      • Functionality similar to doDoWipeOutWorkspace, though see JENKINS-4646 and related issues
      • FlowNodeViewColumn or other way of seeing a list of workspaces for a build (or for the last build of the project)

          [JENKINS-26138] Support workspaces for Pipeline jobs

          Andrew Gray added a comment -

          Yes ganfotry, but where is the Wipe Out Workspace button?

          Andrew Gray added a comment - Yes ganfotry , but where is the Wipe Out Workspace button?

          Oleg Nenashev added a comment -

          https://github.com/jenkinsci/external-workspace-manager-plugin actually supports browsing of workspaces for Pipeline, but it requires extra configuration

          Oleg Nenashev added a comment - https://github.com/jenkinsci/external-workspace-manager-plugin  actually supports browsing of workspaces for Pipeline, but it requires extra configuration

          Jesse Glick added a comment -

          oleg_nenashev that is unrelated. This issue is just about exposing a proper UI for workspace access in Pipeline builds, without changing runtime behavior.

          Jesse Glick added a comment - oleg_nenashev that is unrelated. This issue is just about exposing a proper UI for workspace access in Pipeline builds, without changing runtime behavior.

          Oleg Nenashev added a comment -

          I understand. This is just one of possible workarounds if the feature is really needed

          Oleg Nenashev added a comment - I understand. This is just one of possible workarounds if the feature is really needed

          Jesse Glick added a comment -

          Filed PR with a basic display for classic UI. 2015-09-11 comments, as well as some miscellaneous fixes such as adding a wipe out workspace link, need to be refiled as separate issues, but I think this captures the most common and obvious request.

          Jesse Glick added a comment - Filed PR with a basic display for classic UI. 2015-09-11 comments, as well as some miscellaneous fixes such as adding a wipe out workspace link, need to be refiled as separate issues, but I think this captures the most common and obvious request.

          Devin Nusbaum added a comment -

          A way to easily view all of the workspaces for a specific build (the fourth bullet point in the description) was just added in version 2.24 of Pipeline Supporting APIs Plugin as a sidebar link named Workspaces on the build page.

          Devin Nusbaum added a comment - A way to easily view all of the workspaces for a specific build (the fourth bullet point in the description) was just added in version 2.24 of Pipeline Supporting APIs Plugin as a sidebar link named Workspaces on the build page.

          David Riemens added a comment -

          Is there now a means to get the "workspace URL of multi branch pipeline jenkins projects" programmatically ? Such that I can:

          • add it into an email
          • expose it even within the job itself
            in the tests we are running I want to print an URL to the workspace for failing tests.

          Yes, I can navigate by hand to the workspace via the pipeline steps, but that is very cumbersome with 8 (or more) parallel branches.
          I've even added a  hard-code lookup table in my script, but that breaks as soon as I start multiple of the same jobs.

          NB: when I hover the mouse over the "Allocate node : Start" message, I do get a popup with "ID: 71" or so. All I need is that ID number within my "node {}" block ..

          someone please,,,

          David Riemens added a comment - Is there now a means to get the "workspace URL of multi branch pipeline jenkins projects" programmatically ? Such that I can: add it into an email expose it even within the job itself in the tests we are running I want to print an URL to the workspace for failing tests. Yes, I can navigate by hand to the workspace via the pipeline steps, but that is very cumbersome with 8 (or more) parallel branches. I've even added a  hard-code lookup table in my script, but that breaks as soon as I start multiple of the same jobs. NB: when I hover the mouse over the "Allocate node : Start" message, I do get a popup with "ID: 71" or so. All I need is that ID number within my "node {}" block .. someone please,,,

          David Riemens added a comment -

          dnusbaum : would you have an idea ? Just needed to update my pipeliine scripts, and  again the ID's changed...

          David Riemens added a comment - dnusbaum : would you have an idea ? Just needed to update my pipeliine scripts, and  again the ID's changed...

          Devin Nusbaum added a comment -

          monger39 The fix to this ticket created a new page that lists all workspaces used by the build which is always accessible via a URL like <JENKINS_HOST>/jobs/<JOB_NAME>/<BUILD_NUMBER>/ws, which might be good enough for your purposes.

          If you really need to construct a link to the current workspace inside of of a Pipeline, my recommendation would be to create a new step that looks through enclosing blocks for WorkspaceAction and uses that to return or print a link to the logs. Either way, it would be better to create a new RFE or discuss on the mailing list rather than commenting on this ticket.

          Devin Nusbaum added a comment - monger39 The fix to this ticket created a new page that lists all workspaces used by the build which is always accessible via a URL like <JENKINS_HOST>/jobs/<JOB_NAME>/<BUILD_NUMBER>/ws , which might be good enough for your purposes. If you really need to construct a link to the current workspace inside of of a Pipeline, my recommendation would be to create a new step that looks through enclosing blocks for WorkspaceAction and uses that to return or print a link to the logs. Either way, it would be better to create a new RFE or discuss on the mailing list rather than commenting on this ticket.

          David Riemens added a comment -

          dnusbaum : can you point me to an example to "create a new step that looks through enclosing blocks for WorkspaceAction and uses that to return or print a link to the logs" ? I would not have an idea how to get that.

          For now I implemented a dirty workaround: I made a script that fetches (wget) the  .../lastBuild/flowGraphTable page, and extracts the lines have the info that I need.
          This script I call from my job and generate a table of the numbers (the ID's) that I need. This is obviously far from perfect, but hopefully is sort of auto-correcting.

          I still am hoping for a simple currentBuild.Info.something.ID solution ...

          David Riemens added a comment - dnusbaum : can you point me to an example to "create a new step that looks through enclosing blocks for  WorkspaceAction  and uses that to return or print a link to the logs" ? I would not have an idea how to get that. For now I implemented a dirty workaround: I made a script that fetches (wget) the  .../lastBuild/flowGraphTable page, and extracts the lines have the info that I need. This script I call from my job and generate a table of the numbers (the ID's) that I need. This is obviously far from perfect, but hopefully is sort of auto-correcting. I still am hoping for a simple currentBuild.Info.something.ID solution ...

            jglick Jesse Glick
            jglick Jesse Glick
            Votes:
            112 Vote for this issue
            Watchers:
            125 Start watching this issue

              Created:
              Updated: