jenkins-plugins

Passing the result back from Parameterized Trigger plugin

心不动则不痛 提交于 2020-01-01 05:54:29
问题 I have 2 jobs: "Helper" and "Main" and the single jenkins instance (which is the host and the executor). The helper manages 3rd party resource and makes the preparation for the Main job (to be precise - it creates the environment for the application to be deployed for testing). The only artifact for the helper job is a single file with IP of the environment prepared especially for the Main job. How would I pass back the build from the Helper to the Main in this case? 回答1: You are saying that

The system cannot find the specified drive in Jenkins

女生的网名这么多〃 提交于 2020-01-01 05:10:06
问题 I want to copy some files from a network shared drive (mounted at my local machine as drive Z). I have written a Batch file to copy the contents of Z drive into my local drive. This batch file runs successfully on cmd, but i am having issue when i trigger it through Jenkins. The Jenkins gives the following error: "The system cannot find the specified drive" Any help regarding this, will be greatly appreciated. Thanks, Nouman. 回答1: If you don't want to use Jenkins-plugins or schedule-Tasks

How to enable log rotation in Jenkins for weekly?

一笑奈何 提交于 2020-01-01 04:52:14
问题 I am trying to enable the log rotation for jenkins. Because the log file occupied more memory space. Is there any plugins or method to do it? 回答1: Job Configuration -->Discard Old Builds: There is default Log Rotation strategy: I suggest you to click the "Advanced" button to know more about this log rotation strategy. 回答2: Other answers here are referring to the logs generated by the individual jobs, but if you are asking about Jenkins' main jenkins.log file (generated by the Jenkins-server),

Jenkins + Gerrit Trigger Not Automatically Building

三世轮回 提交于 2020-01-01 02:47:11
问题 Jenkins does not seem to be automatically pulling in changes that need to be reviewed from Gerrit. We're using Gerrit Trigger. Also If I try to manually trigger some, it seems like nothing ever happens. The "control" in the Gerrit Trigger management area, doesn't seem to much... flashes either "starting", "stopping" or "restarting" Any ideas where I went wrong? 回答1: I was just having the same problem, and it had to do with the default Gerritt setting in my job for matching branches. In your

ant/Jenkins: move doesn't support the “quiet” attribute

走远了吗. 提交于 2019-12-31 06:36:25
问题 My build script executes: <move todir="gen" overwrite="true" quiet="true"> <fileset dir="gen"> <include name="**/BuildConfig.java.new"/> </fileset> <globmapper from="*.java.new" to="*.java"/> </move> I get the error: move doesn't support the "quiet" attribute I have ant 1.8.4 installed on my iMac. My ant plugin in Jenkins is 1.2. Jenkins ver. 1.505. I have tried to change the PATH when starting Jenkins, so it includes my command line ant. However it seems that Jenkins does not support ant 1.8

Jenkins Pipeline logs braces from ansiColor plugin?

徘徊边缘 提交于 2019-12-31 05:37:10
问题 I do not like that when I output a message using a ansiColor plug-in, it prints a lot of extra braces and words. How to fix it? Jenkins Pipeline Method: def printVariable(String message) { ansiColor('xterm') { echo "\033[34m ${message} \033[0m" } } Call: printVariable("ENVIRONMENT: ${ENVIRONMENT}") printVariable("PROJECT_VERSION: ${PROJECT_VERSION}") printVariable("TAG_NAME: ${TAG_NAME}") Output: [Pipeline] } [Pipeline] // ansiColor [Pipeline] ansiColor [Pipeline] { [Pipeline] echo

How to modify the mime message in editable email plugin in jenkins

半世苍凉 提交于 2019-12-31 03:36:10
问题 i'd like to modify the email message i send from jenkins. how can i do it? i tried to use msg variable and set the content using msg.setContent("this is the string i want in the email body") but it failed any ideas? 回答1: I've just faced same task: msg.setContent("Test content", 'text/html') worked for me. I guess possible types are 'text/html' and 'text/plain', check that you are changing the proper one. 回答2: msg.setContent doesn't send messages if the GString type passed as content. Don't

How to stop CI builds in Jenkins from accidentally publishing to release repository?

泪湿孤枕 提交于 2019-12-31 02:43:07
问题 Sometimes, the developers accidentally check in a version in POM without "SNAPSHOT" in it. This builds the Maven project and publishes the artifacts to release repository. How can I avoid this situation? I only want to publish build artifacts to release repository and not a CI build. I thought about the following- but none of them is an easy one step solution Writing a pre-commit hook to check if version was checked in without SNAPSHOT by any one other than admin who is allowed to do a

Jenkins trigger on-demand slaves in dockers

怎甘沉沦 提交于 2019-12-30 10:29:59
问题 I'm looking for a way to run Jenkins jobs/build inside Jenkins slaves, dynamically (on-demand) started docker. Attaching schema for visual understanding. What I'm actually looking for and my flow looks like: 1) Triggering Jenkins job (manually/git/gerrit) 2) Jenkins master (running in docker) starts slave machine docker (and pass script/instructions of the build) 3) Build is running on Jenkins slave (or slaves if parallel/pipeline) 4) Result returned to Jenkins master 5) Jenkins slave docker

How do I plot benchmark data in a Jenkins matrix project

こ雲淡風輕ζ 提交于 2019-12-30 09:50:31
问题 I have several Jenkins matrix projects in where I output benchmark results (i.e. execution times) in a CSV file. I'd like to plot these execution times as a function of the build number, so I can see if my projects are regressing over time. 回答1: I can confirm Plot Plugin is a correct and quite useful approach. BTW, it supports CSV as well: plot configuration example I've been using it for several years without any problem. Benchmarks results were generated as a property file. Benchmark id