jenkins-plugins

How to add Job Description into Jenkins email notification content

拟墨画扇 提交于 2019-12-24 03:37:25
问题 Using the Configure System > Extended E-mail Notification configuration in Jenkins I would like to add the description of my job (present on http://my-jenkins.org/job/myjob page) into the Default Content of build failure emails. Is there any $PROJECT_DESCRIPTION variable that I can use for that ? Or is it possible to do that using a Jelly/Groovy script ? Thanks ! 回答1: As told by Zloj , Jenkins don't have such variable but you can customize your own. Jenkins have plugin to set Environment

How to pass multi select value parameter in Jenkins file(Groovy)

不羁的心 提交于 2019-12-24 03:34:40
问题 E.g. Below code is used for single select value choice{ choices: 'Box\nOneDrive\nSharePointOnline\nGmail\nGDrive\nGenericS3', defaultValue: 'box', description: 'Connector to build', name: 'On_Cloud_Devices_To_Test' } 回答1: I would use booleanParam's. Then the user can tick all the required options. booleanParam(defaultValue: false, name: 'ALL', description: 'Process all'), booleanParam(defaultValue: false, name: 'OPTION_1', description: 'Process option 1'), booleanParam(defaultValue: false,

How to pass multi select value parameter in Jenkins file(Groovy)

天涯浪子 提交于 2019-12-24 03:34:04
问题 E.g. Below code is used for single select value choice{ choices: 'Box\nOneDrive\nSharePointOnline\nGmail\nGDrive\nGenericS3', defaultValue: 'box', description: 'Connector to build', name: 'On_Cloud_Devices_To_Test' } 回答1: I would use booleanParam's. Then the user can tick all the required options. booleanParam(defaultValue: false, name: 'ALL', description: 'Process all'), booleanParam(defaultValue: false, name: 'OPTION_1', description: 'Process option 1'), booleanParam(defaultValue: false,

How to identify admins on Jenkins using groovy scripts

与世无争的帅哥 提交于 2019-12-24 03:28:22
问题 I want to be able to check whether the current build user who is running the job is admin or not. I used some APIs to figure out the admins user list as shown below import jenkins.model.Jenkins import hudson.model.User import hudson.security.Permission allUsers = User.getAll() adminList = [] for (u in allUsers) { if (u.hasPermission(Jenkins.ADMINISTER)) { // if (u.canDelete()) { adminList.add(u) } } println allUsers println adminList but always both the list of users (admins and average-joes)

Jenkins skip SCM on parameter

北城余情 提交于 2019-12-24 02:13:39
问题 Does anyone have an idea on how to make a job skip the SCM step on command (parameter)? I want to be able to trigger the job and use the existing view (ClearCase in my case, but can be an SVN working copy) to run the build on. The motivation for this is to save time (my ClearCase view takes about 20 minutes to prepare), since there is no change in sources. 回答1: Separate your job into two: Trigger job and Worker job. Worker job does not deal with SCM and gets the root of the code tree via a

Adding text to the page of a build triggered by the Jenkins remote API

寵の児 提交于 2019-12-24 02:04:45
问题 I have a Jenkins build system up and running for a project. The build is triggered via the remote API functionality of Jenkins. When a commit is made to the project we send an HTTP request build trigger to the Jenkins process running on our local server; with a parameter that specifies the revision of the trunk project folder in the SVN repository that we want to checkout and build. We also send the SVN username and commit message for the revision as an additional http parameter. So the URL

Jenkins Manual Step by remote call

老子叫甜甜 提交于 2019-12-24 01:59:10
问题 I am using Jenkins Build Pipeline plug-in for build pipelines. In mine pipeline I have manual step ( Build other project (Manual Step) ). When I trigger build it stops on this manual step (it's ok) and now I want to run it. But I don't want to trigger it via jenkins GUI but via call from some other application. Example (Jenkins jobs pipeline): Build -> Deploy Test -> (manual) Deploy Production now I want second app with big button "Test ok, deploy on production" and via it call the jenkins

Can Jenkins handle an gui/non-gui interactive python or java program?

走远了吗. 提交于 2019-12-24 01:09:15
问题 I want to create a build pipeline, and developers need to set up a few things into a properties file which gets populated using a front end GUI. I tried running sample CLI interactive script using python that just asked for a name and prints it out afterwards, but Jenkins just waited for ages then hanged. I see that it asked for the input, but there was no way for the user to input the data. EDIT : Currently running Jenkins as a service..Or is there a good plugin anyone recommends or is it

Android Studio with Jenkins Integration

浪子不回头ぞ 提交于 2019-12-24 00:43:09
问题 I guess many of you have performed here continuous integration of Jenkins with Android Studio. I have performed the following steps: Created a project from Android Studio. Created a repository in GitHub. Pushed the code base into the Github. Configured Jenkins. Now, my target is that whenever I perform some checkin operation of the Android code into the Github, then automatically Jenkins will create a build on the latest codebase. I already have downloaded the necessary plugins that are

How can I delete a job using Job DSL plugin(script) in Jenkins?

戏子无情 提交于 2019-12-24 00:38:06
问题 I am very new to Jenkins and Job DSL plugin. After a little research, I found how to create a job using DSL and now I am trying to delete a job using DSL. I know to disable a job using this following code: //create new job //freeStyleJob("MyJob1", closure = null); job("MyJob1"){ disabled(true); } It is working perfectly fine. But, I couldn't find any method to delete another job in jenkins. Please help! Thanks! 回答1: Each instance of the Job Dsl plugin tracks what jobs (and views) it creates.