Using another jenkinsfile path with Blue Ocean

Summary

The Blue Ocean editor ignores the Script Path parameter for the multi-platform pipeline and instead stores the Jenkins file in the root of the repository. This is mistake?

Background

We have one repository with several projects in it, so we are trying to set up many multiline jobs on the pipeline, each of them pointing to the same repository.

The first problem we encountered was that the Jenkins file that stores the pipeline code was saved in the root directory of the repository, and the problem was that it was the same place for each job. Subsequently, we found that as of June 2017, you can now specify the location of the Jenkins file for each job in the multi-brand pipeline plugin. Fine.

Adding a blue ocean to the mix: when editing a pipeline in the Blue Ocean editor, it seems to ignore the parameter Script Pathand instead stores the resulting pipeline code in a fixed location (the root directory of the repository). However, when completing the task, he chooses the correct location, so it seems to be a mistake with the editor.

We searched the Blue Ocean backlog , but cannot find the existing problem, could we find a new error? We are very new to Jenkins, so I'm not sure that: a) we are not setting it up correctly or b) Blue Ocean should not work that way.

Configuration

Multibranch Pipeline Job 1
Name: Foo
Repository Name: test
Build Configuration -> Script path: Build/Jenkins/Foo/jenkinsfile

Multibranch Pipeline Job 2
Name: Bar
Repository Name: test
Build Configuration -> Script path: Build/Jenkins/Bar/jenkinsfile

There are 2 branches in the sample repository, master and dev.

+4
source share

Source: https://habr.com/ru/post/1689317/


All Articles