[JIRA] (JENKINS-57581) Jenkins job created by seed job using jobdsl script does't shows JMS message checks on job UI.

0 views
Skip to first unread message

sachinvpathare@gmail.com (JIRA)

unread,
May 21, 2019, 7:11:02 AM5/21/19
to jenkinsc...@googlegroups.com
sachin pathare created an issue
 
Jenkins / Task JENKINS-57581
Jenkins job created by seed job using jobdsl script does't shows JMS message checks on job UI.
Issue Type: Task Task
Assignee: Scott Hebert
Attachments: created-job_ui.png, dsl_script.png, job_config.png
Components: jms-messaging-plugin
Created: 2019-05-21 11:10
Environment: jenkins version : 2.156 and 2.174

job DSL Version : 1.72
JMS version : 1.1.4
Priority: Minor Minor
Reporter: sachin pathare

I have Jenkins seed job which include DSL script for creating new jobs.

in which i have passed JMS message checks, when seed job triggers it created job but not showing message checks on job UI, but it shows message checks in job/config.xml 

 

DSL script includes following : 

 

 

Please see the attachment

Add Comment Add Comment
 
This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)

scoheb@gmail.com (JIRA)

unread,
May 23, 2019, 10:43:03 AM5/23/19
to jenkinsc...@googlegroups.com

scoheb@gmail.com (JIRA)

unread,
May 23, 2019, 10:44:02 AM5/23/19
to jenkinsc...@googlegroups.com
Scott Hebert commented on Task JENKINS-57581
 
Re: Jenkins job created by seed job using jobdsl script does't shows JMS message checks on job UI.

I was not able to reproduce your issue.

Here is the script I was using:

pipelineJob("trigger") {

    definition {

        parameters {
            stringParam('CI_MESSAGE', '', 'contents of message')
        }

        triggers {
            ciBuildTrigger {
                providerData {
                    activeMQSubscriberProviderData {
                        name("UMB")
                        overrides {
                            topic("Consumer.rh-jenkins-ci-plugin.8dad9900-abcdef.VirtualTopic.eng.brew.build.complete")
                        }
                        checks {
                            msgCheck {
                                field('$.info.extra.container_koji_task_id')
                                expectedValue("\\d+")
                            }
                        }
                        selector("mtype = 'scott'")
                    }
                }
                noSquash(true)
            }
        }

        cps {
            sandbox(false)
            script("""
node('master') {
  echo CI_MESSAGE
}
""")
        }
    }
}

Here is my job config:

scoheb@gmail.com (JIRA)

unread,
May 23, 2019, 10:44:02 AM5/23/19
to jenkinsc...@googlegroups.com
Scott Hebert resolved as Cannot Reproduce
 
Change By: Scott Hebert
Status: Open Resolved
Resolution: Cannot Reproduce

sachinvpathare@gmail.com (JIRA)

unread,
May 24, 2019, 12:53:02 AM5/24/19
to jenkinsc...@googlegroups.com
sachin pathare commented on Task JENKINS-57581
 
Re: Jenkins job created by seed job using jobdsl script does't shows JMS message checks on job UI.

Scott Hebert,

your using a Pipline script and I am using DSL script to create job, On my side also it shows in config.xml  file but not on the JOB UI. 

sachinvpathare@gmail.com (JIRA)

unread,
May 24, 2019, 12:54:02 AM5/24/19
to jenkinsc...@googlegroups.com
sachin pathare edited a comment on Task JENKINS-57581
[~scoheb],


your using a Pipline script and I am using DSL script to create job, On my side also it shows in config.xml  file but not on the JOB UI. 

 

See attachment

 

!image-2019-05-24-10-23-48-581.png!

 

sachinvpathare@gmail.com (JIRA)

unread,
May 24, 2019, 12:54:02 AM5/24/19
to jenkinsc...@googlegroups.com
sachin pathare edited a comment on Task JENKINS-57581
 
Re: Jenkins job created by seed job using jobdsl script does't shows JMS message checks on job UI.
[~scoheb],

your using a Pipline script and I am using DSL script to create job, On my side also it shows in config.xml  file but not on the JOB UI. 


 

See attachment

sachinvpathare@gmail.com (JIRA)

unread,
May 24, 2019, 12:56:02 AM5/24/19
to jenkinsc...@googlegroups.com
sachin pathare edited a comment on Task JENKINS-57581
[~scoheb],

your using a Pipline script and I am using DSL script to create job, On my side also it shows in config.xml  file but not on the JOB UI. 

 

