jenkins-plugins

unable to get pylint output to populate the violations graph

穿精又带淫゛_ 提交于 2019-12-10 14:49:24
问题 my build steps: cd $WORKSPACE export TERM="linux" . venv/bin/activate pylint --rcfile=pylint.cfg $(find handlers -maxdepth 1 -name "*.py" -print) > pylint.log || exit 0 result of pylint.log: ************* Module handlers C: 1, 0: Missing module docstring (missing-docstring) C: 8, 0: Missing function docstring (missing-docstring) ************* Module handlers.foo C: 1, 0: Black listed name "foo" (blacklisted-name) C: 1, 0: Missing module docstring (missing-docstring) C: 1, 0: Missing function

Jenkins + Build Flow, how to pass a variable from one job to another

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-10 14:47:55
问题 I have a build flow scenario similar to the documentation example: two jobs, one running after the other. b = build("job1") build("job2", param1: b.????) My job1 is a shell script that builds a package out of a checked out git repositoy and prints out the version of the built package. I need to extract the version from job1 (parse output??) and make it available somehow as a parameter to job2 . How can this be achieved? Please note that I can't know the version before running job1 . 回答1: The

Check a plugin exists within a Jenkins Pipeline (Groovy)

大城市里の小女人 提交于 2019-12-10 13:38:46
问题 I want to use the Slack Notification Plugin in my pipelines, which is very easy: slackSend color: 'danger', message: 'Everything broke' However, I don't want the build to break if slackSend doesn't exist. Is there a way to check that first? 回答1: You might be able to wrap it in a conditional, though I'm not sure how Jenkins adds stuff to the scripts... if(this.respondsTo('slackSend')) { slackSend color: 'danger', message: 'Everything broke' } 回答2: You could always use the old try/catch to make

Cannot start Jenkins

亡梦爱人 提交于 2019-12-10 13:16:34
问题 After downloading a plugin, the Jenkins server cannot be accessed. I am using windows 7. I tried to start windows Jenkins service manually, but I get the following message: "Windows could not start the Jenkins service on Local COmputer. Error 1067: The process terminated unexpectedly" I also tried to run the jenkins.exe from the installation directory, but with no success. In the error logs I see the following: INFO: Obtained the updated data file for hudson.tasks.Maven.MavenInstaller Ιουν 06

Jenkins: How to get node name from label to use as a parameter

人盡茶涼 提交于 2019-12-10 11:13:37
问题 I need to give a server name to a maven build. During the maven build this server name will be used to make a call that server do some tests on that server. Our servers have jenkins slaves on them and is grouped using labels Example Slaves/Node | Label Server1 | BackEndServers Server2 | BackEndServers Server3 | FrontEndServers Server4 | FrontEndServers With Elastic Axis plugin i can say run my Jenkins job on this Node Label (for example on BackEndServers) and the same project will be executed

How does Jenkins discover the config.jelly for a post-build plugin?

↘锁芯ラ 提交于 2019-12-10 11:08:15
问题 I'm creating a post-build plugin for some customized reports in my company. I started with the Jenkins "hello world" example provided here: https://wiki.jenkins-ci.org/display/JENKINS/Plugin+tutorial This worked great. I was able to load the plugin and use it in my Jenkins instance without any problem. To get things going for my project, I was able to move the HelloWorldBuilder to another folder than the default one the Jenkins HPI setup created, build, and upload this plugin with no problem.

bitbucket-build-status-notifier plugin for jenkins reports wrong status

送分小仙女□ 提交于 2019-12-10 10:31:16
问题 Jenkins should notify bitbucket if a job that is linked to a branch has passed or falied, and it does: But for some reason, in the branch view, it doesn't notify about the result of the last build, and says it failed even if the last build has passed: How do I make it reffer to the result of the last build only? Thanks! 回答1: Today it was released a new version of the plugin for jenkins bitbucket-build-status-notifier which allows exactly what you need to avoid the problem you describe. It's

How to change a Git URL in all Jenkins jobs

耗尽温柔 提交于 2019-12-10 10:11:52
问题 I have more than 100 jobs in Jenkins and I have to change a Git URL in each and every job since we changed the git server. I must traverse each job and change the Git URL. Can anyone help me with a groovy script? I was able to traverse each job, but not able to get the Git URL or change it: import hudson.plugins.emailext.* import hudson.model.* import hudson.maven.* import hudson.maven.reporters.* import hudson.tasks.* // For each project for(item in Hudson.instance.items) { println("JOB : "

Using ssh-agent with jenkins while polling SCM

荒凉一梦 提交于 2019-12-10 09:34:54
问题 Im using the Jenkins ssh-agent plugin in order to give ssh credentials to my builds which works perfectly, however I have it set up to poll the scm (in this case bitbucket git) in order to check for changes. And of course to access the repo in order to poll for changes it also needs those ssh credentials, I cant seem to find anything related to this in the wiki but there must be a way to do so. It seems like such a silly thing for them to not have implemented it, after all if you need ssh