Re: I can't get anything to work with bat in pipeline jenkinsfile

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Re: I can't get anything to work with bat in pipeline jenkinsfile

Daniel Butler
If you want to see the bat file output, remove the returnStdOut. You only need that if you want to assign the output to variable and use it later in the pipeline.
if you still want it in the logging as well as a variable:

output = bat returnStdout: true, script: 'echo %PATH%'



On Fri, 27 Mar 2020, 12:40 wowberk, <[hidden email]> wrote:
Hi all, 

I have uploaded this file.jenkinsfile in a repository

pipeline {
agent any
options {
timeout(4)
}


stages {
stage('SmokeTest Login') {
steps {
sleep 15
echo 'SmokeTest Login Init..'
bat returnStdout: true, script: 'echo %PATH%'
echo 'SmokeTest Login Finished..'
}
}
}


but i can't get jenkins to return anything on screen or continue or showing any kind of error.


[Pipeline] {
[Pipeline] stage
[Pipeline] { (SmokeTest Login)
[Pipeline] sleep
Sleeping for 15 sec
[Pipeline] echo
SmokeTest Login Init..
[Pipeline] bat
Cancelling nested steps due to timeout
Sending interrupt signal to process
After 20s process did not stop
[Pipeline] }

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/c70ebdda-42ab-4a85-83ea-f6c711cd7f4b%40googlegroups.com.

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/CAO37hbgeDiR2DSEvjzLROK3WNRmRzC3LRC7RcwLRa8FfGQOrEA%40mail.gmail.com.
Reply | Threaded
Open this post in threaded view
|

Re: I can't get anything to work with bat in pipeline jenkinsfile

Daniel Butler
in the code snippet it should have had a second line:

echo output

On Fri, Mar 27, 2020 at 1:09 PM Daniel Butler <[hidden email]> wrote:
If you want to see the bat file output, remove the returnStdOut. You only need that if you want to assign the output to variable and use it later in the pipeline.
if you still want it in the logging as well as a variable:

output = bat returnStdout: true, script: 'echo %PATH%'



On Fri, 27 Mar 2020, 12:40 wowberk, <[hidden email]> wrote:
Hi all, 

I have uploaded this file.jenkinsfile in a repository

pipeline {
agent any
options {
timeout(4)
}


stages {
stage('SmokeTest Login') {
steps {
sleep 15
echo 'SmokeTest Login Init..'
bat returnStdout: true, script: 'echo %PATH%'
echo 'SmokeTest Login Finished..'
}
}
}


but i can't get jenkins to return anything on screen or continue or showing any kind of error.


[Pipeline] {
[Pipeline] stage
[Pipeline] { (SmokeTest Login)
[Pipeline] sleep
Sleeping for 15 sec
[Pipeline] echo
SmokeTest Login Init..
[Pipeline] bat
Cancelling nested steps due to timeout
Sending interrupt signal to process
After 20s process did not stop
[Pipeline] }

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/c70ebdda-42ab-4a85-83ea-f6c711cd7f4b%40googlegroups.com.

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/CAO37hbhN5Kyvq7SNh4r_qJ%3DTpJE--Tsw8RWg__gAhaD-OEkDQg%40mail.gmail.com.