[JIRA] (JENKINS-61463) PipelineJob trigger deprecation, migration error

2 views
Skip to first unread message

alan.l.sparks@microfocus.com (JIRA)

unread,
Mar 12, 2020, 3:21:04 PM3/12/20
to jenkinsc...@googlegroups.com
Alan Sparks created an issue
 
Jenkins / Bug JENKINS-61463
PipelineJob trigger deprecation, migration error
Issue Type: Bug Bug
Assignee: Daniel Spilker
Components: job-dsl-plugin
Created: 2020-03-12 19:20
Environment: Jenkins LTS 2.204.5, job-dsl-plugin 1.77, pipeline job 2.37
Priority: Minor Minor
Reporter: Alan Sparks

Migration page for 1.77 deprecates pipeline trigger, so trying to migrate to new syntax. 

Change my jobs from:
triggers

{   cron('@daily') }

To:
properties {
pipelineTriggers {
triggers

{ cron('@daily') }

}
}

DSL processing now fails with:
13:02:42 ERROR: (fullbyacct.groovy, line 8) No signature of method: javaposse.jobdsl.plugin.structs.DescribableListContext.cron() is applicable for argument types: (java.lang.String) values: [@daily]
13:02:42 Possible solutions: grep(), print(java.io.PrintWriter), print(java.lang.Object), grep(java.lang.Object), wait(), find()

Am I missing something?

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

alan.l.sparks@microfocus.com (JIRA)

unread,
Mar 13, 2020, 12:57:02 PM3/13/20
to jenkinsc...@googlegroups.com

mail@daniel-spilker.com (JIRA)

unread,
Mar 16, 2020, 3:24:06 PM3/16/20
to jenkinsc...@googlegroups.com
Daniel Spilker updated an issue

I opened a PR to improve the documentation:
https://github.com/jenkinsci/job-dsl-plugin/pull/1220

Change By: Daniel Spilker
Priority: Major Minor

mail@daniel-spilker.com (JIRA)

unread,
Mar 16, 2020, 3:24:06 PM3/16/20
to jenkinsc...@googlegroups.com
Daniel Spilker started work on Bug JENKINS-61463
 
Change By: Daniel Spilker
Status: Open In Progress

whunzic1@gmail.com (JIRA)

unread,
Mar 31, 2020, 12:48:05 PM3/31/20
to jenkinsc...@googlegroups.com
William Hunzicker commented on Bug JENKINS-61463
 
Re: PipelineJob trigger deprecation, migration error

Daniel Spilker can you document how the GitLabPushTrigger works? Thanks, William

whunzic1@gmail.com (JIRA)

unread,
Mar 31, 2020, 12:50:02 PM3/31/20
to jenkinsc...@googlegroups.com
William Hunzicker edited a comment on Bug JENKINS-61463
[~daspilker] can you document how the GitLabPushTrigger works? Thanks, William

I used to do 

gitlabPush {
buildOnMergeRequestEvents(false)
buildOnPushEvents(true)
enableCiSkip(false)
setBuildDescription(true)
rebuildOpenMergeRequest('never')
commentTrigger('Jenkins please retry a build')
skipWorkInProgressMergeRequest(true)
}

whunzic1@gmail.com (JIRA)

unread,
Mar 31, 2020, 2:02:03 PM3/31/20
to jenkinsc...@googlegroups.com

Daniel Spilker read your documentation for cron and tried below, but that still fails with error 

ERROR: (unknown source) No signature of method: javaposse.jobdsl.plugin.structs.DescribableListContext.gitlabPush() is applicable for argument types: (DSLLegacyStaticPipelines$_run_closure7$_closure55$_closure61$_closure62$_closure63) values: [DSLLegacyStaticPipelines$_run_closure7$_closure55$_closure61$_closure62$_closure63@3153d47c]
Finished: FAILURE

properties {properties {       

pipelineTriggers {           

triggers {           

gitlabPush {           

spec(triggerOnPush : true,       

triggerToBranchDeleteRequest : false,       

triggerOnMergeRequest : false,        

triggerOnlyIfNewCommitsPushed : false,         

triggerOnAcceptedMergeRequest : false,         

triggerOnClosedMergeRequest : false,        

triggerOpenMergeRequestOnPush : 'never',       

triggerOnNoteRequest : false,        

noteRegex : "",       

skipWorkInProgressMergeRequest : true,       

ciSkip : true,        labelsThatForcesBuildIfAdded : "",       

setBuildDescription : true,       

addNoteOnMergeRequest  : false,        

addCiMessage : false,        

addVoteOnMergeRequest : false,        

acceptMergeRequestOnSuccess : false,      

  branchFilterType : 'ALL',        includeBranchesSpec : "",        

excludeBranchesSpec : "",        sourceBranchRegex : "",       

targetBranchRegex : "",        mergeRequestLabelFilterConfig : null,       

secretToken : "",        triggerOnPipelineEvent : false,       

triggerOnApprovedMergeRequest : false,       

pendingBuildName : "",        cancelPendingBuildsOnUpdate : false)

whunzic1@gmail.com (JIRA)

unread,
Mar 31, 2020, 2:44:03 PM3/31/20
to jenkinsc...@googlegroups.com
William Hunzicker edited a comment on Bug JENKINS-61463
[~daspilker] read your documentation for cron and tried below, but that still fails with error 
properties {        
Reply all
Reply to author
Forward
0 new messages