Catching InterptedException Within Builder Plugin (Java)

2021-04-10 Thread Tal Yanai
Hi, Is there any way to catch an InterptedException within the Builder Perform method? I'm trying to catch the event of aborting a build. Thanks, Tal. -- You received this message because you are subscribed to the Google Groups "Jenkins Developers" group. To unsubscribe from this group and

RE: Running Java ProcessBuilder on Agent

2020-11-16 Thread Tal Yanai
Launcher is not Serializable. -Original Message- From: jenkinsci-dev@googlegroups.com On Behalf Of Jesse Glick Sent: יום ב 16 נובמבר 2020 18:18 To: Jenkins Dev Subject: Re: Running Java ProcessBuilder on Agent On Mon, Nov 16, 2020 at 10:30 AM Tal Yanai wrote: > I'm having iss

RE: Running Java ProcessBuilder on Agent

2020-11-16 Thread Tal Yanai
: Running Java ProcessBuilder on Agent On Sun, Nov 15, 2020 at 4:31 PM Tal Yanai wrote: > filePath.act(new FileCallable() { If you need to run `act` (which you do not here), use `MasterToSlaveFileCallable`, do not override `checkRoles`, and use a `static` nested class, not in

RE: Running Java ProcessBuilder on Agent

2020-11-15 Thread Tal Yanai
oute instead of just doing a sh step. Piping or redirecting to a file and reading that On Sun., Nov. 15, 2020, 8:31 a.m. Tal Yanai, mailto:t...@yanai.org.il> > wrote: Thanks Jesse, I’m getting closer, but fail to understand how to get back

RE: Running Java ProcessBuilder on Agent

2020-11-15 Thread Tal Yanai
I'm not sure why your going this route instead of just doing a sh step. Piping or redirecting to a file and reading that On Sun., Nov. 15, 2020, 8:31 a.m. Tal Yanai, mailto:t...@yanai.org.il> > wrote: Thanks Jesse, I’m getting closer, but fail to understand how to get back the

RE: Running Java ProcessBuilder on Agent

2020-11-15 Thread Tal Yanai
Thanks Jesse, I’m getting closer, but fail to understand how to get back the stdout of the process: --- ProcStarter ps = launcher.new ProcStarter(); ps.cmds(command); //.stdout(listener); Proc proc =

RE: Running Java ProcessBuilder on Agent

2020-11-15 Thread Tal Yanai
I see ProcLauncher using the Launcher. How can I use ProcessBuilder, or what is the difference? From: jenkinsci-dev@googlegroups.com On Behalf Of Jesse Glick Sent: יום א 15 נובמבר 2020 16:57 To: Jenkins Dev Subject: Re: Running Java ProcessBuilder on Agent Use the `Launcher` you are

RE: Running Java ProcessBuilder on Agent

2020-11-15 Thread Tal Yanai
, not on the agent. From: jenkinsci-dev@googlegroups.com On Behalf Of Ullrich Hafner Sent: יום א 15 נובמבר 2020 16:41 To: Jenkins Developers Subject: Re: Running Java ProcessBuilder on Agent Am 15.11.2020 um 10:29 schrieb Tal Yanai mailto:t...@yanai.org.il> >: Hi, I'm

Running Java ProcessBuilder on Agent

2020-11-15 Thread Tal Yanai
Hi, I'm trying to execute a simple /bin/csh command from within Java (I know I can use the Shell exec Step, but want to try and parse some data comes in from the stdout of the Linux command using Java. I'm using ProcessBuilder for that, however, Jenkins always running this on the controller

Re: Writing from Slave To Master

2020-11-13 Thread Tal Yanai
Using FilePath.child? On Fri, 13 Nov 2020 at 20:38 Jesse Glick wrote: > On Thu, Nov 12, 2020 at 5:35 PM Tal Yanai wrote: > > All these files have the build_number + build_id as part of their names. > > Then you can predict the filename, and must not call `FilePath.list`. >

RE: Writing from Slave To Master

2020-11-12 Thread Tal Yanai
020, at 22:40, Tal Yanai wrote: > > String buildDir = build.getRootDir().getAbsolutePath(); > FilePath masterDirectory = new FilePath(new File(buildDir + File.separator + > fileName)); As all paths here are on the master, is this the same as the following? FilePath masterDirectory = b

RE: Writing from Slave To Master

2020-11-12 Thread Tal Yanai
To Master On Thu, Nov 12, 2020 at 4:41 PM Tal Yanai wrote: > FilePath masterDirectory = new FilePath(new File(buildDir + > File.separator + fileName)); Just be careful. If `fileName` is user-controlled, this is an easy attack vector (pass `../../../secrets/master.key` for example). -- You re

RE: Writing from Slave To Master

2020-11-12 Thread Tal Yanai
@googlegroups.com On Behalf Of Jesse Glick Sent: יום ה 12 נובמבר 2020 20:16 To: Jenkins Dev Subject: Re: Writing from Slave To Master On Wed, Nov 11, 2020 at 11:24 AM Tal Yanai wrote: > ReportBuildAction reportAction = new ReportBuildAction(run, > summaryReportParams, vAPIConnectionParam,

RE: Writing from Slave To Master

2020-11-12 Thread Tal Yanai
at 11:24 AM Tal Yanai wrote: > ReportBuildAction reportAction = new ReportBuildAction(run, > summaryReportParams, vAPIConnectionParam, > tl,run.getExecutor().getCurrentWorkspace()); Use the `fp` parameter you were given, not `run.executor.currentWorkspace`, and just use `FilePath` method

RE: Writing from Slave To Master

2020-11-11 Thread Tal Yanai
disk space run.addAction(reportAction); } } } From: jenkinsci-dev@googlegroups.com On Behalf Of Ullrich Hafner Sent: יום ד 11 נובמבר 2020 18:13 To: Jenkins Developers Subject: Re: Writing from Slave To Master Am 11.11.2020 um 14:25 schrieb

RE: Writing from Slave To Master

2020-11-11 Thread Tal Yanai
inside the master instead? Thanks, Tal. -Original Message- From: jenkinsci-dev@googlegroups.com On Behalf Of Daniel Beck Sent: יום ד 11 נובמבר 2020 14:14 To: Jenkins Developers Subject: Re: Writing from Slave To Master > On 11. Nov 2020, at 12:58, Tal Yanai wrote: > > Trying

Writing from Slave To Master

2020-11-11 Thread Tal Yanai
Hello, Trying to write a code that let me dump new file with content over to the master workspace (while running on a remote Node). 2 things I'm struggling with: 1. How to find out the Master 'FilePath' while running within the Node. 2. How to make sure the code is written such that it will

Re: Accessing workspace after job is complete

2020-11-10 Thread Tal Yanai
Thank you, Coping it from the node into the master will be the best approach. How do I achieve that (copying) if the node and master don’t share NFS? Thanks, Tal. On Tue, 10 Nov 2020 at 20:52 Tal Yanai wrote: > Hi, > > Suppose the Java plugin I'm writing is producing a report file

Accessing workspace after job is complete

2020-11-10 Thread Tal Yanai
Hi, Suppose the Java plugin I'm writing is producing a report file. Within its node (slave) I will use filePath.child(fileOnDiskPath) to persist that report into that node workspace. What happened now when I want to reference that report once the build is over? How do I gain access to that

Re: reading and writing from master to slave

