jenkins-plugins

Jenkins : VM Azure Agent : Node goes offline after work and unable to start back automatically on new job

只谈情不闲聊 提交于 2021-01-29 18:43:59
问题 Am trying to setup "AZure VM Agent" plugin in Azure. Am done with all configurations and first time when i trigger a job, a slave on Azure gets created and it executes the job. But as soon as job execution completes, node goes into offline mode. Now if I trigger another jenkins job, offline node is not coming online automatically and so jenkins job is stuck on "waiting for agent" or "agent is offline". After sometime, new agent comes and it takes its own time to get ready and all. How can I

how to trigger the scheduled job which has parameters

放肆的年华 提交于 2021-01-29 12:31:06
问题 How to schedule the parameterized jenkins job? I have a parameterized parent job which has 6 child jobs. when the parent job is triggered it should start the child jobs one after another.I should run the parent job for every 7 hours on weekend which I have given as H */7 * * 6-7 . My questions are: How does the parent job takes the parameters when it is triggered? Does it take the default choice or do i need a script to give the parameters? How to configure if i want to skip any one of the

github-branch-source Jenkins integration fails running with error : stderr: fatal: Unable to find remote helper for 'https'

不问归期 提交于 2021-01-29 11:54:27
问题 Below is exception stacktrace which I see in Jenkins console log which is built/ rather kicked off automatically on push event. Push event to branch master Connecting to https://Gihub-private-repo/api/v3 using vinId/****** (vinId_pass) Obtained Jenkinsfile from 02f2d3a422dd46cb25bc7bad6c7f9ac1aedd58e7 Running in Durability level: MAX_SURVIVABILITY [Pipeline] Start of Pipeline [Pipeline] node Running on Jenkins in /home/jenkins2/.jenkins/workspace/teGhe_JenStUpdGhe_JenStUp_master [Pipeline] {

Getting Jenkins build time when started

时光毁灭记忆、已成空白 提交于 2021-01-29 10:33:57
问题 I want to get the time when a build was started. I know the build name and number, but trick is the build may not have completed yet. The script can run on the Jenkins server or can be an API call. Any way I can accomplish that? 回答1: You can install ZenTimestamp Plugin and get the time stamp using BUILD_TIMESTAMP variable added by this plugin. Note: You need to specify SimpleDateFormat pattern (e.g. yyyyMMddHHmmss ). You must activate the Global Property! 回答2: Under the Jenkins job you will

sending email notifications to all developers who committed changes in a branch - Jenkins

守給你的承諾、 提交于 2021-01-29 10:05:24
问题 I want to send email notifications to all developers who committed changes in a branch. I'm using a Freestyle project integrated with Github. I've searched a lot but didn't find a solution. Any help is greatly appreciated. Thanks 回答1: You can do this as follows: Install and configure the Email-ext plugin. In your job configuration page, click Add post-build action and select Editable Email Notification . Click Advanced Settings . Under your preferred build status conditions, click Add and

How to use Jenkins String Parameter in pipeline

不想你离开。 提交于 2021-01-29 07:57:41
问题 We am using Jenkins Pipeline to configure jobs in jenkins. For a bunch of jobs we need user input for which we use parameterised build where user can input parameter values and later we use the values in our .jenkinsfile in sh like sh "./build-apply.sh ${accountnumber} ${volumename} ${vpcname} services ${snapshotid}" This used to work with Jenkins 2.16 Pipeline 2.3 Groovy 2.15 However, when I rebuild Jenkins to: 2.16 or latest 2.26 Pipeline 2.5 Pipeline: Groovy 2.19 The above sh stopped

How to get a reference to form elements in a Jenkins jelly script for a Builder configuration when the form loads?

蹲街弑〆低调 提交于 2021-01-29 02:12:01
问题 I am writing a Jenkins Builder, and in the jelly script for its configuration in the build configuration page I have some Javascript that I want to run when the form is loaded, to do a server lookup and get some information to help the user out with their configuration, which will also be performed when the user changes the form's values. Previously I have got references to the form elements by passing this in to functions in onchange or onkeyup attributes. However, now I want to run some

How to get a reference to form elements in a Jenkins jelly script for a Builder configuration when the form loads?

坚强是说给别人听的谎言 提交于 2021-01-29 02:11:32
问题 I am writing a Jenkins Builder, and in the jelly script for its configuration in the build configuration page I have some Javascript that I want to run when the form is loaded, to do a server lookup and get some information to help the user out with their configuration, which will also be performed when the user changes the form's values. Previously I have got references to the form elements by passing this in to functions in onchange or onkeyup attributes. However, now I want to run some

How to use pom version in shell command in jenkinsfile?

∥☆過路亽.° 提交于 2021-01-28 20:53:45
问题 I am trying to get pom.xml version within Jenkinsfile and then use that version in a shell script. This gives the exception bad substitution when trying to use pom.version . What is the correct syntax to pass the pom version? script { def pom = readMavenPom file: 'pom.xml' withCredentials(...) { sh '''#!/bin/bash cp "${WORKSPACE}/target/stats-${pom.version}-shaded.jar" /xyz ''' } } I installed Pipeline Utility Steps plugin for readMavenPom cmd but didn't restart Jenkins. Is it necessary to

Jenkins publish over SSH failed to change to remote directory

女生的网名这么多〃 提交于 2021-01-28 19:32:19
问题 I am using the Jenkins publish over SSH plugin to transfer files to a remote server. When I configure the Publish over SSH plugin and specify a Remote Directory, testing the configuration always fails with this error: jenkins.plugins.publish_over.BapPublisherException: Failed to change to remote directory [C:\zzTest] However if I leave the Remote Directory filed blank I get a success message when I test the configuration. Any ideas as to what I am doing wrong here? The directory definitely