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
2
votes
0 answers

How to configure Orphaned Items Strategy in MultiBranch project to delete (prune) disabled (deleted) branches without repository scanning? (Jenkins)

I'm trying to configure my Jenkins MultiBranch project so that immediately deletes disabled branches after a respective repository event. For this purpose, I configured the "Orphaned Items Strategy" with "Discard old items" checkbox enabled and an…
cheburek
  • 101
  • 1
  • 8
2
votes
1 answer

Jenkins Multibranch Jenkinsfile with different options

I am trying to apply different pipeline configurations depending on the branch name, mainly with the use of the "discard old builds" option. Is there any documentation on this? Can this be done? i am thinking something like this: pipeline { agent…
2
votes
1 answer

AWS Codepipeline with multiple source and build actions

i am creating a codepipeline for a microservice based application. i want to utilize one single pipeline and codebuild project for this CICD. I have a specific case where i am using more then two actions in source stage. every action gets code from…
2
votes
0 answers

Jenkins Multibranch pipeline branchname suffix

I have the following problem with jenkins, which might be possible lack of understanding/knowledge or it could be duplicate question because I do not really know what to search for or where to search for the info. The scenario: I'm having a…
SPMSE
  • 478
  • 3
  • 14
2
votes
1 answer

Jenkinsfile - Jenkins build user getUserName() NullPointerException: Cannot invoke method getUserName() on null object Mutli Branch Indexing Scanning

Jenkins 2.138.1.2-rolling --and-- using MultiBranch Pipeline (to build build from master, branches and Pull Requests etc). I want to show Jenkins build job's user who initiated the build in build description. Ex: For implemennting the same, in my…
2
votes
1 answer

Git Exclude Region in Multibranch Pipeline Job Not working

I have a GitHub repository and a multi-branch pipeline job. I am trying to exclude some paths from triggering builds, but can't get it to work. Any help would be appreciated. Here are the details. GitHub URL:…
Ven
  • 235
  • 4
  • 12
2
votes
1 answer

Jenkins declarative pipeline configuring the agent using shared library

I would like to be able to specify the agent based on a parameter in my shared library groovy file. I know the following example will work but it requires me to copy the pipeline twice: // vars/selectAgent.groovy def call(String agent) { if…
2
votes
1 answer

Jenkinsfile: how to checkout multiple branch sources in multibranch pipeline?

I've configured multiple branch sources (different repositories) in multibranch pipeline: And in jenkinsfile I want to checkout all this repositories, I've tried next script: node { stage("Checkout") { checkout scm } } But this script…
2
votes
1 answer

Errors when use jenkins JobDSL multibranchPipelineJob with a changing script path declaration

I try to configure jenkins by using only program way (without user interface). I have a docker image, where I install plugins (with job-dsl:latest): FROM jenkins/jenkins:lts USER root ARG DOCKER_GROUP_ID RUN groupadd -g $DOCKER_GROUP_ID docker RUN…
Anton
  • 61
  • 7
2
votes
1 answer

Jenkins parameter does not exist on first run (multibranch)

I'm having a problem with a Jenkins multibranch pipeline, which is parameterized. The parameters are all declared in the Jenkinsfile. The problem is that these parameters do not exist on the very first run of the job. So, the very first execution…
gargaroff
  • 735
  • 1
  • 8
  • 16
2
votes
0 answers

Is there a way to "debounce" Jenkins builds in a Multibranch Pipeline

I understand there are ways to disallow concurrent builds and maybe even to throttle builds with a plugin or with a quiet period. But what I really want is to be able to debounce multibranch builds. It's not uncommon in our workflow for many…
Joel
  • 6,193
  • 6
  • 22
  • 22
2
votes
1 answer

Jenkins Multibranch Pipeline - mvn is not recognized as a command

I'd like to setup a simple Multibranch Pipeline for my Spring Boot project. I've created such a Multibranch Pipeline in Jenkins, wired in my GitHub repo where I've pushed a very basic Jenkinsfile with a simple step: pipeline { agent any stages { …
2
votes
2 answers

Jenkins Build is not triggered with bit bucket web hook

Trying to create the webhook in Bit-bucket for the multi-branch pipeline. I wanted to trigger the build whenever changes are pushed to bit-bucket. It's working for a simple and pipeline project, build is automatically triggered whenever a change is…
nikita kakra
  • 153
  • 1
  • 8
2
votes
0 answers

make a Jenkinsfile that uses Generic-Webhook-Trigger and acts like a regular multibranch-pipeiine job with how it handles jobs from branches and PRs

with Jenkins multibranch pipeline job, it will create a separate job for each branch and each PR. How can I setup a multibranch pipeline job that uses a Jenkinsfile with the Generic-Webhook-Trigger add-on and have it act in the same way with how it…
modernNeo
  • 137
  • 9
2
votes
1 answer

Continuous deployment branch wise using Spinnaker

I'm using Jenkins multibranch pipeline for CI process and for CD using Spinnaker. I've gone through almost all documents, support channels etc. from spinnaker for "how to create spinnaker multibranch pipeline similarly as jenkins" but didn't find…