Cant open Blue Ocean visual pipeline editor
Asked Answered
S

2

5

Recently I installed Blue Ocean plugin, but I can't find out how to edit or create pipeline using plugin's UI.

When I create new pipeline in Blue Ocean and connect with GitLab repo, I don't have option to create/edit pipeline (Jenkinsfile file). No matter if repo contains it or not. When Ocean connects to git server creation is over.

I cannot open visual pipeline editor via URL ([local-address]/blue/organizations/jenkins/pipeline-editor/[project-name]). I get error alert with message:

Error loading Pipeline

There was an error loading the pipeline from the Jenkinsfile in this repository. Correct the error by editing the Jenkinsfile using the declarative syntax then commit it back to the repository.

Server Error

Meanwhile script works perfectly in Blue Ocean's branches tab. It shows steps, artifacts, outputs, etc.

I've tried also with example, trivial scripts from tutorial pages. None of them can convince visual editor that they are OK. Of course all this scripts are declarative.

Did you have similar problems? Maybe I have to use some special type of Jenkinsflie? Fact that I can't find other way to get to editor other than direct URL seems to be strange.

Sharice answered 9/8, 2017 at 15:20 Comment(0)
S
12

Blue Ocean's pipeline editor does not seem to work properly, cause it still in development.

Although, I have found walk-around. To be able to edit script in fancy visual editor you have to open editor's sandbox-mode page:

[your_jenkins_URL/blue]/organizations/jenkins/pipeline-editor/

Then you have to use magic shortcut Ctrl+S (cause buttons are old-fashioned). Ta-da you now have access to code of displayed things.

Feel free to paste your code and copy back after making changes using this app.

Sharice answered 10/8, 2017 at 12:12 Comment(0)
H
0

You can install the replay pipeline feature available in jenkins. This will allow you to edit your Jenkinsfile and re-run it without committing the changes to your original file (can be done for n number of times). So once you are satisfied with your Jenkinsfile, then you can commit those changes in your original file.

Refer to below link to know more about usage of replay pipeline feature : https://jenkins.io/doc/book/pipeline/development/

Homograft answered 14/8, 2018 at 4:54 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.