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

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

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved (View Workflow)
    • Minor
    • Resolution: Fixed
    • 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

    Description

      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.

      Attachments

        1. 1-A-pipeline-en-root.jpg
          131 kB
          Mariano
        2. 1-B-blue-ocean-editor-ok.jpg
          71 kB
          Mariano
        3. 2-A-pipeline-en-folder.jpg
          117 kB
          Mariano
        4. 2-B-blue-ocean-editor-not-found.png
          45 kB
          Mariano

        Activity

          __xxskycaptainxx__ 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.

          __xxskycaptainxx__ 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

          sebracs 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

          sebracs 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
          sebracs Sebastian Racs added a comment - Pull Request: https://github.com/jenkinsci/blueocean-plugin/pull/2217
          olamy Olivier Lamy added a comment -

          thanks for the PR

          olamy Olivier Lamy added a comment - thanks for the PR

          People

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

            Dates

              Created:
              Updated:
              Resolved: