How to get "Changes Summary" into declarative pipeline?

2020-06-09 Thread Vitaly Karasik
For each build in jenkins there is a page with a "Changes Summary" of what happened in that build. I guess the same is available in 'when' condition as 'changelog'. How I get the same text into my declarative pipeline? I found many examples using some plugins and scripts, but Jenkins core defin

Jenkins Jira plugin - looking for pipeline example

2020-04-14 Thread Vitaly Karasik
I'm able to use JiraIssueFieldUpdater ("Issue custom field updater") from the Jira plugin in the legacy (freestyle) job. But I couldn't find any example of using this function into Jenkins pipeline, I'll be glad to see some code snippets. Vitaly -- You received this message because you are sub

Updating Jira tickets - looking for examples of flows

2020-04-06 Thread Vitaly Karasik
I've read tons of posts about Jenkins/Jira integration and played with both "Jira plugin" and "Jira Software Cloud plugin", using pipelines. 1) With the "Jira plugin" I was able only to build a link to the Jira ticket by using Jira ticket name in the commit message (using jiraSendBuildInfo). 2)

Re: Does Slack Notification plugin know to autodetect build status?

2020-04-04 Thread Vitaly Karasik
020 at 4:40:18 AM UTC-7, Vitaly Karasik wrote: >> >> Question regarding Slack Notification plugin in declarative pipeline: is >> there an elegant way to modify color and embed relevant emoji depends on >> currentBuild.currentResult? >> Or I should clone "slackSe

Does Slack Notification plugin know to autodetect build status?

2020-04-02 Thread Vitaly Karasik
Question regarding Slack Notification plugin in declarative pipeline: is there an elegant way to modify color and embed relevant emoji depends on currentBuild.currentResult? Or I should clone "slackSend" 3 times - for success, unstable and failed build? -- You received this message because you

Re: Windows JNLP agent doesn't see PATH

2020-01-20 Thread Vitaly Karasik
Simon, thank you, but as far as I see it's not the case - 'C:\Windows\system32' was part of the PATH from the start, I didn't add it. On Monday, January 20, 2020 at 4:22:57 PM UTC+2, Simon Richter wrote: > > Hi, > > On Mon, Jan 20, 2020 at 04:55:40AM -0800, Vi

Windows JNLP agent doesn't see PATH

2020-01-20 Thread Vitaly Karasik
I see really weird behaviour on my Windows (Windows Server 2019) Jenkins agent (launched by JNLP). Jenkins user has C:\Windows\system32 into its PATH (as well as other relevant paths). But bat ''' any-command ''' fails with 'cmd' is not recognized as an internal or external command

How I can orchestrate GitHub Actions from Jenkins?

2019-12-31 Thread Vitaly Karasik
I'm curious if there a simple way (not via low-level API) to orchestrate GitHub Actions from Jenkins. I found https://github.com/appleboy/jenkins-action which tries to do the opposite - run Jenkins from GitHub Actions. But I'd like to keep my Jenkins as is for now and just use GitHub Actions f

How to get list of tags for GitHub repos dynamically, with repo name as parameter

2019-02-19 Thread Vitaly Karasik
I have a pipeline job, which uses Git Parameter Plugin for getting a list of tags. It works nice as far as I use single repo, defined in the job. But I'd like to use the same job for multiple repos, with repo name as parameter (for different microservices). How this can be done? TIA, Vitaly --

Re: What are the reasons for using "Merging the pull request with the current target branch revision"

2019-02-14 Thread Vitaly Karasik
rsday, February 14, 2019 at 6:58:17 AM UTC+2, Vitaly Karasik wrote: > > GitHub Branch Source Plugin uses "Merging the pull request with the > current target branch revision" strategy by default for "Discover pull > request". > What are the reasons for using

What are the reasons for using "Merging the pull request with the current target branch revision"

2019-02-13 Thread Vitaly Karasik
GitHub Branch Source Plugin uses "Merging the pull request with the current target branch revision" strategy by default for "Discover pull request". What are the reasons for using it and not "The current pull request revision"? TIA, Vitaly -- You received this message because you are subscri

Re: How to prevent concurrent execution of jobs on the same node, but allow a few parallel steps execution?

