Re: Using shell script

2018-02-14 Thread Francisco Vieira
I got there today :) although I got it to work now I need to use shell 
script inside that function... Any suggestions to do this inside a NonCPS ? 
I've been reading that is not possible.

Thanks!

Em segunda-feira, 12 de fevereiro de 2018 22:04:37 UTC, Victor Martinez 
escreveu:
>
> Hi Francisco,
>
> Did you use the annotation @NonCPS in your function? 
>
> Cheers
>

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/938b939e-7663-45ae-b7af-8ea8e35cd8d2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Using shell script

2018-02-12 Thread Victor Martinez
Hi Francisco,

Did you use the annotation @NonCPS in your function? 

Cheers

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/eed2e49b-e87c-4e6b-aea5-adae94bb267f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Using shell script

2018-02-12 Thread Francisco Vieira
Hello there,

I'm an begginer at Jenkins and I was wondering if you guys could help. My 
problem: I'm 'building' a JSON file with JSONBuilder in groovy (so far so 
good). After I do this, I wanna be able to do a command with shell script 
so I can do some things of my own. And I know how to do it, but then I get 
NotSerializableException 
when I build. Any suggestions?

Cheers!

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/644b738a-0127-4700-85da-9d9db02cfbd4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Not able to run MATLAB execution using shell script.

2014-06-27 Thread Rachit Kumar
Hello Guys,

Thanks a lot for your input, the issue has been resolved. The problem is in
the Project configuration. It was configured for Windows and I was running
it on Linux. Sorry for your time, thanks a lot!


On 26 June 2014 14:47, Vivekanand S V svvivekan...@gmail.com wrote:

 If you can execute matlab using your user account from terminal and you
 are using the same accoutn while running the job, add this line in your
  execute shell step

 export PATH=$PATH:/usr/local/MATLAB/R2014a/bin/

 That should point to the correct executable. You can try the above step
 even if you are using other user account from jenkins (it may just work :) )

 Vivek.



 On Thu, Jun 26, 2014 at 4:33 PM, Rachit Kumar tihcar.ra...@gmail.com
 wrote:

 Hello Richard,

 Modification:

 #!/bin/bash
 /usr/local/MATLAB/R2014a/bin/matlab -nosplash -nodisplay -r
 InitFileName='model_init',VariableList={'motorspeed' 'motorpositions'
 'voltage'},SimStart=0,SimEnd=20,ModelName='jenkins_test_model';jenkins_matlab

 It gives the following error:


 [MATLAB_Jenkins_Integration] $ bash -xe /tmp/hudson199216277896528528.sh
 + /unsecured/jenkins/workspace/MATLAB_Jenkins_Integration/project/build.sh 
 Build-104
 /unsecured/jenkins/workspace/MATLAB_Jenkins_Integration/project/build.sh: 
 line 2: /usr/local/MATLAB/R2014a/bin/matlab: No such file or directory
 Build step 'Execute shell' marked build as failure
 [htmlpublisher] Archiving HTML reports...
 [htmlpublisher] Archiving at BUILD level 
 /unsecured/jenkins/workspace/MATLAB_Jenkins_Integration/project/output to 
 /srv/jenkins/jobs/MATLAB_Jenkins_Integration/builds/2014-06-26_13-00-52/htmlreports/Simulation_Result

 Finished: FAILURE




 On Thursday, 26 June 2014 12:41:54 UTC+2, Richard Bywater wrote:

 Another option is just to change the shell script and put the path in
 there (e.g. change matlab to /opt/matlab/bin/matlab or whether the matlab
 executable is)

 Richard.


 On Thu, Jun 26, 2014 at 9:59 PM, Rachit Kumar tihcar...@gmail.com
 wrote:

 Frankly I am new to Jenkins and new to Linux environment as well!
 How can I check what is th euserid jenkins is using and how do I set
 the PATH for that userid. Also I do not have root access, so will it be
 possible for me to change the PATH of Jenkins userid and and run the MATLAB
 simulation.
 Thank you!


 On Thursday, 26 June 2014 11:36:49 UTC+2, matthew...@diamond.ac.uk
 wrote:

  Doesn’t matlab: command not found tell you what the problem is? If
 it works from the terminal but not under Jenkins, then the PATH is
 presumably different in the two cases. Did you try in from the terminal
 using the same userid that Jenkins runs under?



 *From:* Rachit Kumar [mailto:tihcar...@gmail.com]
 *Sent:* 26 June 2014 10:30
 *To:* jenkins...@googlegroups.com

 *Subject:* Not able to run MATLAB execution using shell script.



 Following is the shell script:

 #!/bin/bash
 matlab -nosplash -nodisplay -r 
 InitFileName='model_init',VariableList={'motorspeed'
 'motorpositions' 'voltage'},SimStart=0,SimEnd=2
 0,ModelName='jenkins_test_model';jenkins_matlab

 This works fine when I execute it from Terminal, but throws following
 error when I use 'Execute shell' to run the script:

 [MATLAB_Jenkins_Integration] $ bash -xe /tmp/hudson567488996824014170.sh

 + 
 /unsecured/jenkins/workspace/MATLAB_Jenkins_Integration/project/build.sh 
 Build-102

 /unsecured/jenkins/workspace/MATLAB_Jenkins_Integration/project/build.sh: 
 line 2: matlab: command not found

 Build step 'Execute shell' marked build as failure

 [htmlpublisher] Archiving HTML reports...

 [htmlpublisher] Archiving at BUILD level 
 /unsecured/jenkins/workspace/MATLAB_Jenkins_Integration/project/output to 
 /srv/jenkins/jobs/MATLAB_Jenkins_Integration/builds/2014-06-26_11-03-09/htmlreports/Simulation_Result

 Finished: FAILURE


 It would be really great if someone can help resolving this problem.
 Thanks in advance!

 --
 You received this message because you are subscribed to the Google
 Groups Jenkins Users group.
 To unsubscribe from this group and stop receiving emails from it, send
 an email to jenkinsci-use...@googlegroups.com.

 For more options, visit https://groups.google.com/d/optout.

