jenkins-plugins

How to trigger a Jenkins job by another job at a certain time?

别说谁变了你拦得住时间么 提交于 2019-12-06 05:36:37
I have two jobs, JobA and JobB, JobA runs every day at 13.00 and registers some payments. I want JobA to trigger JobB which verifies the payments, if and only if JobA is successful and JobB needs to be run the next day at 04.00 Any idea how to do this? BR I have not been able to find anything that will do this out of the box. You can, of course, schedule a job to build periodically, but that's not all that you want. You could try one of these 2 ideas (I have not implemented either myself). Set JobB to build periodically at 4am, but deactivate the job. Create an intermediary job with a build

Ansible jenkins_plugin module returns “HTTP Error 403: No valid crumb was included in the request”

浪子不回头ぞ 提交于 2019-12-06 05:35:18
I am using Ansible (v 2.8) as the provisioner behind a Packer template to build an AMI for a Jenkins master node. For previous versions, the playbook passed successfully. However, as of Jenkins version 2.176.3, the jenkins_plugin module has been throwing: HTTP Error 403: No valid crumb was included in the request I have retrieved the crumb and registered it in a variable. I have tried passing it to jenkins_plugin with the http_agent field, but that doesn't work. I tried using attributes , but that didn't help either. Unless I am missing something incredibly basic, I am at the end of my tether.

Live feed of jenkins job progress bar

随声附和 提交于 2019-12-06 05:20:55
I am looking for a way to display the build progress bar of a build in jenkins to be able to display on my application. I havent been able to find any API calls to narrow this down, so i am looking for direction! This was the closest post i found on this task, but it only shows you a duration after the build is complete. how to get progress bar data for a running jenkins job through the API 来源: https://stackoverflow.com/questions/48455608/live-feed-of-jenkins-job-progress-bar

Jenkins job DSL plugin - hidden parameter

你离开我真会死。 提交于 2019-12-06 04:54:08
I am using the Jenkins hidden parameter plugin but I cant find the syntax to write it in DSL like I am doing with other parameters. For example: https://jenkinsci.github.io/job-dsl-plugin/#method/javaposse.jobdsl.dsl.helpers.BuildParametersContext.activeChoiceParam Is there any way to reflect hidden parameter in DSL? Job DSL has no built-in support for the Hidden Parameter plugin, so it's not mentioned in the API viewer. But it's supported by the Automatically Generated DSL : job('example') { parameters { wHideParameterDefinition { name('FOO') defaultValue('bar') description('lorem ipsum') } }

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

半城伤御伤魂 提交于 2019-12-06 04:53:58
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. I was also able to change this to derive from the hudson.tasks.Recorder and changed the @Extension to

How to parse JSON response in a built step in jenkins

こ雲淡風輕ζ 提交于 2019-12-06 04:14:43
问题 In order to industrialize the deployments of an IBM product, I'm going to use its REST API interfaces. I plan to use jenkins in order to orchestrate the calls to the REST APIs. I'm still wondering if it's a good idea...? If so, is there any way to simply parse the JSON responses in order to be able to make some conditions in the steps? Thanks. 回答1: You didn't say what you're using the API for, but if you have the Groovy plugin, you could use JsonSlurper Something like import groovy.json

Jenkins - Publish Over SSH Plugin: How to copy directory

爷,独闯天下 提交于 2019-12-06 03:41:36
问题 I'm trying to use Jenkins' Publish Over SSH plugin to copy all files AND sub-directories of some given directory, but so far, I've only able to copy files and NOT directory. I have a directory named foo in my workspace, and during the build, I want to copy everything in this directory to a remote server. I've tried this pattern foo/** , but it doesn't copy all sub-directories. Any suggestion? Or this is not the plugin I should be using? Thanks 回答1: For recursive copy of directory you should

How to change a Git URL in all Jenkins jobs

一笑奈何 提交于 2019-12-06 03:11:26
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 : " + item.name); } I badly need help in this, please someone help me. The script below will modify all Git

Why does the Jenkins SVN plugin give error E170001 when connecting to my VisualSVN server?

半城伤御伤魂 提交于 2019-12-06 02:17:58
问题 What I know about the VisualSVN server: it supports Windows Active Directory authentication and "basic" authentication using my Windows username and password. I can use TortoiseSVN, CollabNet, and Mac OS X Subversion clients successfully. To replicate the error, do the following: Install the Windows Jenkins package (version 1.616). Update the SVN plugin to version 2.5. Create a freestyle project. Under Source Code Management, choose Subversion. Input the repository URL. Add your Windows

Jenkins How can i upload a text file and use it as a parameter

浪尽此生 提交于 2019-12-05 23:58:00
I have a txt file that is holding a string inside, I want to be able to use this string in one of my scripts, so I'm wondering if there is a way to set the content of the file as one of the build properties or parameters which I'll be able to use in my scripts it should be the same as using one of the build environment properties. For example : ${JOB_NAME} which is holding the the job name, so in the same way I want to access the content of the file which is holding some value inside. Is it possible? You can upload a file from your computer to the workspace through the File parameter of the