set -x is the default but it's not ideal.
When you have pipes and redirections it's hard to tell what's going on.

A better solution would be to do something like
cp $BASH_SOURCE /tmp/Jenkins/scripts

To copy the currently executing script to some folder of your choosing (you 
could use mktemp but I think the name is unique anyway)

On Tuesday, October 21, 2014 at 4:27:48 PM UTC+3, Daniel Serodio wrote:
>
> If this is a freestyle job, you could add "set -x" before the first build 
> step and it'll output all executed shell commands.
>
> Regards,
> Daniel Serodio
>
> On Thursday, October 2, 2014 6:50:50 PM UTC-3, Nick Dierauf wrote:
>>
>> Would love to get some insight into this temporary file that Jenkins 
>> creates. Anybody care to respond? Thanks!
>>
>> On Fri, Sep 12, 2014 at 2:05 PM, Nick Dierauf <[email protected]> wrote:
>>
>>> Hello,
>>>
>>> I am getting the following error while attempting to execute my Jenkins 
>>> (v 1.577) job:
>>>
>>> [workspace] $ 
>>> /home/administrator/Hudson/instances/Albatross/tomcat-8092-8022/temp/hudson8884100134029098059.js
>>> FATAL: command execution failedjava.io.IOException 
>>> <http://stacktrace.jenkins-ci.org/search?query=java.io.IOException>: Cannot 
>>> run program 
>>> "/home/administrator/Hudson/instances/Albatross/tomcat-8092-8022/temp/hudson8884100134029098059.js"
>>>  (in directory 
>>> "/home/administrator/Hudson/instances/Albatross/.hudson/jobs/aMart/workspace"):
>>>  java.io.IOException: error=13, Permission denied
>>>
>>> Apparently Jenkins creates this temporary file and contains instructions 
>>> about executing the job. I would like to inspect the contents of this file 
>>> however it seems that Jenkins immediately removes this file upon completion 
>>> of the job. Is there any way to prevent Jenkins from deleting this temp 
>>> file?
>>>
>>> I've searched around the forums but did not find an answer. 
>>>
>>> Thank you,
>>> Nick.
>>>
>>> -- 
>>> 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/atVAd6MQ_rs/unsubscribe
>>> .
>>> To unsubscribe from this group and all its topics, send an email to 
>>> [email protected].
>>> 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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/106df0ba-da28-47af-86f1-c09a7b06db79%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to