Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-53291

Visual Pipeline Editor does not work if the job is inside folders

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • None
    • OS: Windows Server R2 2008 Fundation (x64)
      Jenkins Version : Jenkins ver. 2.121.3 LTS
      - Plugins
      - - Blue Ocean 1.8.2
      - - Blue Ocean Pipeline Editor 1.8.2

      When the pipeline is located in the main view (root) of the Jenkins, from the Blue Ocean Dashboard you can access the Visual Pipeline Editor
      The pen is displayed in the top menu and allows access to the Pipeline edition.

      When the pipeline is moved inside a Folder (CloudBees Folders Plugin), the pen disappears to access the Pipeline edition.

          [JENKINS-53291] Visual Pipeline Editor does not work if the job is inside folders

          Levente Csoke added a comment -

          +1. Doesn't seem like a huge fix, but would be very nice to have it working properly.
          Or is it intended?

          Levente Csoke added a comment - +1. Doesn't seem like a huge fix, but would be very nice to have it working properly. Or is it intended?

          Nick Floersch added a comment - - edited

          +1 - This is annoying. I want to organize my various pipelines into sub-folders but as soon as I move a pipeline into a sub-folder, boom, no editing in the BO Visual Pipeline Editor. Currently using 1.13.2

          Nick Floersch added a comment - - edited +1 - This is annoying. I want to organize my various pipelines into sub-folders but as soon as I move a pipeline into a sub-folder, boom, no editing in the BO Visual Pipeline Editor. Currently using 1.13.2

          I am seeing the same issue with no pencil icon/link to edit inside a folder. I did however check a couple of projects in my org that were not in folders and I structured a URL that indeed brought me to the pipeline editor for the jenkinsfile in my branch. https://<yourjenkinsroot>/blue/organizations/jenkins/pipeline-editor/<FOLDERNAME>%2F<PROJECT_NAME>/<BRANCH_NAME>/

          the "%2F" in between the project name and branch name is some type of HTML escape code, I'm not sure why its there but YMMV.

          This is the version info at the bottom of the blue ocean page on our Jenkins instance. 1.23.1 · Core 2.222.3 · 68f77d9 · 28th April 2020 11:59 AM

          Bryce DeAlessio added a comment - I am seeing the same issue with no pencil icon/link to edit inside a folder. I did however check a couple of projects in my org that were not in folders and I structured a URL that indeed brought me to the pipeline editor for the jenkinsfile in my branch. https://<yourjenkinsroot>/blue/organizations/jenkins/pipeline-editor/<FOLDERNAME>%2F<PROJECT_NAME>/<BRANCH_NAME>/ the "%2F" in between the project name and branch name is some type of HTML escape code, I'm not sure why its there but YMMV. This is the version info at the bottom of the blue ocean page on our Jenkins instance. 1.23.1 · Core 2.222.3 · 68f77d9 · 28th April 2020 11:59 AM

          david abbey added a comment -

          Having this issue with CloudBees Core Managed Master 2.204.3.7-rolling
          Is there any update or resolution?
          If any of our multibranch pipelines are created somewhere other than the root folder, blue ocean cannot find/see them.

          david abbey added a comment - Having this issue with CloudBees Core Managed Master 2.204.3.7-rolling .  Is there any update or resolution? If any of our multibranch pipelines are created somewhere other than the root folder, blue ocean cannot find/see them.

          Chris added a comment -

          Bump? Seems like an easy thing to fix (I hope) in order to make Blue Ocean much more valuable to us. It's been almost 2.5 years since this was posted, and this minor but meaningful bug is still ... well, bugging us. 

          Put another way, the following process sucks:

          • build a pipeline in Blue Ocean
          • get it working
          • move it into a folder
          • use it for a while
          • if you only use it for a short time, like an hour, and you need to modify it, move it back out of the folder so you can go back to the editor
          • if you use it for a longer time, like a year, and you need to modify it, stare at the place where the pencil icon is supposed to be and wonder what the hell happened

          I know this is a small bug, but I would certainly like it addressed. The above process just sucks too much - it makes me almost want to just toss Blue Ocean altogether, in spite of its obvious value, when I have a lot of work going on in Jenkins.

          Thanks for considering this.

          Chris added a comment - Bump? Seems like an easy thing to fix (I hope) in order to make Blue Ocean much more valuable to us. It's been almost 2.5 years since this was posted, and this minor but meaningful bug is still ... well, bugging us.  Put another way, the following process sucks: build a pipeline in Blue Ocean get it working move it into a folder use it for a while if you only use it for a short time, like an hour, and you need to modify it, move it back out of the folder so you can go back to the editor if you use it for a longer time, like a year, and you need to modify it, stare at the place where the pencil icon is supposed to be and wonder what the hell happened I know this is a small bug, but I would certainly like it addressed. The above process just sucks too much - it makes me almost want to just toss Blue Ocean altogether, in spite of its obvious value, when I have a lot of work going on in Jenkins. Thanks for considering this.

          The issue seems to be right here in loadPipelineMetadata(), loadBranchMetadata() and save(...) when the / is used for splitting and group 0 assumed to be the team:
          https://github.com/jenkinsci/blueocean-plugin/blob/master/blueocean-pipeline-editor/src/main/js/EditorPage.jsx#L300

          const split = pipeline.split('/');
          const team = split[0];
          (const repo = split[1];)
          

          which is used as a pipeline name here:
          https://github.com/jenkinsci/blueocean-plugin/blob/master/blueocean-pipeline-editor/src/main/js/EditorPage.jsx#L619

          A simple fix might be to use every element of the split except for the last one for the team and the last element for the repo. Not sure if this might break something else. But from a quick overview of the code it does not look like it

          Sebastian Racs added a comment - The issue seems to be right here in loadPipelineMetadata(),  loadBranchMetadata() and save(...) when the / is used for splitting and group 0 assumed to be the team: https://github.com/jenkinsci/blueocean-plugin/blob/master/blueocean-pipeline-editor/src/main/js/EditorPage.jsx#L300 const split = pipeline.split( '/' ); const team = split[0]; ( const repo = split[1];) which is used as a pipeline name here: https://github.com/jenkinsci/blueocean-plugin/blob/master/blueocean-pipeline-editor/src/main/js/EditorPage.jsx#L619 A simple fix might be to use every element of the split except for the last one for the team and the last element for the repo. Not sure if this might break something else. But from a quick overview of the code it does not look like it

          Here it seems to be implemented correctly with the branch name being spliced of the end of the pipeline name: https://github.com/jenkinsci/blueocean-plugin/blob/master/blueocean-pipeline-editor/src/main/js/PipelineEditorLink.jsx#L33

          Sebastian Racs added a comment - Here it seems to be implemented correctly with the branch name being spliced of the end of the pipeline name: https://github.com/jenkinsci/blueocean-plugin/blob/master/blueocean-pipeline-editor/src/main/js/PipelineEditorLink.jsx#L33

          Sebastian Racs added a comment - Pull Request: https://github.com/jenkinsci/blueocean-plugin/pull/2217

          Olivier Lamy added a comment -

          thanks for the PR

          Olivier Lamy added a comment - thanks for the PR

            sebracs Sebastian Racs
            mariano92 Mariano
            Votes:
            3 Vote for this issue
            Watchers:
            11 Start watching this issue

              Created:
              Updated:
              Resolved: