Runing Groovy scripts on Jenkins on Master

39 views
Skip to first unread message

Oparlescu Vlad

unread,
Jun 21, 2017, 7:59:03 AM6/21/17
to Jenkins Users
Hello Jenkins users,

I created a groovy script where I generate some values that I'm reading from the builds.
It seems that due to the fact that I use system groovy script build option, the build still runs on a slave ?
Is there a mistake or a setting that must be made on the master ?


Building remotely on frv0021g in workspace D:\MB_MFA2_18_SCU\JenkinsWorkspace\workspace\__PMT Collect K1 and K1Lite
FATAL: T:\040_PMT_SwEMT\Jenkins\KPIs\EUROPE\K1.csv (The system cannot find the path specified)
java.io.FileNotFoundException: T:\040_PMT_SwEMT\Jenkins\KPIs\EUROPE\K1.csv (The system cannot find the path specified)
	at java.io.FileOutputStream.open0(Native Method)
	at java.io.FileOutputStream.open(FileOutputStream.java:270)
	at java.io.FileOutputStream.<init>(FileOutputStream.java:213)
	at java.io.FileWriter.<init>(FileWriter.java:107)

Shouldn't have run exclusively on the master machine and not have this error?

Thank you,
Vlad

Dirk Heinrichs

unread,
Jun 21, 2017, 8:25:12 AM6/21/17
to jenkins...@googlegroups.com

Am 21.06.2017 um 13:59 schrieb Oparlescu Vlad:

It seems that due to the fact that I use system groovy script build option, the build still runs on a slave ?
Is there a mistake or a setting that must be made on the master ?

The *job* may run on a slave, but the *script* (since it's a system Groovy script) runs in the masters JVM.

HTH...

    Dirk
--
Dirk Heinrichs
Senior Systems Engineer, Delivery Pipeline
OpenTextTM Discovery | Recommind
Email: dirk.he...@recommind.com
Website: www.recommind.de

Recommind GmbH, Von-Liebig-Straße 1, 53359 Rheinbach

Vertretungsberechtigte Geschäftsführer John Marshall Doolittle, Gordon Davies, Roger Illing, Registergericht Amtsgericht Bonn, Registernummer HRB 10646

This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden

Diese E-Mail enthält vertrauliche und/oder rechtlich geschützte Informationen. Wenn Sie nicht der richtige Adressat sind oder diese E-Mail irrtümlich erhalten haben, informieren Sie bitte sofort den Absender und vernichten Sie diese Mail. Das unerlaubte Kopieren sowie die unbefugte Weitergabe dieser Mail sind nicht gestattet.

jer...@bodycad.com

unread,
Jun 21, 2017, 12:35:30 PM6/21/17
to Jenkins Users
if you are into a pipeline, you can swap node by using
node("master")
{
...
}



Oparlescu Vlad

unread,
Jun 26, 2017, 8:32:29 AM6/26/17
to Jenkins Users
Thank you :)

Oparlescu Vlad

unread,
Jun 26, 2017, 8:32:32 AM6/26/17
to Jenkins Users, dhei...@opentext.com
Thank you :)
Reply all
Reply to author
Forward
0 new messages