Jenkins

Jenkins can't reach Sonarqube

五迷三道 提交于 2021-01-27 19:41:38
问题 I am currently trying to get my Jenkins/Sonar integration to work. Here is what I have: Jenkins is working Sonarqube is working (reachable from webinterface) Ports are open However! I tried all possible settings, Jenkins insists that Sonarqube is Localhost:9000, no matter what I tell it (and even if, this should work too). This leads to following: and ultimately lets the build fail. What could I try to rectify this? 回答1: localhost:9000 is the default sonar qube url, regarding the official

Jenkins - how to show downstream jobs build result on Gerrit patch set?

微笑、不失礼 提交于 2021-01-27 19:32:23
问题 below is my use case, I have jobs A, B, C - A is upstream and B and C are downstream jobs. When a Patch set created in Gerrit, based on the patchset created event I trigger Job A and based on the result of this job, we trigger B and C. After the B and C is executed, I want to display the result of all three jobs on Gerrit patch set. like Job A SUCCESS JOB B SUCCESS JOB C FAILED right now I see only JOB A Build result showing up on GERRIT PATCH SET as JOB A SUCCESS is there any way to do this?

Jenkins can't reach Sonarqube

若如初见. 提交于 2021-01-27 19:16:10
问题 I am currently trying to get my Jenkins/Sonar integration to work. Here is what I have: Jenkins is working Sonarqube is working (reachable from webinterface) Ports are open However! I tried all possible settings, Jenkins insists that Sonarqube is Localhost:9000, no matter what I tell it (and even if, this should work too). This leads to following: and ultimately lets the build fail. What could I try to rectify this? 回答1: localhost:9000 is the default sonar qube url, regarding the official

JobDSL - Create a new job if it doesn't exist in Jenkins already

对着背影说爱祢 提交于 2021-01-27 19:00:06
问题 I created this Groovy JobDSLs script to generate a new Jenkins jobs. List screen = [["AAA", "Description" ],["AAA", "Description" ]] for (item in screen) { job(item[0]) { description(item[1]) steps { shell('command ...') } }​ }​ Is there a way how to tell JobDSL plugin to not create a job in the List, if it already exists in Jenkins? I don't want to keep to separate files for generating new jobs. One file for new jobs and one file for all existing jobs. 回答1: If a job definition does not

How to create a pull request in a Bitbucket using api 1.0

浪子不回头ぞ 提交于 2021-01-27 17:48:47
问题 I am trying to create an automation pipeline and in that, I want to create a pull request in bitbucket from my jenkins job. I found some document where I can create a pull request using rest api. But that is for api 2.0. I have old bitbucket and I am not sure which api version I have to use. Thanks, 回答1: You can create a pull request in Bitbucket using the REST API 1.0 doing the following: curl -s --user USER:PASS --request PUT --data @- --header Content-Type:application/json https:/

How to set LD_LIBRARY_PATH on Jenkins

ぃ、小莉子 提交于 2021-01-27 12:48:55
问题 I am having java.lang.UnsatisfiedLinkError problem while running a job from Jenkins. <error message="no JSTAF in java.library.path" type="java.lang.UnsatisfiedLinkError">java.lang.UnsatisfiedLinkError: no JSTAF in java.library.path at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1681) at java.lang.Runtime.loadLibrary0(Runtime.java:840) at java.lang.System.loadLibrary(System.java:1047) Basically I need to set LD_LIBRARY_PATH and when this is set, it works fine from command line execution

Jenkins declarative pipeline throws org.jenkinsci.plugins.scriptsecurity.sandbox.RejectedAccessException: unclassified getAt method

戏子无情 提交于 2021-01-27 12:44:37
问题 I have defined a shared library in Jenkins: import com.codependent.jenkins.pipelines.Utils def call(List<String> mavenGoals){ def processedMavenGoals = mavenGoals.join ' ' pipeline { agent any ... } If i call this from my project's Jenkinsfile like this it works ok: #!groovy @Library('jenkins-pipeline-shared-library-example') _ buildPipeline(['clean', 'install']) However if I omit the parethesis as Groovy syntax allows: #!groovy @Library('jenkins-pipeline-shared-library-example') _

Jenkins Windows Slave ignoring local Git settings

半腔热情 提交于 2021-01-27 08:07:07
问题 I've setup a Windows Jenkins slave to a Unix Jenkins master. I'm running Windows 8.1 with msysgit 1.9.5 and Jenkins 1.616. When checking out a repository with path/filename longer than 255 characters, I get the "Filename too long" error. This is solved by setting core.longpaths to true in the git settings. However the Windows Jenkins slave is ignoring the custom settings and uses standard settings. What I've tried Setting core.longpaths on the Windows Jenkins slave in global, system, local

Jenkins Windows Slave ignoring local Git settings

爷,独闯天下 提交于 2021-01-27 08:05:11
问题 I've setup a Windows Jenkins slave to a Unix Jenkins master. I'm running Windows 8.1 with msysgit 1.9.5 and Jenkins 1.616. When checking out a repository with path/filename longer than 255 characters, I get the "Filename too long" error. This is solved by setting core.longpaths to true in the git settings. However the Windows Jenkins slave is ignoring the custom settings and uses standard settings. What I've tried Setting core.longpaths on the Windows Jenkins slave in global, system, local

How to run a conditional step in Jenkins only when a previous step fails

拜拜、爱过 提交于 2021-01-27 07:30:43
问题 I'm trying to create a 2 step job in Jenkins. I want the second step only to run if the first step fails. (The first step executes a unit test to see if the code I'm compiling is good - if it is not then i want to run some diagnostics in the second step). The conditional step plug seems a good choice for this. However, I can't work out how to use the conditional step plug in to cause the second step to run when the first step fails. The conditional step plug in offers a list of conditions