--
 You received this message because you are subscribed to the Google
 Groups Jenkins Users group.
 To unsubscribe from this group and stop receiving emails from it, send
 an email to jenkinsci-use...@googlegroups.com.
 For more options, visit https://groups.google.com/d/optout.


  --
 You received this message because you are subscribed to the Google Groups
 Jenkins Users group.
 To unsubscribe from this group and stop receiving emails from it, send an
 email to jenkinsci-users+unsubscr...@googlegroups.com.

 For more options, visit https://groups.google.com/d/optout.


  --
 You received this message because you are subscribed to a topic in the
 Google Groups Jenkins Users group.
 To unsubscribe from this topic, visit
 https://groups.google.com/d/topic/jenkinsci-users/789xtfRh0tM

Not able to run MATLAB execution using shell script.

2014-06-26 Thread Rachit Kumar
Following is the shell script:

#!/bin/bash
matlab -nosplash -nodisplay -r 
InitFileName='model_init',VariableList={'motorspeed' 'motorpositions' 
'voltage'},SimStart=0,SimEnd=20,ModelName='jenkins_test_model';jenkins_matlab

This works fine when I execute it from Terminal, but throws following error 
when I use 'Execute shell' to run the script:

[MATLAB_Jenkins_Integration] $ bash -xe /tmp/hudson567488996824014170.sh
+ /unsecured/jenkins/workspace/MATLAB_Jenkins_Integration/project/build.sh 
Build-102
/unsecured/jenkins/workspace/MATLAB_Jenkins_Integration/project/build.sh: line 
2: matlab: command not found
Build step 'Execute shell' marked build as failure
[htmlpublisher] Archiving HTML reports...
[htmlpublisher] Archiving at BUILD level 
/unsecured/jenkins/workspace/MATLAB_Jenkins_Integration/project/output to 
/srv/jenkins/jobs/MATLAB_Jenkins_Integration/builds/2014-06-26_11-03-09/htmlreports/Simulation_Result
Finished: FAILURE


It would be really great if someone can help resolving this problem. Thanks 
in advance!

-- 
You received this message because you are subscribed to the Google Groups 
Jenkins Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


RE: Not able to run MATLAB execution using shell script.

2014-06-26 Thread Matthew.Webber
Doesn’t matlab: command not found tell you what the problem is? If it works 
from the terminal but not under Jenkins, then the PATH is presumably different 
in the two cases. Did you try in from the terminal using the same userid that 
Jenkins runs under?

From: Rachit Kumar [mailto:tihcar.ra...@gmail.com]
Sent: 26 June 2014 10:30
To: jenkinsci-users@googlegroups.com
Subject: Not able to run MATLAB execution using shell script.

Following is the shell script:

#!/bin/bash
matlab -nosplash -nodisplay -r 
InitFileName='model_init',VariableList={'motorspeed' 'motorpositions' 
'voltage'},SimStart=0,SimEnd=20,ModelName='jenkins_test_model';jenkins_matlab

This works fine when I execute it from Terminal, but throws following error 
when I use 'Execute shell' to run the script:

