multibranch-pipeline

Triggering a multibranch pipeline job from an other multibranch pipeline

空扰寡人 提交于 2021-02-18 06:42:40
问题 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 ProjectB once A was built. Now before I started investigating pipeline builds, I'd have a job per branch and then trigger in Jenkins the appropriate job for Project B for the appropriate branch. What I'd like to set up in a Jenkinsfile so that

Jenkins Multibranch Pipeline Lightweight Checkout

放肆的年华 提交于 2021-02-08 21:48:31
问题 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 lightweight checkout in a multibranch pipeline, but I'm not seeing a checkbox in the multibranch configuration screen. Any ideas how to make this happen? I noticed some closed issues that suggest this feature is available, but I wasn't able to find any

Selecting Quality Gate for SonarQube Analysis in Jenkinsfile

只愿长相守 提交于 2021-01-29 10:58:12
问题 I have a Jenkinsfile that, among other things, performs SonarQube analysis on my build and passes it through 'Quality Gate' stage. The analysis is placed on the SonarQube server where I can see all the details. The relevant pieces of code for the analysis and Quality gate are below (not mine, it is from documentation): stage('SonarCloud') { steps { withSonarQubeEnv('SonarQube') { sh 'mvn clean package sonar:sonar ' } } } stage("Quality Gate") { steps { timeout(time: 15, unit: 'MINUTES') { //

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

泪湿孤枕 提交于 2021-01-21 09:38:04
问题 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 smarter and only build project A if any change in the PR introduced a change in the A/ directory. This is proving very difficult. when { changeset "A/" } only appears to check if the last commit changed a file in A/ , not if the PR changed a file in

Set a SonarQube webhook in Jenkinsfile

扶醉桌前 提交于 2021-01-04 14:55:19
问题 I'm trying to create a Jenkins multibranch pipeline where on every push to bitbucket, a SonarQube analysis is performed on that branch of the project. Jenkins correctly creates the new job for each branch and a new project is created in SonarQube with the branch name appended to the project name. The issue I'm having is that when SonarQube creates the new project, the webhook to report the Quality Gate status is not set by default, so I have to manually go into each SonarQube project and set

Set a SonarQube webhook in Jenkinsfile

天大地大妈咪最大 提交于 2021-01-04 14:55:09
问题 I'm trying to create a Jenkins multibranch pipeline where on every push to bitbucket, a SonarQube analysis is performed on that branch of the project. Jenkins correctly creates the new job for each branch and a new project is created in SonarQube with the branch name appended to the project name. The issue I'm having is that when SonarQube creates the new project, the webhook to report the Quality Gate status is not set by default, so I have to manually go into each SonarQube project and set

Pass Artifact or String to upstream job in Jenkins Pipeline

☆樱花仙子☆ 提交于 2020-12-13 20:57:07
问题 Goal I'm trying to orchestrate a dependency chain using the GitHub organization plugin along with the jenkins pipeline. As the products I'm building have a number of shared dependencies, I'm using nuget packages to manage dependency versioning and updates. However, I'm having trouble getting necessary artifacts/info to the projects doing the orchestration. Strategy On a SCM change any upstream shared libraries should build a nuget package and orchestrate any downstream builds that need new

How to add webhooks in gitlab for multibranch pipeline jenkins

折月煮酒 提交于 2020-01-13 12:13:13
问题 I want to trigger multi-branch pipeline for every push, can anyone please let me know can how can we configure web-hooks in gitlab for multi-branch pipeline. 回答1: If you were wondering where the trigger setting is in Multibranch pipeline job settings, this will answers it: Unlike other job types, there is no 'Trigger' setting required for a Multibranch job configuration; just create a webhook in GitLab for push requests which points to the project's webhook URL. Source: https://github.com