jenkins-groovy

Jenkins Pipeline stage skip based on groovy variable defined in pipeline

柔情痞子 提交于 2020-08-27 21:41:50
问题 I'm trying to skip a stage based a groovy variable and that variable value will be calculated in another stage. In the below example, Validate stage is conditionally skipped based Environment variable VALIDATION_REQUIRED which I will pass while building/triggering the Job. --- This is working as expected. Whereas the Build stage always runs even though isValidationSuccess variable is set as false . I tried changing the when condition expression like { return "${isValidationSuccess}" == true ;

How do I filter out “Added a missed class for missing class telemetry” warnings when running the jenkins test harness?

こ雲淡風輕ζ 提交于 2020-08-10 22:30:46
问题 Im using the jenkins test harness (starting with this example usage: https://github.com/testcookbook/jenkins_harness) and this warning is killing me Was this fixed? I tried following the issues but its left me more confused. I just want to NOT see it in my output: https://issues.jenkins-ci.org/browse/JENKINS-60725?page=com.atlassian.jira.plugin.system.issuetabpanels%3Achangehistory-tabpanel, https://issues.jenkins-ci.org/browse/JENKINS-60725, https://issues.jenkins-ci.org/browse/JENKINS-60725

Using Building Blocks in Jenkins Declarative Pipeline

情到浓时终转凉″ 提交于 2020-08-06 03:06:12
问题 I'm just starting with using Jenkins declarative pipelines. As I'm supporting a few similar projects I was thinking of putting similar pipeline steps (or even stages) into reusable building blocks. These blocks should be maintained at a central spot and then included by individual pipelines (speak: DRY). I saw shared libraries as an option for scripted pipelines but I'm not sure if it works for declarative pipelines, too. Do you know a way to use something like building blocks in Jenkins

Using Building Blocks in Jenkins Declarative Pipeline

浪子不回头ぞ 提交于 2020-08-06 03:06:10
问题 I'm just starting with using Jenkins declarative pipelines. As I'm supporting a few similar projects I was thinking of putting similar pipeline steps (or even stages) into reusable building blocks. These blocks should be maintained at a central spot and then included by individual pipelines (speak: DRY). I saw shared libraries as an option for scripted pipelines but I'm not sure if it works for declarative pipelines, too. Do you know a way to use something like building blocks in Jenkins

How to get user inputs from Jenkins Active Choice parameter using Formatted HTML

删除回忆录丶 提交于 2020-07-10 10:28:16
问题 I defined parameter of type " Active Choices Reactive Reference Parameter " on Freestyle Job it returns HTML text input - <input>. but after populating this data and press "Build" i can't get the user input of this text field, tried with groovy or shell steps, for the parameter name itself i get empty string. it's possible somehow to fetch the value of below field VAPP_ID ? suppose to get "123" This is the groovy script of this Formatted HTML: vappHtml = ''' <ul style="list-style-type: none">