[MATLAB_Jenkins_Integration] $ bash -xe /tmp/hudson567488996824014170.sh

+ /unsecured/jenkins/workspace/MATLAB_Jenkins_Integration/project/build.sh 
Build-102

/unsecured/jenkins/workspace/MATLAB_Jenkins_Integration/project/build.sh: line 
2: matlab: command not found

Build step 'Execute shell' marked build as failure

[htmlpublisher] Archiving HTML reports...

[htmlpublisher] Archiving at BUILD level 
/unsecured/jenkins/workspace/MATLAB_Jenkins_Integration/project/output to 
/srv/jenkins/jobs/MATLAB_Jenkins_Integration/builds/2014-06-26_11-03-09/htmlreports/Simulation_Result

Finished: FAILURE

It would be really great if someone can help resolving this problem. Thanks in 
advance!
--
You received this message because you are subscribed to the Google Groups 
Jenkins Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to 
jenkinsci-users+unsubscr...@googlegroups.commailto:jenkinsci-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
Jenkins Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Not able to run MATLAB execution using shell script.

2014-06-26 Thread Richard Bywater
Another option is just to change the shell script and put the path in there
(e.g. change matlab to /opt/matlab/bin/matlab or whether the matlab
executable is)

Richard.


On Thu, Jun 26, 2014 at 9:59 PM, Rachit Kumar tihcar.ra...@gmail.com
wrote:

 Frankly I am new to Jenkins and new to Linux environment as well!
 How can I check what is th euserid jenkins is using and how do I set the
 PATH for that userid. Also I do not have root access, so will it be
 possible for me to change the PATH of Jenkins userid and and run the MATLAB
 simulation.
 Thank you!


 On Thursday, 26 June 2014 11:36:49 UTC+2, matthew...@diamond.ac.uk wrote:

  Doesn’t matlab: command not found tell you what the problem is? If it
 works from the terminal but not under Jenkins, then the PATH is presumably
 different in the two cases. Did you try in from the terminal using the same
 userid that Jenkins runs under?



 *From:* Rachit Kumar [mailto:tihcar...@gmail.com]
 *Sent:* 26 June 2014 10:30
 *To:* jenkins...@googlegroups.com

 *Subject:* Not able to run MATLAB execution using shell script.



 Following is the shell script:

 #!/bin/bash
 matlab -nosplash -nodisplay -r 
 InitFileName='model_init',VariableList={'motorspeed'
 'motorpositions' 'voltage'},SimStart=0,SimEnd=20,ModelName='jenkins_test_
 model';jenkins_matlab

 This works fine when I execute it from Terminal, but throws following
 error when I use 'Execute shell' to run the script:

 [MATLAB_Jenkins_Integration] $ bash -xe /tmp/hudson567488996824014170.sh

 + /unsecured/jenkins/workspace/MATLAB_Jenkins_Integration/project/build.sh 
 Build-102

 /unsecured/jenkins/workspace/MATLAB_Jenkins_Integration/project/build.sh: 
 line 2: matlab: command not found

 Build step 'Execute shell' marked build as failure

 [htmlpublisher] Archiving HTML reports...

 [htmlpublisher] Archiving at BUILD level 
 /unsecured/jenkins/workspace/MATLAB_Jenkins_Integration/project/output to 
 /srv/jenkins/jobs/MATLAB_Jenkins_Integration/builds/2014-06-26_11-03-09/htmlreports/Simulation_Result

 Finished: FAILURE


 It would be really great if someone can help resolving this problem.
 Thanks in advance!

 --
 You received this message because you are subscribed to the Google Groups
 Jenkins Users group.
 To unsubscribe from this group and stop receiving emails from it, send an
 email to jenkinsci-use...@googlegroups.com.

 For more options, visit https://groups.google.com/d/optout.

--
 You received this message because you are subscribed to the Google Groups
 Jenkins Users group.
 To unsubscribe from this group and stop receiving emails from it, send an
 email to jenkinsci-users+unsubscr...@googlegroups.com.
 For more options, visit https://groups.google.com/d/optout.


-- 
You received this message because you are subscribed to the Google Groups 
Jenkins Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Not able to run MATLAB execution using shell script.

2014-06-26 Thread Rachit Kumar
Hello Richard,

Modification:

#!/bin/bash
/usr/local/MATLAB/R2014a/bin/matlab -nosplash -nodisplay -r 
InitFileName='model_init',VariableList={'motorspeed' 'motorpositions' 
'voltage'},SimStart=0,SimEnd=20,ModelName='jenkins_test_model';jenkins_matlab

It gives the following error:


[MATLAB_Jenkins_Integration] $ bash -xe /tmp/hudson199216277896528528.sh
+ /unsecured/jenkins/workspace/MATLAB_Jenkins_Integration/project/build.sh 
Build-104
/unsecured/jenkins/workspace/MATLAB_Jenkins_Integration/project/build.sh: line 
2: /usr/local/MATLAB/R2014a/bin/matlab: No such file or directory
Build step 'Execute shell' marked build as failure
[htmlpublisher] Archiving HTML reports...
[htmlpublisher] Archiving at BUILD level 
/unsecured/jenkins/workspace/MATLAB_Jenkins_Integration/project/output to 
/srv/jenkins/jobs/MATLAB_Jenkins_Integration/builds/2014-06-26_13-00-52/htmlreports/Simulation_Result

Finished: FAILURE
 



On Thursday, 26 June 2014 12:41:54 UTC+2, Richard Bywater wrote:

 Another option is just to change the shell script and put the path in 
 there (e.g. change matlab to /opt/matlab/bin/matlab or whether the matlab 
 executable is)

 Richard.


 On Thu, Jun 26, 2014 at 9:59 PM, Rachit Kumar tihcar...@gmail.com 
 javascript: wrote:

 Frankly I am new to Jenkins and new to Linux environment as well!
 How can I check what is th euserid jenkins is using and how do I set the 
 PATH for that userid. Also I do not have root access, so will it be 
 possible for me to change the PATH of Jenkins userid and and run the MATLAB 
 simulation.
 Thank you!


 On Thursday, 26 June 2014 11:36:49 UTC+2, matthew...@diamond.ac.uk wrote:

  Doesn’t matlab: command not found tell you what the problem is? If it 
 works from the terminal but not under Jenkins, then the PATH is presumably 
 different in the two cases. Did you try in from the terminal using the same 
 userid that Jenkins runs under?

  
   
 *From:* Rachit Kumar [mailto:tihcar...@gmail.com] 
 *Sent:* 26 June 2014 10:30
 *To:* jenkins...@googlegroups.com

 *Subject:* Not able to run MATLAB execution using shell script.

   
  
 Following is the shell script:

 #!/bin/bash
 matlab -nosplash -nodisplay -r 
 InitFileName='model_init',VariableList={'motorspeed' 
 'motorpositions' 'voltage'},SimStart=0,SimEnd=
 20,ModelName='jenkins_test_model';jenkins_matlab

 This works fine when I execute it from Terminal, but throws following 
 error when I use 'Execute shell' to run the script:

 [MATLAB_Jenkins_Integration] $ bash -xe /tmp/hudson567488996824014170.sh

 + /unsecured/jenkins/workspace/MATLAB_Jenkins_Integration/project/build.sh 
 Build-102

 /unsecured/jenkins/workspace/MATLAB_Jenkins_Integration/project/build.sh: 
 line 2: matlab: command not found

 Build step 'Execute shell' marked build as failure

 [htmlpublisher] Archiving HTML reports...

 [htmlpublisher] Archiving at BUILD level 
 /unsecured/jenkins/workspace/MATLAB_Jenkins_Integration/project/output to 
 /srv/jenkins/jobs/MATLAB_Jenkins_Integration/builds/2014-06-26_11-03-09/htmlreports/Simulation_Result

 Finished: FAILURE


 It would be really great if someone can help resolving this problem. 
 Thanks in advance!
  
 -- 
 You received this message because you are subscribed to the Google 
 Groups Jenkins Users group.
 To unsubscribe from this group and stop receiving emails from it, send 
 an email to jenkinsci-use...@googlegroups.com.

 For more options, visit https://groups.google.com/d/optout.

-- 
 You received this message because you are subscribed to the Google Groups 
 Jenkins Users group.
 To unsubscribe from this group and stop receiving emails from it, send an 
 email to jenkinsci-use...@googlegroups.com javascript:.
 For more options, visit https://groups.google.com/d/optout.




-- 
You received this message because you are subscribed to the Google Groups 
Jenkins Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Not able to run MATLAB execution using shell script.

2014-06-26 Thread Vivekanand S V
If you can execute matlab using your user account from terminal and you are
using the same accoutn while running the job, add this line in your
 execute shell step

export PATH=$PATH:/usr/local/MATLAB/R2014a/bin/

That should point to the correct executable. You can try the above step
even if you are using other user account from jenkins (it may just work :) )

Vivek.



On Thu, Jun 26, 2014 at 4:33 PM, Rachit Kumar tihcar.ra...@gmail.com
wrote:

 Hello Richard,

 Modification:

 #!/bin/bash
 /usr/local/MATLAB/R2014a/bin/matlab -nosplash -nodisplay -r
 InitFileName='model_init',VariableList={'motorspeed' 'motorpositions'
 'voltage'},SimStart=0,SimEnd=20,ModelName='jenkins_test_model';jenkins_matlab

 It gives the following error:


 [MATLAB_Jenkins_Integration] $ bash -xe /tmp/hudson199216277896528528.sh
 + /unsecured/jenkins/workspace/MATLAB_Jenkins_Integration/project/build.sh 
 Build-104
 /unsecured/jenkins/workspace/MATLAB_Jenkins_Integration/project/build.sh: 
 line 2: /usr/local/MATLAB/R2014a/bin/matlab: No such file or directory
 Build step 'Execute shell' marked build as failure
 [htmlpublisher] Archiving HTML reports...
 [htmlpublisher] Archiving at BUILD level 
 /unsecured/jenkins/workspace/MATLAB_Jenkins_Integration/project/output to 
 /srv/jenkins/jobs/MATLAB_Jenkins_Integration/builds/2014-06-26_13-00-52/htmlreports/Simulation_Result

 Finished: FAILURE




 On Thursday, 26 June 2014 12:41:54 UTC+2, Richard Bywater wrote:

 Another option is just to change the shell script and put the path in
 there (e.g. change matlab to /opt/matlab/bin/matlab or whether the matlab
 executable is)

 Richard.


 On Thu, Jun 26, 2014 at 9:59 PM, Rachit Kumar tihcar...@gmail.com
 wrote:

 Frankly I am new to Jenkins and new to Linux environment as well!
 How can I check what is th euserid jenkins is using and how do I set the
 PATH for that userid. Also I do not have root access, so will it be
 possible for me to change the PATH of Jenkins userid and and run the MATLAB
 simulation.
 Thank you!


 On Thursday, 26 June 2014 11:36:49 UTC+2, matthew...@diamond.ac.uk
 wrote:

  Doesn’t matlab: command not found tell you what the problem is? If it
 works from the terminal but not under Jenkins, then the PATH is presumably
 different in the two cases. Did you try in from the terminal using the same
 userid that Jenkins runs under?



 *From:* Rachit Kumar [mailto:tihcar...@gmail.com]
 *Sent:* 26 June 2014 10:30
 *To:* jenkins...@googlegroups.com

 *Subject:* Not able to run MATLAB execution using shell script.



 Following is the shell script:

 #!/bin/bash
 matlab -nosplash -nodisplay -r 
 InitFileName='model_init',VariableList={'motorspeed'
 'motorpositions' 'voltage'},SimStart=0,SimEnd=2
 0,ModelName='jenkins_test_model';jenkins_matlab

 This works fine when I execute it from Terminal, but throws following
 error when I use 'Execute shell' to run the script:

 [MATLAB_Jenkins_Integration] $ bash -xe /tmp/hudson567488996824014170.sh

 + /unsecured/jenkins/workspace/MATLAB_Jenkins_Integration/project/build.sh 
 Build-102

 /unsecured/jenkins/workspace/MATLAB_Jenkins_Integration/project/build.sh: 
 line 2: matlab: command not found

 Build step 'Execute shell' marked build as failure

 [htmlpublisher] Archiving HTML reports...

 [htmlpublisher] Archiving at BUILD level 
 /unsecured/jenkins/workspace/MATLAB_Jenkins_Integration/project/output to 
 /srv/jenkins/jobs/MATLAB_Jenkins_Integration/builds/2014-06-26_11-03-09/htmlreports/Simulation_Result

 Finished: FAILURE


 It would be really great if someone can help resolving this problem.
 Thanks in advance!

 --
 You received this message because you are subscribed to the Google
 Groups Jenkins Users group.
 To unsubscribe from this group and stop receiving emails from it, send
 an email to jenkinsci-use...@googlegroups.com.

 For more options, visit https://groups.google.com/d/optout.

--
 You received this message because you are subscribed to the Google
 Groups Jenkins Users group.
 To unsubscribe from this group and stop receiving emails from it, send
 an email to jenkinsci-use...@googlegroups.com.
 For more options, visit https://groups.google.com/d/optout.


  --
 You received this message because you are subscribed to the Google Groups
 Jenkins Users group.
 To unsubscribe from this group and stop receiving emails from it, send an
 email to jenkinsci-users+unsubscr...@googlegroups.com.
 For more options, visit https://groups.google.com/d/optout.


-- 
You received this message because you are subscribed to the Google Groups 
Jenkins Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.