Problems with older versions of Blue Ocean plugin and git

Article ID:115003929232
2 minute readKnowledge base

Issue

  • We want to use the Blue Ocean Pipeline Visual Editor but the options are not available using Git.

  • We want to create the Jenkinsfile in the repository automatically with Blue Ocean using Git.

  • When I tried to create a new Jenkinsfile in Blue Ocean I received the message: "You don’t have any branches that contain a Jenkinsfile".

Environment

Resolution

Inside Beekeeper the Blue Ocean plugin version available are:

  • For CJP 2.73.2.1 or lower - Blue Ocean plugin version: 1.1.7 or lower

  • For CJP 2.73.3.1 or higher - Blue Ocean plugin version: 1.3.0 or higher

If your Blue Ocean plugin version is lower than 1.3.0 you have the options for creating a new Jenkinsfile inside a branch and use the Pipeline Visual Editor only for GitHub repositories.

If you use Git repository and you try to Blue Ocean plugin create a Jenkinsfile for you, you’ll obtain:

ERROR: You don’t have any branches that contain a Jenkinsfile

Blue Ocean 1.3.0 is the first version with the Pipeline Visual Editor for Git repositories. Prior versions require that you create the Jenkinsfile in the branch of your repository.

Creating a Pipeline for a Git Repository

Blue Ocean versions 1.3.0 and later include both GitHub and native git "Pipeline" editing in the visual editor.

Earlier versions of Blue Ocean report "no Jenkinsfile" on Git repositories. Newer versions will offer to create a Jenkinsfile.

The Pipeline Visual Editor is not available for the Git option in the Blue Ocean plugin lower than 1.3.0. The Pipeline Visual Editor has been released for Git repositories with Blue Ocean version 1.3.0 and later:

Roadmap for Git repositories

For GitHub all these options are available for versions lower than 1.3.0

Pipeline Visual Editor