[jbosstools-issues] [JBoss JIRA] (JBDS-4297) ensure downstream jobs can trigger via script & token or set up downstream groovy listener

Nick Boldt (JIRA) issues at jboss.org
Mon Mar 13 16:59:00 EDT 2017


     [ https://issues.jboss.org/browse/JBDS-4297?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Nick Boldt updated JBDS-4297:
-----------------------------
    Fix Version/s: 10.4.0.AM1
                       (was: 11.0.0.AM1)
                       (was: 10.4.0.AM2)


> ensure downstream jobs can trigger via script & token or set up downstream groovy listener
> ------------------------------------------------------------------------------------------
>
>                 Key: JBDS-4297
>                 URL: https://issues.jboss.org/browse/JBDS-4297
>             Project: Red Hat JBoss Developer Studio (devstudio)
>          Issue Type: Sub-task
>          Components: build
>    Affects Versions: 10.4.0.AM1
>            Reporter: Nick Boldt
>            Assignee: Nick Boldt
>             Fix For: 10.4.0.AM1
>
>         Attachments: groovy-listener.png
>
>
> Seems that Bos MW can't see CCI:
> {code}
> 20:57:25 + curl 'https://dev-platform-jenkins.rhev-ci-vms.eng.rdu2.redhat.com/job/devstudio.rpm_10.0.neon/build?token=DEVSTUDIO.RPM'
> 20:57:25 curl: (7) couldn't connect to host{code} -- https://jenkins.hosts.mwqe.eng.bos.redhat.com/hudson/view/DevStudio/view/devstudio_10.0.neon/job/devstudio.product_10.0.neon/162/console
> So we need another way to hook this up until all jobs can be migrated to CCI.
> Perhaps the listener hook used here will work:
> https://dev-platform-jenkins.rhev-ci-vms.eng.rdu2.redhat.com/view/Devstudio/view/devstudio_master/job/jbosstools-server-Run-Unit-and-ITests_master/
>  !groovy-listener.png|thumbnail! 
> {code}
> URL xpath = new URL('http://jenkins.mw.lab.eng.bos.redhat.com/hudson/job/jbosstools-server_master/api/xml?xpath=//lastBuild/number');
> File last = new File('/tmp/${JOB_NAME}_lastBuildNumber.txt'); //println "last.toPath() = " + last.toPath()
> if (last.exists())
> {
>   File check = new File('/tmp/${JOB_NAME}_checkBuildNumber.txt'); //println "check.toPath() = " + check.toPath()
>   check.delete(); check.createNewFile();
>   check << xpath.openStream();
>   print "Compare buildNumber = " + check.text + " to lastBuildNumber = " + last.text;
>   boolean status = !check.text.equals(last.text);
>   java.nio.file.Files.copy(check.toPath(), last.toPath(), java.nio.file.StandardCopyOption.REPLACE_EXISTING);
>   return status;
> } else {
>   last << xpath.openStream();
>   print "Fetch lastBuildNumber = " + last.text;
>   return true;
> }
> {code}



--
This message was sent by Atlassian JIRA
(v7.2.3#72005)


More information about the jbosstools-issues mailing list