2019-02-11 Thread Vitaly Karasik
s plugin (v2.2+): > > Set up a single resource for each node and give them all a common label > > Then your Jenkinsfile would be: > > lock(label: "common-label", variable: "LOCKED_NODE"){ > node(env.LOCKED_NODE){ > //build project > } >

Re: How to prevent concurrent execution of jobs on the same node, but allow a few parallel steps execution?

2019-01-31 Thread Vitaly Karasik
gt; четверг, 31 января 2019 г., 8:48:14 UTC+1 пользователь Vitaly Karasik > написал: >> >> I'd like to mark *whole* pipeline job as throttling resource; and unlike >> freestyle jobs, Throttleling plugin does't know to do that. I.e. I cannot >> use "throt

Re: How to prevent concurrent execution of jobs on the same node, but allow a few parallel steps execution?

2019-01-31 Thread Vitaly Karasik
KED_NODE){ > //build project > } > } > > Regards, > Daniel. > > On Thu, Jan 31, 2019 at 7:48 AM Vitaly Karasik > wrote: > >> I'd like to mark *whole* pipeline job as throttling resource; and unlike >> freestyle jobs, Throttleling plugin does'

Re: How to prevent concurrent execution of jobs on the same node, but allow a few parallel steps execution?

2019-01-30 Thread Vitaly Karasik
; for the job > reduce the possible parallel threads execution to a single thread at a time > as well, is that true? > > If this is not true, you just gather all the jobs under one throttling > category and set the concurrent builds limit to 1. > > BR, > Denys > > сред

How to prevent concurrent execution of jobs on the same node, but allow a few parallel steps execution?

2019-01-30 Thread Vitaly Karasik
I have multibranch job, whole pipeline runs on certain node. Currently I have a slaves with single executor, so multiple jobs cannot run on the same node. I'd like to use parallel steps inside my pipeline, so I need to increase number of executors. What is the best way to prevent concurrent

Re: Incorrect visualisation of pipeline with failed stage

2019-01-16 Thread Vitaly Karasik
So we have to either migrate to BlueOcean or to another CI platform. BTW, I just started to play with BlueOcean this month and in general it seems good. On Wednesday, January 16, 2019 at 3:24:46 PM UTC+2, Brian J. Murrell wrote: > > On Wed, 2019-01-16 at 01:22 -0800, Vitaly Karasik

Determine Failed Stage in Jenkins Declarative Pipeline

2019-01-16 Thread Vitaly Karasik
I'd like to report failed stage in the email notification (similar to https://stackoverflow.com/questions/43439093/determine-failed-stage-in-jenkins-declarative-pipeline). There is env.STAGE_NAME, but unfortunately, it reports "Declarative: Post Actions", not the last stage in the build itself. I

Incorrect visualisation of pipeline with failed stage

2019-01-16 Thread Vitaly Karasik
I'm using Jenkins 2.151 with declarative pipeline. This pipeline has a few stages. If one of stages failed, Jenkins classic UI (unlike BlueOcean) shows all following steps as failed, even they weren't executed at all - see attached screenshot. Any ideas how to fix that? TIA, Vitaly -- You r

Dynamic management of Jenkins nodes in Azure issue

2019-01-13 Thread Vitaly Karasik
I'm trying to use https://wiki.jenkins.io/display/JENKINS/Azure+VM+Agents+plugin for dynamic management of Jenkins nodes in Azure. As far as I see, this plugin support only user/password, not key authentication. So I configured user/password credentials, I added 'chpasswd' for setting this pas

Re: Multibranch workflow pipeline and email notifications

2018-08-30 Thread Vitaly Karasik
pdates your code see if there are new > commits. > If there are not new commits the recipient list will be empty. > > > On Wed, Aug 29, 2018 at 3:10 PM Vitaly Karasik > wrote: > >> I'm trying to add Git committers to email notifications in multibranch >> pi

Multibranch workflow pipeline and email notifications

2018-08-29 Thread Vitaly Karasik
I'm trying to add Git committers to email notifications in multibranch pipeline job. Based on https://wiki.jenkins.io/display/JENKINS/Email-ext+plugin#Email-extplugin-PipelineExamples, I configured this: emailext body: '${SCRIPT,template="report.template"}', replyTo: '$DEFAULT_REPLYTO', subj

Re: multi-branch pipeline, shell wrapper script fails

2018-08-29 Thread Vitaly Karasik
Did this script run Ok if you run it manually in the same environment/server? On Tuesday, August 28, 2018 at 9:49:06 PM UTC+3, Gabe Nydick wrote: > > There definitely were no symlinks in the path, what else? > > On Tue, Aug 28, 2018 at 8:50 AM, Gabe Nydick > wrote: > >> I did while it was runnin

Q: How to choose nodes for build based on parameter?

2017-07-31 Thread Vitaly Karasik
I have a few Jenkins slaves, some of them are labeled by "X", and others with "Y" label. I'd like to choose group of slaves, based on their label, when I starting this job. I can use "Label" as a parameter for parametrized build, but it's providing only default value, and not list of values.

Re: MultiJob retry functionality...I cant get it working

2016-12-21 Thread Vitaly Karasik
You're right. The only catch is that there is no description/examples how to write rules. For instance, how to restart not only failed, but unstable jobs as well. At the end I just modify "unstable" status to "failure" in order to use rule for retry. On Thursday, October 15, 2015 at 4:44:09 PM U

Re: MultiJob retry functionality...I cant get it working

2016-12-14 Thread Vitaly Karasik
Fernando, I see the same behavior - neither "UNSTABLE" not ".*" rules don't work for unstable build. Even, according to the plugin code, it's just Java regex match, i.e. both should work. Vitaly On Thursday, May 19, 2016 at 7:04:48 PM UTC+3, Fernando Miguélez wrote: > > > Great answer Aleksande