jenkins-plugins

Jenkins: validateButton in config.jelly for a class without Descriptor

落花浮王杯 提交于 2019-12-12 03:24:17
问题 I have the Plugin class without Descriptor : @Extension public class Plugin extends hudson.Plugin { // ... public FormValidation doValidateForm(String s) { return FormValidation.ok("Hello world! Your 's': " + s); } } And I have a config.jelly for this class: <?jelly escape-by-default='true'?> <j:jelly xmlns:j="jelly:core" xmlns:f="/lib/form"> <!-- ... --> <f:entry title="Test"> <f:textbox name="test" value="123" field="test"/> </f:entry> <f:validateButton title="Test" progress="Testing..."

Can I use Jenkins CLI or some groovy scripts to create a new job

自作多情 提交于 2019-12-12 02:58:00
问题 Can I use Jenkins CLI or some groovy scripts to create a new job? This job can be copied from the previous one but the svn repo isn't the same. 回答1: There is a job-dsl plugin which allows you to create new jobs with groovy script 回答2: Yes of course, see you can use groovy for this 来源: https://stackoverflow.com/questions/16975266/can-i-use-jenkins-cli-or-some-groovy-scripts-to-create-a-new-job

File not unstash in slave machine of jenkins server

守給你的承諾、 提交于 2019-12-12 02:13:55
问题 I used the ubundu as a master machine of jenkins server and configured windows machine as the slave. I tried to stash and unstash a file from master to slave's worksapce but it is not unstashed. node('slave') { node('master'){ stash includes: "file.tgz" name: "master-stash" } unstash "master-stash" bat "ls" } Output: [Pipeline] node Running on master in /var/lib/jenkins/workspace/testing [Pipeline] { [Pipeline] stash Stashed 1 file(s) [Pipeline] } [Pipeline] // node [Pipeline] unstash The

Way to change Jenkins' project variable value with script

柔情痞子 提交于 2019-12-12 01:43:58
问题 Is there a way to change project variable values in Jenkins automatically when build is done? In my case i got a variable VERSION, default value is 1. And i need to increment this default value every build done. Assuming build stars by cron in this case. Any plugins can help me? Now i have something like this: My build steps. It is a single working way to get project variable in my groovy script that i found. Now how can i set new value for variable? I read some similar question on SO, but

How can i send data to the logger from FileCallable back to master in a Jenkins plugin?

若如初见. 提交于 2019-12-11 18:11:46
问题 I'm using the following example from here: void someMethod(FilePath file) { // make 'file' a fresh empty directory. file.act(new Freshen()); } // if 'file' is on a different node, this FileCallable will // be transferred to that node and executed there. private static final class Freshen implements FileCallable<Void> { private static final long serialVersionUID = 1; @Override public Void invoke(File f, VirtualChannel channel) { // f and file represent the same thing f.deleteContents(); f

Staging in Cloud Foundry - .cfignore

一笑奈何 提交于 2019-12-11 18:06:46
问题 We have .cfignore file mentioning the files that should not be staged in Cloud Foundry. Through CF CLI tool, cf push is considering to ignore file mentioned in .cfignore before pushing files to Cloud Foundry. But Jenkins configured using push to cloud foundry plugin does not consider ignoring the files mentioned in .cfignore With this, Cloud Foundry some undesirable files at staging time, which makes staging failed. How to resolve this error? 回答1: Through CF CLI tool, cf push is considering

need to deny a pipeline made from a specified branch merge

心不动则不痛 提交于 2019-12-11 17:44:32
问题 I need help. I have 3 branches master hotfix feature I want the build to occur only on the master coming from merge with the feature. How could I do this? I am allowing the build to occur in jenkins if it comes from a merge to master made with the feature, as I will run another pipeline in the hotfix and I want it when the hotfix merge with the master nothing happens. My regular expression today is but I'm refusing everything from the master, in case I want to allow the master to execute just

Deploying a gradle script from Jenkins using the artifactory plugin

流过昼夜 提交于 2019-12-11 16:14:51
问题 I'm trying to deploy a build from jenkins using the artifactory invocation of gradle plugin and get a an HTTP error 302, going through the log looks like there's a checksum problem that cannot be skipped: 13:35:41.463 [DEBUG] [org.jfrog.gradle.plugin.artifactory.task.BuildInfoBaseTask] Failed checksum deploy of checksum '8d80bb7f1bf2f0457baa3ad7379348c5ecbf2535' with statusCode: 302 13:35:41.466 [DEBUG] [org.apache.http.impl.conn.SingleClientConnManager] Get connection for route HttpRoute[{}-

Sonar-Gerrit Plugin Not reporting Issues in Gerrit

被刻印的时光 ゝ 提交于 2019-12-11 15:38:57
问题 I am also facing the same issue with Sonar-Gerrit jenkins plugin. Downloaded it from Jenkins plugins site.Using Sonar-Gerrit plugin 2.2.1, and analysing sonar scan against jenkins workspace. For a sample,have changed just one file and provided the project base directory to the path of that file, and ran the sonar analysis in issues mode. Issues are not loaded in Gerrit and jenkins logs say Report has loaded and contains 759 issues Issues to be commented: 0 Issues to be involved in score

Block a job from running if given node(s) with a given label(s) is/are running another job(s)

只愿长相守 提交于 2019-12-11 14:35:51
问题 In Jenkins, we can block a job A if job B is running using Build blocker plugin . Similarly or in some fashion , I would like a job, for ex: another_dumb_job to NOT run / (wait and let it sit in queue) if there are any in-progress jobs running on any user selected slave(s) until those slaves are free again. For ex: I don't want to run a Job (which will delete bunch of slaves either offline/online -- using a downstream job or via calling some groovy/scriptler script) until any of those slave(s