2019-10-30 Thread Tal Yanai
step (the plugin) will know from where to pick the input files created by the shell step? Thanks, Tal. On Tuesday, October 29, 2019 at 3:58:43 PM UTC+2, Jesse Glick wrote: > > On Tue, Oct 29, 2019 at 8:47 AM Tal Yanai > > wrote: > > if(build.getWorkspace().isRemote(

reading and writing from master to slave

2019-10-29 Thread Tal Yanai
Hi, I have a Java plugin (regular step) that is always running on the Master. The setup is also having an additional Node slave. The builds runs on the slave. The Java step plugin need to gain access to some files within the build's workspace. In order to achieve that, I'm doing the

Re: Parsing user's input that contains Jenkins env variables

2019-10-21 Thread Tal Yanai
> wrote: > >> For something like a freestyle plugin, I think you need to use the token >> macro plugin - https://wiki.jenkins.io/display/JENKINS/Token+Macro+Plugin >> for pipeline, groovy will process the string before it gets to your code >> >> On Mon, Oct 21, 20

Re: Parsing user's input that contains Jenkins env variables

2019-10-21 Thread Tal Yanai
enkin...@googlegroups.com > wrote: > >> For something like a freestyle plugin, I think you need to use the token >> macro plugin - https://wiki.jenkins.io/display/JENKINS/Token+Macro+Plugin >> for pipeline, groovy will process the string before it gets to your code >> >

Parsing user's input that contains Jenkins env variables

2019-10-21 Thread Tal Yanai
Hi, Suppose I have made a plugin implementation (a step) that asks the user for a location (path) to a file on the disk. When the user supply the value (using the job's configuration) he is using Jenkins variables/params such as ${JOB_NAME} as part of the path he supply. So for example, an

Job Action that is initialized using SimpleBuildStep.LastBuildAction after Jenkins reboot

2019-09-09 Thread Tal Yanai
Hi, I have a good working Project (Job) level Action that is being initialized by the build (yet an additional Action) as the latter implements SimpleBuildStep.LastBuildAction. All works good after the pipeline steps are all done, and the build is over. I see a link on the left menu

Is there an API to get builds location

2016-12-09 Thread Tal Yanai
Hi, I'm looking for a way to store an XML file post each build. If I got it right, the classic approach is to place it under JENKINS_HOME/jobs/job name/builds. Is there some API I can use to get that location without manually building it? Something like build.getWorkspace() just for the

Re: hpi size x10 larger since moving to pom 2.6

2016-08-19 Thread Tal Yanai
Thanks for all the help. Works well now :-) On Friday, August 19, 2016 at 3:55:41 PM UTC+3, Jesse Glick wrote: > > On Fri, Aug 19, 2016 at 7:59 AM, Tal Yanai <t...@yanai.org.il > > wrote: > > Is this normal > > No. Fixed here: > > https://github.com

hpi size x10 larger since moving to pom 2.6

2016-08-19 Thread Tal Yanai
Hi, I changed my POM parrent from 1.5 to 2.6, and now hpi contain instead of just my plugin classes, a lib directory with my jar classes, but also other big jar such org.eclipse.sisu.inject-0.1.0.jar or cdi-api-1.0.jar or maven-artifact-3.1.0.jar and others. Is this normal, or did I added

Re: Can't upload the hpi at end of build because repository is down

2016-08-18 Thread Tal Yanai
adence.com MIT License http://opensource.org/licenses/MIT tyanai Tal Yanai tya...@cadence.com scm:git:git://github.com/jenkinsci/vmanager-plugin.git scm:git:g...@github.com:jenkinsci/vmanager-plugin.git http://github.com/jenkinsc

Re: Can't upload the hpi at end of build because repository is down

2016-08-17 Thread Tal Yanai
ons, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException On Wednesday, August 17, 2016 at 10:51:08 PM UTC+3, Daniel Beck wrote: > > > > On 17.08.2016, at 21:27, Tal Yanai <t...@yanai.org.il > > wro

Re: Can't upload the hpi at end of build because repository is down

2016-08-17 Thread Tal Yanai
ur settings.xml? Is > uploading or downloading impacted? > > > On 17.08.2016, at 20:55, Tal Yanai <t...@yanai.org.il > > wrote: > > > > http://maven.jenkins-ci.org:8081/content/repositories/releases/ seems > to be down. Was the server moved? > &

Can't upload the hpi at end of build because repository is down

2016-08-17 Thread Tal Yanai
http://maven.jenkins-ci.org:8081/content/repositories/releases/ seems to be down. Was the server moved? I'm getting Connect to maven.jenkins-ci.org:8081 [maven.jenkins-ci.org/199.193.196.24] failed: Connection refused: connect -> [Help 1] Tried to update the parent POM to 2.6, and got the

Fail to release a plugin

2014-07-18 Thread Tal Yanai
Hi, I'm new with the process of releasing a plugin the to jenkinsci repository. I have a pom.xml with: scm connectionscm:git:git://github.com/jenkinsci/vmanager-plugin.git/connection developerConnectionscm:git:g...@github.com:jenkinsci/vmanager-plugin.git/developerConnection

RE: Host new plugin - commit access

2014-07-17 Thread Tal Yanai
Developer List Subject: Re: Host new plugin - commit access Added as https://github.com/jenkinsci/vmanager-plugin, you have commit access. slide On Wed, Jul 16, 2014 at 10:45 AM, Tal Yanai t...@yanai.org.il mailto:t...@yanai.org.il wrote: g...@github.com:tyanai/vManager-Plugin-Jenkins.git

RE: Host new plugin - commit access

2014-07-17 Thread Tal Yanai
@googlegroups.com] On Behalf Of Slide Sent: Thursday, July 17, 2014 11:06 PM To: Jenkins Developer List Subject: Re: Host new plugin - commit access See this wiki page: https://wiki.jenkins-ci.org/display/JENKINS/Hosting+Plugins On Thu, Jul 17, 2014 at 12:46 PM, Tal Yanai t...@yanai.org.il

Host new plugin - commit access

2014-07-16 Thread Tal Yanai
Hi, I would like to get a commit access to add a new Plugin. The GitHub plugin name is vManager-Plugin-Jenkins The GitHub personal name is tyanai Thanks, Tal. -- You received this message because you are subscribed to the Google Groups Jenkins Developers group. To unsubscribe from this

RE: Host new plugin - commit access

2014-07-16 Thread Tal Yanai
into the jenkins org? On Wed, Jul 16, 2014 at 10:26 AM, Tal Yanai t...@yanai.org.il mailto:t...@yanai.org.il wrote: Hi, I would like to get a commit access to add a new Plugin. The GitHub plugin name is vManager-Plugin-Jenkins The GitHub personal name is tyanai Thanks, Tal