multibranch-pipeline

Jenkins: how to specify jenkinsfile in multibranch project

老子叫甜甜 提交于 2019-12-08 19:23:16
问题 Using Jenkins for multi-platform mutibranch builds. I have multiple Multibranch Pipeline projects (one for each platform, since each platform requires notably different build steps). I have one code repository with multiple branches (which is why Multibranch Pipeline projects makes sense). I would like to have each Multibranch Pipeline project reference a different Jenkinsfile, rather than all trying to use the one with the filename "Jenkinsfile" that is located in the root of the repository.

Gitlab Merge request events not triggering Jenkins Multi-branch pipeline

主宰稳场 提交于 2019-12-05 19:49:11
I'm trying to trigger Jenkins Multi-branch pipeline job with GitLab Webhook on Merge request events. When I'm testing the Webhook, I'm getting this message: Hook executed successfully but returned HTTP 409 When I'm setting different GitLab Webhook, like Tag push events, it works. Is GitLab Merge request events Webhook not supported with Jenkins multi-branch pipeline? Am i missing something? If it's not supported, does anyone have workaround for that? Thanks! https://github.com/jenkinsci/gitlab-plugin#git-configuration-for-multibranch-pipelineworkflow-jobs Yeah, the readme notes that this

Jenkins 2 Multibranch Pipelines - How can I limit the visibility/execution of branches using the Role Strategy Plugin?

非 Y 不嫁゛ 提交于 2019-12-04 22:18:46
问题 I am using multibranch pipelines in projects with two branches: develop and master. This creates two subprojects, one for each branch: App_Pipeline |---master |---develop I have set up the Role Strategy plugin to control the authorization (visibility) of the jobs/pipelines depending on the assigned role. Project Roles : manager : Uses a regexp App_.* developer : Uses a regexp App_.* With my current roles, both types of users see the superproject (App_Pipeline), and can execute both

Jenkins multibranch pipeline Scan without execution

六月ゝ 毕业季﹏ 提交于 2019-12-04 09:57:21
问题 I´m starting to create my pipeline multibranch environment but i have founded a problem. Can I run a build scan only to detect the branches with a Jenkinsfile but without the pipeline execution? My projects have different branches and i dont want when i launch a build scan from the parent pipeline multibranch all the children pipelines foreach branches with a Jenkinsfile starts to execute. Thanks by the help! 回答1: In your Branch Sources section you can add a Property named Suppress automatic

How to set and reference a variable in a Jenkinsfile

孤街醉人 提交于 2019-12-03 14:38:38
问题 I have a declarative pipeline script for my multibranch project in which I would like to read a text file and store the result as a string variable to be accessed by a later step in the pipeline. Using the snippet generator I tried to do something like this: filename = readFile 'output.txt' For which filename would be my string. I get an error in the Jenkins console output: org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed: WorkflowScript: 30: Expected a step @

How to set and reference a variable in a Jenkinsfile

早过忘川 提交于 2019-12-03 04:27:17
I have a declarative pipeline script for my multibranch project in which I would like to read a text file and store the result as a string variable to be accessed by a later step in the pipeline. Using the snippet generator I tried to do something like this: filename = readFile 'output.txt' For which filename would be my string. I get an error in the Jenkins console output: org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed: WorkflowScript: 30: Expected a step @ line 30, column 5. filename = readFile 'output.txt' Do I need to use a withEnv step to set the output of

Jenkins Multi-branch pipeline doesn't schedule tag jobs

安稳与你 提交于 2019-12-01 04:46:01
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 repository. Initially I thought this would be perfect for my needs (my Jenkinsfile can now build development or production builds from the same place in Jenkins). Multibranch job with tags discovery configured I have the build process itself up and running quite happily with a scripted pipeline, however my issue is that whilst the branch jobs

Jenkins Multi-branch pipeline doesn't schedule tag jobs

自古美人都是妖i 提交于 2019-12-01 01:29:40
问题 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 repository. Initially I thought this would be perfect for my needs (my Jenkinsfile can now build development or production builds from the same place in Jenkins). Multibranch job with tags discovery configured I have the build process itself up

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

时光怂恿深爱的人放手 提交于 2019-11-30 15:06:12
问题 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 2085-6D3D C:\REPOS\MULTIBRANCH-TEST ├───Project1 └───Project2 Each sub-directory has a Jenkinsfile and the code for that project. In Jenkins I have two multibranch pipeline jobs - one for Project1 and one for Project2. In the configuration for Project1 I don't want a push notification or polling to build

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

依然范特西╮ 提交于 2019-11-30 12:39:41
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 2085-6D3D C:\REPOS\MULTIBRANCH-TEST ├───Project1 └───Project2 Each sub-directory has a Jenkinsfile and the code for that project. In Jenkins I have two multibranch pipeline jobs - one for Project1 and one for Project2. In the configuration for Project1 I don't want a push notification or polling to build Project1 if a commit was pushed in sub-directory for Project2. So in Project1 I have configured