[JIRA] (JENKINS-50328) Pipeline editor not working if Script Path is set

6 views
Skip to first unread message

vitor@nmap.com.br (JIRA)

unread,
Mar 21, 2018, 7:20:02 PM3/21/18
to jenkinsc...@googlegroups.com
Vitor Durante created an issue
 
Jenkins / Bug JENKINS-50328
Pipeline editor not working if Script Path is set
Issue Type: Bug Bug
Assignee: Kirill Merkushev
Attachments: image-2018-03-21-20-14-50-270.png
Components: blueocean-pipeline-editor-plugin, blueocean-plugin, github-plugin
Created: 2018-03-21 23:19
Environment: Jenkins 2.107.1
Priority: Major Major
Reporter: Vitor Durante

I have created a pipeline from a GitHub repository. Inside this repository, there is a subfolder called jenkins with a Jenkinsfile inside, just like in the example app: https://github.com/jenkins-docs/creating-a-pipeline-in-blue-ocean. Blue Ocean prompted me to design a new pipeline. Instead, I went to the settings and set the Script Path manually to 'jenkins/Jenkinsfile':

It does work as intended. The hooks are activated and the pipeline is run properly, but if I try to edit the pipeline using pipeline editor, it shows an empty pipeline. If I do implement a pipeline in the editor and save it, a Jenkinsfile is created in the root path of my repository.

It seems the pipeline editor is not getting the Jenkinsfile path from 'Script Path' setting

Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v7.3.0#73011-sha1:3c73d0e)
Atlassian logo

vitor@nmap.com.br (JIRA)

unread,
Mar 21, 2018, 7:21:04 PM3/21/18
to jenkinsc...@googlegroups.com
Vitor Durante updated an issue
Change By: Vitor Durante
I have created a pipeline from a GitHub repository. Inside this repository, there is a subfolder called jenkins with a Jenkinsfile inside, just like in the example app: [https://github.com/jenkins-docs/creating-a-pipeline-in-blue-ocean]. Blue Ocean prompted me to design a new pipeline. Instead, I went to the settings and set the Script Path manually to 'jenkins/Jenkinsfile':

!image-2018-03-21-20-14-50-270.png!


It does work as intended. The hooks are activated and the pipeline is run properly, but if I try to edit the pipeline using pipeline editor, it shows an empty pipeline. If I do implement a pipeline in the editor and save it, a Jenkinsfile is created in the root
path of my repository.


It seems the pipeline editor is not getting the Jenkinsfile path from 'Script Path' setting

mail@andrejesus.pt (JIRA)

unread,
Mar 28, 2018, 9:53:02 AM3/28/18
to jenkinsc...@googlegroups.com
André Jesus commented on Bug JENKINS-50328
 
Re: Pipeline editor not working if Script Path is set

Hi!

Have the same issue, not on a different path, but just with a different name.

Can't find a solution for this.

zhaoshen@shanghai-electric.com (JIRA)

unread,
May 2, 2018, 10:21:02 PM5/2/18
to jenkinsc...@googlegroups.com
Sam Zhao commented on Bug JENKINS-50328

Have the same problem. Only can build with a different Jankinsfile name. Can't modify pipeline by pipeline-editor.

antti.turpeinen@cgi.com (JIRA)

unread,
Dec 28, 2018, 3:32:02 AM12/28/18
to jenkinsc...@googlegroups.com

I also have the same problem. We have multiple projects inside one git repository and we would like to use multiple Jenkinsfile. It would be great if we could use git sparse checkout and set Jenkinsfile inside those "sparsed" folders. At least the editor should be able to use the correct Jenkinsfile. 

This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)

stelminator@gmail.com (JIRA)

unread,
Jan 30, 2019, 5:47:04 PM1/30/19
to jenkinsc...@googlegroups.com

I couldn't find any reference to the path in the /blue/rest/ api responses, which makes some sense because the objects on that API all seem to be from the perspective of the pipeline, not from the job that defines the pipeline.  i.e. I'm not sure where the path would go, maybe on the pipeline object, maybe on the scm object below that, but neither feels quite right.  However, since this is the api used to fill the editor, it really should go somewhere.

jyanko@howlingduck.com (JIRA)

unread,
Jun 5, 2019, 2:28:01 PM6/5/19
to jenkinsc...@googlegroups.com

Just discovered this problem today while working on team adoption of Jenkins / BlueOcean.

In our case, dev started out with placing the Jenkinsfile at the repo path /build/Jenkinsfile rather than at /Jenkinsfile and defining the path to the jenkinsfile in the job here http://<hostname>/jenkins/job/<jobname>/configure

As others have mentioned, builds do run, but the BlueOcean editor does not show any stages or steps when a user looks there.  This in turn creates confusion since they see the steps in the build results screen, but not in the editor screen where they expect to see them.

At this point, I'm concerned of the psychology at play when working with teams to get started using this.  One of the selling points on BlueOcean to management is that it makes it easy to use and build the job steps, and the code gets commited to your repo easily.   So changes can be made in a UI or by hand.

In practice, when one project keeps the Jenkinsfile at root and another stores it elsewhere, this confuses the newer user who may be looking at a job configured by someone else for inspiration on how to add steps to a project/pipeline they are working on themselves when they see stages and steps in one project that but another appears to have no steps when they look at it in the UI.

 

 

 

 

 

rbaron@rbaron.net (JIRA)

unread,
Jul 4, 2019, 3:12:03 AM7/4/19
to jenkinsc...@googlegroups.com

I'm experiencing the same issue. My use case is: I have a monorepo with independent pipelines (different Jenkinsfiles) on two subdirectories. Both pipelines run fine and show the correct step in blue ocean. Only the editor doesn't seem to recognize the Jenkinsfiles - it shows an empty view when you try to edit any of them.

petersens@rocketmail.com (JIRA)

unread,
Jan 30, 2020, 12:17:03 AM1/30/20
to jenkinsc...@googlegroups.com
J P commented on Bug JENKINS-50328

Submitted PR with potential fix here: https://github.com/jenkinsci/blueocean-plugin/pull/2049

This message was sent by Atlassian Jira (v7.13.6#713006-sha1:cc4451f)
Atlassian logo

petersens@rocketmail.com (JIRA)

unread,
Feb 10, 2020, 3:26:06 PM2/10/20
to jenkinsc...@googlegroups.com
J P closed an issue as Fixed
 

Fixed in 1.22.0.

Change By: J P
Status: Open Closed
Resolution: Fixed
Released As: https://github.com/jenkinsci/blueocean-plugin/releases/tag/blueocean-parent-1.22.0

petersens@rocketmail.com (JIRA)

unread,
Feb 10, 2020, 3:27:03 PM2/10/20
to jenkinsc...@googlegroups.com
J P edited a comment on Bug JENKINS-50328
 
Re: Pipeline editor not working if Script Path is set
Fixed in BlueOcean 1.22.0.
Reply all
Reply to author
Forward
0 new messages