jenkins-plugins

Get Maven artifact properties from Jenkins plugin

瘦欲@ 提交于 2019-12-11 03:12:10
问题 I have a Jenkins and a Sonar installation, for which I'm writing a Jenkins plugin that acts after any Maven project is built and asks Sonar for that specific project's metrics. For this, I'm trying to get the Maven groupId and artifactId from the Jenkins plugin and parametrize a Sonar web API request with them. I'm currently using the perform(AbstractBuild build, Launcher launcher, BuildListener listener) extension point, but I can't seem to find the relevant attributes in the build object. I

Jenkins pipeline top-level join gets triggered before sub-level join

白昼怎懂夜的黑 提交于 2019-12-11 02:31:48
问题 I've got a multi-level build pipeline with a "top-level" join ( test_Join ) and a "sub-level" join ( test_Build1_Join ) (see image below). My test_Join job requires artifacts from both test_Build1_Join and test_Build2 . I copy them by filtering on a parameter named PL_BUILD_NUMBER that's passed downstream from test_Start job. That works (see this SO post) My problem is Sometimes, the "top-level" join is triggered before the "sub-level" join, like in the image below. This mean that the build

error in docker build publish plugin

泪湿孤枕 提交于 2019-12-11 02:03:37
问题 Can you please help me for configuring the jenkins docker build publish plugin. I have setup artifactory for docker repo and trying to push image build from github docker file. Following is the error I am getting : Error response from daemon: Invalid registry endpoint https:// https://artifactory.corp.inmobi.com/v1/: Get https:// https://artifactory.corp.inmobi.com/v1/_ping: dial tcp: unknown port tcp/. \ If this private registry supports only HTTP or HTTPS with an unknown CA certificate, \

Can't find pipeline editor anymore

て烟熏妆下的殇ゞ 提交于 2019-12-11 01:39:45
问题 I have the Blue ocean beta plugin installed and cannot find the pipeline editor. Where should it be? I have the latest version of the plugin installed, I'm sure it used to be an obvious button you could click on when going to the blue ocean view, but it's not there for me anymore. 回答1: I encountered the same problem and posted a question in the Cloudbees Community. One of the Cloudbees engineers responded with this: "At the moment you can only edit Pipelines that have been created through the

How to fix unstable builds when thresholds are met?

余生长醉 提交于 2019-12-11 01:32:50
问题 My overall coverage is meeting the threshold, but still build is marked as Unstable. Does anyone know the reason for this? 16:53:04 [JaCoCo plugin] Thresholds: JacocoHealthReportThresholds [minClass=75, maxClass=99, minMethod=75, maxMethod=99, minLine=75, maxLine=99, minBranch=40, maxBranch=99, minInstruction=65, maxInstruction=99, minComplexity=0, maxComplexity=99] 16:53:04 [JaCoCo plugin] Publishing the results.. 16:53:04 [JaCoCo plugin] Loading packages.. 16:53:04 [JaCoCo plugin] Done. 16

Inject passwords to the build as environment variables

怎甘沉沦 提交于 2019-12-11 00:07:12
问题 I am trying to set a password in jenkins through an option in 'build environments' section which can be used in my test to get the password and use it. This is the option i am checking in "Inject passwords to the build as environment variables". Problem is i am loosing these values once the seed job runs. So my values added are disappearing after seed job runs. Did anybody faced this problem? How to make it permanent so every time i can retrieve those pwds in my test code? 回答1: After running

AUTO IT EXE to be executed through Jenkins CI Tool

半世苍凉 提交于 2019-12-10 22:56:44
问题 I am using CI Jenkins Tool and trying to execute an AUTO IT Exe file. I tried through Jenkins, with the following options, but nothing is working out . Execute command line arguments batch file ant file Windows runner plugin 回答1: Running AutoIt via Jenkins on a slave will depend on how the slave is launched. Since you're using AutoIt, you're using Windows. The Windows slave can NOT be started via SSH or via Windows Service. You MUST use JNLP Web State and you MUST start it in a particular way

Build History Missing in Jenkins

痞子三分冷 提交于 2019-12-10 21:49:53
问题 I just set up a new Jenkins instance for my project (Version 2.19.4). But when I try to generate several builds for testing I find that the Build History only shows me one historical build. Before upgrading, it showed at least two or more. Is there a place in Jenkins I can set the number of historical builds which should show up? 回答1: In the job configuration page you can set the number of historic builds to maintain in the history. You've probably got it set to 0. If you have admin rights on

How do I fail a Jenkins build if a Docker Pipeline Plugin withRun command returns a non-zero exit code?

佐手、 提交于 2019-12-10 21:28:43
问题 I'm using the Docker Pipeline Plugin to execute my build scripts via Docker containers. I noticed that if I had a script return a non-zero exit code when executing within an inside() command, Jenkins would mark the pipeline execution as a failure. This example Jenkinsfile illustrates that scenario: docker.image('alpine').inside() { sh 'exit 1' } However, if I use the withRun() command, a similar Jenkinsfile will not cause the build to fail, even though the docker ps -l command shows that the

Jenkins Groovy Script finding null testResultAction for a successful run

我的梦境 提交于 2019-12-10 21:08:35
问题 We have an email report writer for test suites on jenkins. It uses a groovy script to find the correct reports and then make an HTML report detailing the test status, last time ran, links etc. hudson.model.Hudson.instance.getItems(hudson.model.FreeStyleProject).each { project -> if(project.name.contains(searchCriteria)){ if(project.lastBuild.testResultAction == null){ tr(){ td(project.name) td(){ b("No Results") } ... } } else{ if(project.lastBuild.testResultAction.failCount > 0){ tr(){ td