]
Nick Boldt updated JBDS-4297:
-----------------------------
Fix Version/s: 10.4.0.AM2
(was: 10.4.0.AM1)
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.AM2, 11.0.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/...
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/Devstud...
!groovy-listener.png|thumbnail!
{code}
URL xpath = new
URL('http://jenkins.mw.lab.eng.bos.redhat.com/hudson/job/jbosstools-s...;
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}