jenkins-plugins

How Can I have job scope Credentials in Jenkins?

自古美人都是妖i 提交于 2019-12-07 05:52:16
问题 First sorry if this question and its solution exist somewhere but I cannot find it. I would like to be able to create credentials inside a job and only usable inside this job, a kind of job scope credential. For the moment Credential plugins only propose Global and System scope so the credentials are avaialble to all jobs. The Credentials Binding Plugin does not seem to solve my problem either but to be fair, I am not sure to understand all its features and I would prefer not use text or file

Jenkins job generator

不问归期 提交于 2019-12-07 03:56:27
问题 On a project Im working on we have a pretty advanced command-line interface to build, test, package and deploy software. Now we want to use jenkins as a front-end to this CLI and we want to be able to generate job configurations. We want the interface simple, the user only supply a couple of parameters and jenkins will then query our CLI and generate the needed build steps. Simple use case: Create new domain-specific-job Select Product Jenkins now queries the CLI and updates the next drop

Query for last successful build number in Jenkins with change

五迷三道 提交于 2019-12-07 02:30:22
问题 Example: 32 - fail 31 - stable no change (triggered by parent) 30 - stable with changes 29 - fail ... I want a query to return 30 So far what I got: To query the last stable build number: http://jenkins/job/project_name/lastStableBuild/buildNumber This returns 31 . Not exactly what I need. To check if this build has changes, the only way I know is : http://jenkins/job/project_name/31/api/json Then I need to go inside the huge JSON and check if any item in changeSet > items. Is there a easier

Jenkins : poll-mailbox-trigger-plugin and SMTP

家住魔仙堡 提交于 2019-12-07 02:25:30
I am unable to get Jenkins to build based on an email using the poll-mailbox-trigger plugin My setup in E-mail Notification is as follows SMTP server: myExchangeServerHostName Default user e-mail suffix: @companyName.com Use SMTP Authentication: True User Name: DOMAIN\user Password: aboveUserPassword Use SSL: False SMTP Port: 587 Reply-To Address: Charset: UTF-8 From here I can successfully send a test email to myself and I receive it. In my build the Poll Mailbox Trigger settings are as follows Host: myExchangeServerHostName Username: DOMAIN\user Password: aboveUserPassword Advanced Email

failed to execute goal org.apache.maven.plugins:maven-gpg-plugin

。_饼干妹妹 提交于 2019-12-06 23:34:57
问题 This error is driving me crazy. Can someone please help me? I do have gpg installed and it is also in PATH. What is causing this error!!! Am running this job on jenkins 1.5 , maven 3.0.3 on linux and windows ( both show same error) [INFO] [ERROR] Failed to execute goal org.apache.maven.plugins:maven-gpg-plugin:1.5:sign (default) on project sample: Exit code: 2 -> [Help 1] [INFO] [ERROR] [INFO] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [INFO] [ERROR]

How do you handle global variables in a declarative pipeline?

荒凉一梦 提交于 2019-12-06 23:19:04
问题 Previously asked a question about how to overwrite variables defined in an environment directive and it seems that's not possible. I want to set a variable in one stage and have it accessible to other stages. In a declarative pipeline it seems the only way to do this is in a script{} block. For example I need to set some vars after checkout. So at the end of the checkout stage I have a script{} block that sets those vars and they are accessible in other stages. This works, but it feels wrong.

jenkins cli with checkout Subversion using groovy script

蹲街弑〆低调 提交于 2019-12-06 21:44:41
Is there a way to check out any Subversion project using Jenkins-Cli by executing a groovy script on the master? I can get to the point of creating SVN client manager[org.tmatesoft.svn.core.wc.SVNClientManager], but can't really understand how to employ that in checking out an SVN project from the URL. After a lot of hit and trials I have come up with this, might be useful for someone else: import jenkins.*; import jenkins.model.*; import hudson.*; import hudson.model.*; import hudson.slaves.SlaveComputer; import hudson.scm.SubversionSCM; import hudson.remoting.Channel; import hudson.FilePath;

Showing the result of QTestlib with Jenkins xUnit plug-in

送分小仙女□ 提交于 2019-12-06 20:15:50
问题 I am trying to use Jenkins xUnit plug-in for my Qt unit test project, but I cannot make it work... Here is What I've done so far: First of all, I build my unit test project with qmakebuilder plug-in (providing the .pro to the qmakebuilder plug-in), then I add an Execute Shell build section where I first rm -f the testResult xml file, following to that, I run the test binary with -xunitxml flag to have it generate the xml file for me And I name the xml file testResult.xml , in other word: rm

How to change the security type from SSL to TLS in Jenkins?

▼魔方 西西 提交于 2019-12-06 18:09:42
问题 I am trying to setup the smtp email notification. I could see that the gmail part works fine. I want to configure it for my office 365. Smtp server = smtp.office365.com We don't have SSL configured. Instead we use TLS. How can I set the TLS in the Jenkins? There is only a check button which suggests to use SSL or not. If I disable it what is it going to use? I get the following errors - Failed to send out e-mail javax.mail.MessagingException: Could not connect to SMTP host: smtp.office365.com

pass values from a freestyle/pipeline job upstream in jenkins2.0

和自甴很熟 提交于 2019-12-06 16:26:05
问题 Here is my problem simplified : I have a main job (pipeline job) and I have x job (freestyle). In my main job I build x job using the following : code in main job - res = build job: 'x', parameters: [string(name: 'JOBNAME', value: string(name: 'JIRACHEF', value: "oldvalue")], quietPeriod: 2 Now in this job x I change the value of JIRACHEF parameter and I print to check if it actually changed.: os.environ["JIRACHEF"] = "newvalue" print os.environ["JIRACHEF"] This works in job x console output.