cloudbees

Jenkins pipeline with folder plugin. How to build a job located different folder

半世苍凉 提交于 2021-02-16 18:07:56
问题 I'm using jenkins 2.0 with Cloudbees Folder plugin as this allow me to create multiple similar projects. The jobs in each folder can be factored out leaving a top level job that can then call a parameterised job. I want to place the parameterised job in a Generic folder and then call them from a pipeline script. So within the jenkins browser I would have 3 folder : ProjA, ProjB and Generic. Under ProjA I have a pipeline job that needs to build a job called TestJib in the generic folder. My

Jenkins pipeline with folder plugin. How to build a job located different folder

本秂侑毒 提交于 2021-02-16 18:06:53
问题 I'm using jenkins 2.0 with Cloudbees Folder plugin as this allow me to create multiple similar projects. The jobs in each folder can be factored out leaving a top level job that can then call a parameterised job. I want to place the parameterised job in a Generic folder and then call them from a pipeline script. So within the jenkins browser I would have 3 folder : ProjA, ProjB and Generic. Under ProjA I have a pipeline job that needs to build a job called TestJib in the generic folder. My

Jenkins pipeline with folder plugin. How to build a job located different folder

若如初见. 提交于 2021-02-16 18:06:45
问题 I'm using jenkins 2.0 with Cloudbees Folder plugin as this allow me to create multiple similar projects. The jobs in each folder can be factored out leaving a top level job that can then call a parameterised job. I want to place the parameterised job in a Generic folder and then call them from a pipeline script. So within the jenkins browser I would have 3 folder : ProjA, ProjB and Generic. Under ProjA I have a pipeline job that needs to build a job called TestJib in the generic folder. My

Get list of branches in Jenkins multibranch pipeline

…衆ロ難τιáo~ 提交于 2021-02-07 04:18:49
问题 The Blue Ocean interface to a Jenkins multibranch pipeline project shows several branches that were automatically created. Is there a programmatic way to list the branches in the pipeline from code to be added to a Jenkinsfile? This question asks about Jenkins Project branch information located inside the Jenkins application object model, which should be accessible via the Jenkins API or CLI. I looked at all the variables that are available at http://<jenkins-home>/env-vars.html/ , but none

Get list of branches in Jenkins multibranch pipeline

≡放荡痞女 提交于 2021-02-07 04:17:20
问题 The Blue Ocean interface to a Jenkins multibranch pipeline project shows several branches that were automatically created. Is there a programmatic way to list the branches in the pipeline from code to be added to a Jenkinsfile? This question asks about Jenkins Project branch information located inside the Jenkins application object model, which should be accessible via the Jenkins API or CLI. I looked at all the variables that are available at http://<jenkins-home>/env-vars.html/ , but none

Get list of branches in Jenkins multibranch pipeline

最后都变了- 提交于 2021-02-07 04:17:03
问题 The Blue Ocean interface to a Jenkins multibranch pipeline project shows several branches that were automatically created. Is there a programmatic way to list the branches in the pipeline from code to be added to a Jenkinsfile? This question asks about Jenkins Project branch information located inside the Jenkins application object model, which should be accessible via the Jenkins API or CLI. I looked at all the variables that are available at http://<jenkins-home>/env-vars.html/ , but none

Git accountability

∥☆過路亽.° 提交于 2020-01-30 07:57:44
问题 Is there any way to ensure who is actually the committer to our Git repositories? We have each developer's keys in CloudBees, so that ensures that it is one of them, but is there anything stopping one developer from inputting another developer's name/email in the commit field? If not a way to stop them, is there a way at least to determine the committer's SSH key from the Git logs? 回答1: No, Git itself has no built-in mechanism to ensure that the committer is actually the one that is stored in

Git accountability

浪尽此生 提交于 2020-01-30 07:56:07
问题 Is there any way to ensure who is actually the committer to our Git repositories? We have each developer's keys in CloudBees, so that ensures that it is one of them, but is there anything stopping one developer from inputting another developer's name/email in the commit field? If not a way to stop them, is there a way at least to determine the committer's SSH key from the Git logs? 回答1: No, Git itself has no built-in mechanism to ensure that the committer is actually the one that is stored in

How to use logback on Cloudbees

青春壹個敷衍的年華 提交于 2020-01-23 03:34:25
问题 I would like to know if it's possible to use my own logback configuration on Cloubees, I have a default.logback.xml file that works perfectly fine in local, but once I deploy to Cloudbees its being ignored. 回答1: Logging in CloudBees is via stdout and stderror - these are piped via syslog-ng to various systems (not all of which are file based) - so you can configure logging things as you want - but if you want your logs managed - it is best to ensure that things end up in stdout and stderr. 来源

Jenkins Groovy how to call methods from @NonCPS method without ending pipeline

馋奶兔 提交于 2019-12-31 22:43:20
问题 I need to parse some JSON in a Jenkins Pipeline and call some regular methods in a loop, however the script always exits after the first function call. How to do this? import groovy.json.JsonSlurper import com.cloudbees.groovy.cps.NonCPS @NonCPS def myMethod(String json) { def jsonSlurper = new JsonSlurper() def jsonObject = jsonSlurper(json) jsonObject.each { obj -> switch(obj.name) { case "foo": doAThing(obj) break case "bar": doAnotherThing(obj) break } } } In the above example, even with