Cant open Blue Ocean visual pipeline editor

有些话、适合烂在心里 提交于 2019-12-09 06:22:21

问题


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.


回答1:


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.




回答2:


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/



来源:https://stackoverflow.com/questions/45594701/cant-open-blue-ocean-visual-pipeline-editor

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!