See attachment

 

!image-2019-05-24-10-23-48-581.png!

 


Created job does't shows that mesg checks on the UI but it does shows in config.xml file : 

 

 

!image-2019-05-24-10-25-04-003.png!

 

sachinvpathare@gmail.com (JIRA)

unread,
May 24, 2019, 1:00:02 AM5/24/19
to jenkinsc...@googlegroups.com
sachin pathare edited a comment on Task JENKINS-57581
[~scoheb],

your using a Pipline script and I am using DSL script to create job, On my side also it shows in config.xml  file but not on the JOB UI. 

 

See attachment

 

!image-2019-05-24-10- 23 28 - 48 55 - 581 246 .png!


 

Created job does't shows that mesg checks on the UI but it does shows in config.xml file : 

 

 

!image-2019-05-24-10- 25 29 -04- 003 077 .png!

 

sachinvpathare@gmail.com (JIRA)

unread,
May 24, 2019, 1:00:03 AM5/24/19
to jenkinsc...@googlegroups.com

sachinvpathare@gmail.com (JIRA)

unread,
May 24, 2019, 1:01:02 AM5/24/19
to jenkinsc...@googlegroups.com

sachinvpathare@gmail.com (JIRA)

unread,
May 24, 2019, 1:03:01 AM5/24/19
to jenkinsc...@googlegroups.com
sachin pathare edited a comment on Task JENKINS-57581
[~scoheb],

your using a Pipline script and I am using DSL script to create job, On my side also it shows in config.xml  file but not on the JOB UI. 

 

See attachment

 

!image-2019-05-24-10-28-55-246.png!


 

Created job does't shows that mesg checks on the UI but it does shows in config.xml file : 

 

 

!image-2019-05-24-10-29-04-077.png!

 


 

Config.xml file for job shows mesg checks :

 

!image-2019-05-24-10-32-46-026.png!

 

sachinvpathare@gmail.com (JIRA)

unread,
May 24, 2019, 2:08:02 AM5/24/19
to jenkinsc...@googlegroups.com
sachin pathare reopened an issue
 

reopening issue as still it exits have attached exact steps and screen for the issue 

Change By: sachin pathare
Resolution: Cannot Reproduce
Status: Resolved Reopened

scoheb@gmail.com (JIRA)

unread,
May 24, 2019, 9:43:02 AM5/24/19
to jenkinsc...@googlegroups.com
Scott Hebert commented on Task JENKINS-57581
 
Re: Jenkins job created by seed job using jobdsl script does't shows JMS message checks on job UI.

So 3 things.

  1. my script is not a pipeline script. it is a DSL script.
  2. You mis-spelled msgCheck.
  3. Using your method of configure is not correctly creating the CIBuildTrigger object in that Jenkins complains that it is missing a parameter from a class that CIBuildTrigger inherited.

 

Here is my version of your DSL script that works for me:

 

import groovy.json.JsonSlurper
def uuid = UUID.randomUUID().toString()

folder('test-job')  {
     description ('folder containing jobs for Rhel-8')
}



job("test-job/job-2") {
	description()
	keepDependencies(false)
  
    multiscm {
      git{
        
        remote{
          url("https://gitlab.cee.redhat.com/g11n-qe/Rhel-8.0-Automation.git")
        credentials ("demo-creds")
          
       
      }
      branch("*/master")
      }
    }
  
 //label('pooja-openqa')

	disabled(false)
	concurrentBuild(false)
	steps {
		shell("""sudo cp -R * /var/lib/openqa/tests/
ls""")
     }
triggers {
            ciBuildTrigger {
                providerData {
                    activeMQSubscriberProviderData {
                                checks {       
                                  msgCheck { 
                                      	expectedValue("RHEL-7.7")
                                        field("release-id")   
                                        }
                                }             
                                name ("Red Hat UMB")
                                overrides
                                        {
                                            topic("Consumer.rh-jenkins-ci-plugin."+uuid+".VirtualTopic.distill.compose-moved")
                                        }
                                selector("mtype =  'compose-moved' AND environment = 'prod' AND service = 'distill'")
                    }
                }
                noSquash(true)
            }
        }
             

}

At this point, I will not be addressing any code changes for this issue. I am closing the ticket.

scoheb@gmail.com (JIRA)

unread,
May 24, 2019, 9:44:01 AM5/24/19
to jenkinsc...@googlegroups.com

sachinvpathare@gmail.com (JIRA)

unread,
May 27, 2019, 1:20:02 AM5/27/19
to jenkinsc...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages