Questions tagged [multibranch-pipeline]

Multibranch Pipeline is a Jenkins job configuration type provided by the Pipeline: Multibranch Plugin that detects and builds SCM branches.

Multibranch Pipeline is a Jenkins job configuration type provided by the Pipeline: Multibranch Plugin that detects and builds SCM branches.

310 questions
14
votes
1 answer

Restrict health metrics by branches in a multi branch pipeline job

In a multibranch Jenkins job, you can decide to show health metrics and they are obtained from the branch with the worse health. This is fine, except that it is common to have feature branches that fail and thus bring a poor general status to the…
Uko
  • 13,134
  • 6
  • 58
  • 106
13
votes
1 answer

Jenkins Multi-branch pipeline doesn't schedule tag jobs

I'm trying to get Jenkins' multibranch pipeline job to build tags in a similar manner to branches. In Jenkins 2.73 (not sure when the functionality was added), Multibranch projects can be configured to retrieve both branches and tags from the source…
martsa1
  • 163
  • 1
  • 7
13
votes
1 answer

GitHub required status checks from Jenkins for forks vs local branches

I have a GitHub repository established with a Multibranch Pipeline job in Jenkins, and until now have been content to require the continuous-integration/jenkins/branch status check, as Jenkins posts when building a local branch from the repo.…
Nick Jones
  • 4,395
  • 6
  • 33
  • 44
12
votes
4 answers

How to schedules jobs with specific parameters in a Jenkins multibranch pipeline

We were having 2 FreeStyle projects on Jenkins: One to generate builds(daily builds+manual builds), one other to execute tests. We are moving to a Multibranch pipeline on jenkins, so my understanding is that we have one project per repository, and…
J4N
  • 19,480
  • 39
  • 187
  • 340
12
votes
3 answers

How to only build one directory in a Jenkins multi-branch pipeline job?

I have a github repo called multibranch-test with two sub-directories Project1, Project2. PS C:\Repos\multibranch-test> tree . Folder PATH listing for volume Windows Volume serial number is…
Mark Allison
  • 6,838
  • 33
  • 102
  • 151
12
votes
3 answers

Triggering Branch Indexing on Multibranch Pipelines (Jenkins/Git)

I'm trying to automatically trigger 'Branch Indexing' on a Multibranch Pipelines job in Jenkins. At the moment, only one method seems to actually work, which is polling, but I am unable to do that and polling is a bad solution anyway. The plug-in…
Lee Winder
  • 857
  • 12
  • 35
11
votes
4 answers

Jenkins Multi-Branch job fails for some branches

I have a Jenkins Multi branch job that checks out and builds code from GitLab. Until recently it was working without issue but now some (but not all) branches from the good master fail to build. Master always builds without issue. When I branch…
AlRal
  • 216
  • 3
  • 10
11
votes
2 answers

How to disable branch in Multibranch pipeline with Jenkinsfile

I have a Multi branch pipeline project in Jenkins. I want to disable a branch while it is listed in pipeline project. I can add an exception to surpass scm triggering. But I want to disable all the triggering including manual triggering. If I used…
Gayan Viranka
  • 443
  • 1
  • 6
  • 17
10
votes
2 answers

Jenkins + Git: Only build if PR introduced changes in subdirectory

We have a large monorepo with multiple projects (A and B) inside of it. I currently have Jenkins setup as a Multibranch Pipelines project that watches the monorepo for PRs. If a PR is created, Jenkins builds both A and B. Now, I want Jenkins to be…
Gillespie
  • 5,780
  • 3
  • 32
  • 54
10
votes
1 answer

Jenkins Multibranch Pipeline Lightweight Checkout

The Jenkins Pipeline plugin has a feature known as "lightweight checkout", where the master only pulls the Jenkinsfile from the repo, as opposed to the entire repo. There's a corresponding checkbox in the configuration screen. I'd like to do a…
Steve Wall
  • 1,842
  • 5
  • 21
  • 50
9
votes
3 answers

Execute Jenkins Pipeline step only when building a tag

I have certain build logic, such as publication, that I would like to have Jenkins perform only when it is building a Git tag. How can I accomplish this using Jenkin's Declarative Pipeline? In other words, I am trying to build functionality…
9
votes
1 answer

Using a different jenkinsfile path with Blue Ocean

Summary The Blue Ocean editor ignores the Script Path setting for the multibranch pipeline plugin and instead saves the Jenkinsfile in the repository root. Is this a bug? Background We have a single repository with several projects in it, so we're…
9
votes
1 answer

Triggering a multibranch pipeline job from an other multibranch pipeline

I have a scenario where but I have 2 projects (A and B), both are configured in Jenkins with multibranch pipeline jobs, problem is that Project B depends on Project A. So I find that some times when I check in code in Project A, I also need to build…
8
votes
2 answers

Jenkins multibranch pipeline does not respect quiet period in Jenkinsfile

I am using a Declarative Jenkinsfile with quiet period: options { quietPeriod(180) // more options } Tool versions: Jenkins - 2.190.3 Pipeline Multibranch Plugin - 2.21 Pipeline Declarative Plugin - 1.4.0 Now the issue is that on…
8
votes
2 answers

Jenkins: How to set the periodic scan interval of jobs under GitHub organizations?

When configuring GitHub Organization Folders (GitHub Branch Source Plugin) in Jenkins, you can set the interval of periodic scan of the entire organization. . However, I discovered that this does not affect the interval for scanning the branches of…
1
2
3
20 21