[JIRA] (JENKINS-62211) Justin Harringa asked me to open this: pipeline triggers not working using https://github.com/jenkinsci/config-driven-pipeline-plugin

10 views
Skip to first unread message

funeeldy@yahoo.com (JIRA)

unread,
May 7, 2020, 4:00:02 PM5/7/20
to jenkinsc...@googlegroups.com
marlene cote created an issue
 
Jenkins / Bug JENKINS-62211
Justin Harringa asked me to open this: pipeline triggers not working using https://github.com/jenkinsci/config-driven-pipeline-plugin
Issue Type: Bug Bug
Assignee: Justin Harringa
Components: config-driven-pipeline-plugin
Created: 2020-05-07 19:59
Environment: jenkins is running on ubuntu
version - CloudBees Jenkins Distribution 2.222.1.1-rolling
plugin version -1.2
Priority: Blocker Blocker
Reporter: marlene cote

this is the triggers section of my pipeline. None of these jobs are running automatically.
triggers

{ cron( getWorkSpace() =~ 'Nightly/MP-NightlyBuilds/branches/integration_branches/int_mp_ui' ? 'H 3 * * 2-6' : getWorkSpace() =~ 'Nightly/MP-NightlyBuilds/branches/integration_branches/int_mp' ? 'H 1 * * 2-6' : getWorkSpace() =~ 'Nightly/MP-NightlyBuilds/branches/integration_branches/int_mp_cp' ? 'H 0 * * 2-6' : getWorkSpace() =~ 'WeeklyBuilds/MP_Weekly_570_Release/branches/integration_branches/int_mp_ui' ? 'H 23 * * 0' : getWorkSpace() =~ 'WeeklyBuilds/MP_Weekly_570_Release/branches/integration_branches/int_mp' ? 'H 21 * * 0' : getWorkSpace() =~ 'WeeklyBuilds/MP_Weekly_570_Release/branches/integration_branches/int_mp_cp' ? 'H 20 * * 0' : getWorkSpace() == 'Nighlty/CP-NightlyBuilds/branches/int/int_cp' ? 'H 23 * * 1-5' : '') }

this section of the pipeline works fine in a normal pipeline type job but not in the config driven type.

Add Comment Add Comment
 
This message was sent by Atlassian Jira (v7.13.12#713012-sha1:6e07c38)
Atlassian logo

funeeldy@yahoo.com (JIRA)

unread,
May 8, 2020, 9:38:03 AM5/8/20
to jenkinsc...@googlegroups.com
marlene cote commented on Bug JENKINS-62211
 
Re: Justin Harringa asked me to open this: pipeline triggers not working using https://github.com/jenkinsci/config-driven-pipeline-plugin

I noticed a typo in the line for the cp nightly build and corrected it. Here is the new line:
getWorkSpace() == 'Nightly/CP-NightlyBuilds/branches/int/int_cp' ? 'H 20 * * 4-6' :
but it still failed to trigger last night.

justin@harringa.com (JIRA)

unread,
May 8, 2020, 1:38:03 PM5/8/20
to jenkinsc...@googlegroups.com

Thanks marlene cote! If I recall correctly, some triggers require an initial pipeline run to save (even for a raw pipeline without this plugin) but that may have been fixed. I'm also curious if this may have something to do with `getWorkSpace()`. Will take a look.

justin@harringa.com (JIRA)

unread,
May 8, 2020, 4:52:03 PM5/8/20
to jenkinsc...@googlegroups.com

marlene cote ah! Actually, I believe what is going on here is that the template may not actually be in the actual job workspace since we attempt to do a lightweight checkout (so getWorkSpace() will likely return null or something unexpected - I think that's your declared method if I understand correctly). Would you be able to utilize env.BRANCH_NAME instead of getWorkSpace() or perhaps one of the other envs{{}}?

justin@harringa.com (JIRA)

unread,
May 8, 2020, 4:52:04 PM5/8/20
to jenkinsc...@googlegroups.com
Justin Harringa edited a comment on Bug JENKINS-62211
[~funeeldy] ah! Actually, I believe what is going on here is that the template may not actually be in the actual job workspace since we attempt to do a lightweight checkout (so {{getWorkSpace()}} will likely return {{null}} or something unexpected - I think that's your declared method if I understand correctly). Would you be able to utilize {{env.BRANCH_NAME}} instead of {{getWorkSpace()}} or perhaps [one of the other envs|https://docs.cloudbees.com/docs/admin-resources/latest/automating-with-jenkinsfile/working-with-the-env] {{}} ?

justin@harringa.com (JIRA)

unread,
May 8, 2020, 4:54:02 PM5/8/20
to jenkinsc...@googlegroups.com
Justin Harringa edited a comment on Bug JENKINS-62211
[~funeeldy] ah! Actually, I believe what is going on here is that the template may not actually be in the actual job workspace since we attempt to do a lightweight checkout (so {{getWorkSpace()}} will likely return {{null}} or something unexpected - I think that's your declared method if I understand correctly). Would you be able to utilize {{env.BRANCH_NAME}} instead of {{getWorkSpace()}} or perhaps [one of the other envs|https://docs.cloudbees.com/docs/admin-resources/latest/automating-with-jenkinsfile/working-with-the-env]  ({{JOB_NAME}} may be another candidate depending on whether this is a MultiBranch setup or another root job type) ?
Reply all
Reply to author
Forward
0 new messages