jenkins-plugins

Jenkins plugin shows on Plugin page but does not show on configuration page

独自空忆成欢 提交于 2021-01-27 06:00:58
问题 I am creating a hello world plugin for Jenkins by following Tutorial: Create a Jenkins Plugin to integrate Jenkins and Nexus Repository. After I followed the steps, I can run Jenkins and test the plugin. It shows on Installed Plugin Page. Then I go to Configuration page and expect to see Hello World Builder section like the below image, but there is not. What steps did I miss? Is there anything I have to do before having that plugin show up on the configuration page? Update This is the

Jenkins plugin shows on Plugin page but does not show on configuration page

ぃ、小莉子 提交于 2021-01-27 06:00:56
问题 I am creating a hello world plugin for Jenkins by following Tutorial: Create a Jenkins Plugin to integrate Jenkins and Nexus Repository. After I followed the steps, I can run Jenkins and test the plugin. It shows on Installed Plugin Page. Then I go to Configuration page and expect to see Hello World Builder section like the below image, but there is not. What steps did I miss? Is there anything I have to do before having that plugin show up on the configuration page? Update This is the

Jenkins JUnit Plugin reports a build as unstable even if test fails

谁都会走 提交于 2021-01-27 02:58:34
问题 So I am using the Jenknis JUnit parser plugin to parse the test results. I have a job which has just one test and it fails all the time. However, the JUnit plugin marks the job as unstable and not failed. Any reasons why? I have tried to set the Health report amplification factor to 1, 0.1, 0.0 but no luck. Seems like somehow this is the reason why my job is reported as Unstable and not Failed. How can I get the JUnit to fail the build? Thanks! 回答1: The following workaround worked for me: sh

Jenkins JUnit Plugin reports a build as unstable even if test fails

有些话、适合烂在心里 提交于 2021-01-27 02:58:08
问题 So I am using the Jenknis JUnit parser plugin to parse the test results. I have a job which has just one test and it fails all the time. However, the JUnit plugin marks the job as unstable and not failed. Any reasons why? I have tried to set the Health report amplification factor to 1, 0.1, 0.0 but no luck. Seems like somehow this is the reason why my job is reported as Unstable and not Failed. How can I get the JUnit to fail the build? Thanks! 回答1: The following workaround worked for me: sh

Jenkins JUnit Plugin reports a build as unstable even if test fails

有些话、适合烂在心里 提交于 2021-01-27 02:56:12
问题 So I am using the Jenknis JUnit parser plugin to parse the test results. I have a job which has just one test and it fails all the time. However, the JUnit plugin marks the job as unstable and not failed. Any reasons why? I have tried to set the Health report amplification factor to 1, 0.1, 0.0 but no luck. Seems like somehow this is the reason why my job is reported as Unstable and not Failed. How can I get the JUnit to fail the build? Thanks! 回答1: The following workaround worked for me: sh

Jenkins configurations gets reverted by SYSTEM user anomaly

狂风中的少年 提交于 2021-01-21 10:02:08
问题 I am running Jenkins version 2.85 on Kubernetes as pod(Affinity set to one workernode). I am creating Jobs using Salt Jenkins module by passing XML to this module. I am using Jenkins Global Library for preforming job execution. My Job config looks like this I am calling GobalLibrary with my parameters like repoURL, componet etc.., Things goes well for weeks and now I landed to a weird situation where my job configurations(config.xml) gets updated/revert automatically. Intermittently my "Build

How to run Jenkins Groovy scripts directly from Intellij or Eclipse

眉间皱痕 提交于 2021-01-21 09:36:22
问题 The bounty expires in 6 days . Answers to this question are eligible for a +50 reputation bounty. alex is looking for a canonical answer : The question's author is correct: trying to use Jenkins as a Groovy IDE is a living nightmare. I will award the bounty to anyone who describes how to set up a local IntelliJ (or whatever) environment for executing Groovy scripts that you'd ordinarily execute with Jenkins. It's not obvious because many scripts may contain Jenkins-specific methods that rely

How to run Jenkins Groovy scripts directly from Intellij or Eclipse

守給你的承諾、 提交于 2021-01-21 09:35:13
问题 The bounty expires in 6 days . Answers to this question are eligible for a +50 reputation bounty. alex is looking for a canonical answer : The question's author is correct: trying to use Jenkins as a Groovy IDE is a living nightmare. I will award the bounty to anyone who describes how to set up a local IntelliJ (or whatever) environment for executing Groovy scripts that you'd ordinarily execute with Jenkins. It's not obvious because many scripts may contain Jenkins-specific methods that rely

Jenkins: get environment variables in the body of a global function

て烟熏妆下的殇ゞ 提交于 2021-01-21 05:33:46
问题 I have a shared global function on PublishGitHub.groovy looks like this: #!/usr/bin/env groovy def call(body) { def config = [:] body.resolveStrategy = Closure.DELEGATE_FIRST body.delegate = config echo "\u001B[32mINFO: Publishing...\u001B[m" body() echo "\u001B[32mINFO: End Publish...\u001B[m" } And a code on my JenkinsFile: environment { VERSION = "v1.3.${env.BUILD_NUMBER}" } stages { stage ('Publish WebAPI'){ steps{ echo "\u001B[32mINFO: Start Publish...\u001B[m" PublishGitHub{ echo "This

Jenkins: get environment variables in the body of a global function

落花浮王杯 提交于 2021-01-21 05:33:24
问题 I have a shared global function on PublishGitHub.groovy looks like this: #!/usr/bin/env groovy def call(body) { def config = [:] body.resolveStrategy = Closure.DELEGATE_FIRST body.delegate = config echo "\u001B[32mINFO: Publishing...\u001B[m" body() echo "\u001B[32mINFO: End Publish...\u001B[m" } And a code on my JenkinsFile: environment { VERSION = "v1.3.${env.BUILD_NUMBER}" } stages { stage ('Publish WebAPI'){ steps{ echo "\u001B[32mINFO: Start Publish...\u001B[m" PublishGitHub{ echo "This