How to get command versions supported by Pipeline

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

How to get command versions supported by Pipeline

Ven H
In my Jenkinsfile, I am using the following command

bat "dotnet restore"

I have .NET Core SDK installed in the Jenkins Slave, but still the job throws an error saying "'dotnet' is not recognized as an internal or external command,
operable program or batch file."

So, how to know which version of .NET Core SDK or for that matter any command (say MSBuild) is supported by the "bat" step of Jenkinsfile.

Please help.

Regards,
Venkatesh

--
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/CAPp28eqvJyaz_C2G%2Bs2v1V7txGb_tAJoprA6qmUAMRh4Vf%3DQsA%40mail.gmail.com.
Reply | Threaded
Open this post in threaded view
|

Re: How to get command versions supported by Pipeline

Eric Pyle-3
This message is telling you that your "bat" step does not know where to find the "dotnet" command. If you give the full path it should succeed.

On 10/13/2020 9:33 AM, Ven H wrote:
In my Jenkinsfile, I am using the following command

bat "dotnet restore"

I have .NET Core SDK installed in the Jenkins Slave, but still the job throws an error saying "'dotnet' is not recognized as an internal or external command,
operable program or batch file."

So, how to know which version of .NET Core SDK or for that matter any command (say MSBuild) is supported by the "bat" step of Jenkinsfile.

Please help.

Regards,
Venkatesh
--
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/CAPp28eqvJyaz_C2G%2Bs2v1V7txGb_tAJoprA6qmUAMRh4Vf%3DQsA%40mail.gmail.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/a4c84b6c-57fb-0547-d30d-12c6246c5242%40cd-adapco.com.
Reply | Threaded
Open this post in threaded view
|

Re: How to get command versions supported by Pipeline

Ven H
Thanks a lot for your response. However, I have another slave where it works just fine without path. So, I am trying to understand which version it supports. Also, I don't want to hardcode the path in the Jenkinsfile. Please help.

Regards,
Venkatesh


On Tue, Oct 13, 2020 at 7:14 PM Eric Pyle <[hidden email]> wrote:
This message is telling you that your "bat" step does not know where to find the "dotnet" command. If you give the full path it should succeed.

On 10/13/2020 9:33 AM, Ven H wrote:
In my Jenkinsfile, I am using the following command

bat "dotnet restore"

I have .NET Core SDK installed in the Jenkins Slave, but still the job throws an error saying "'dotnet' is not recognized as an internal or external command,
operable program or batch file."

So, how to know which version of .NET Core SDK or for that matter any command (say MSBuild) is supported by the "bat" step of Jenkinsfile.

Please help.

Regards,
Venkatesh
--
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/CAPp28eqvJyaz_C2G%2Bs2v1V7txGb_tAJoprA6qmUAMRh4Vf%3DQsA%40mail.gmail.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/a4c84b6c-57fb-0547-d30d-12c6246c5242%40cd-adapco.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/CAPp28erb5GMhpGyZ%3DKPyw%2BCQRPgqy7a%3DK0L900J5PJAwZtqqkA%40mail.gmail.com.
Reply | Threaded
Open this post in threaded view
|

Re: How to get command versions supported by Pipeline

slide
There is no direct support in Jenkins for the dotnet command, if you are using the bat step, then it should function just like if you ran the command in cmd.exe as the user that your Jenkins agent is running as. 

On Tue, Oct 13, 2020, 07:10 Ven H <[hidden email]> wrote:
Thanks a lot for your response. However, I have another slave where it works just fine without path. So, I am trying to understand which version it supports. Also, I don't want to hardcode the path in the Jenkinsfile. Please help.

Regards,
Venkatesh


On Tue, Oct 13, 2020 at 7:14 PM Eric Pyle <[hidden email]> wrote:
This message is telling you that your "bat" step does not know where to find the "dotnet" command. If you give the full path it should succeed.

On 10/13/2020 9:33 AM, Ven H wrote:
In my Jenkinsfile, I am using the following command

bat "dotnet restore"

I have .NET Core SDK installed in the Jenkins Slave, but still the job throws an error saying "'dotnet' is not recognized as an internal or external command,
operable program or batch file."

So, how to know which version of .NET Core SDK or for that matter any command (say MSBuild) is supported by the "bat" step of Jenkinsfile.

Please help.

Regards,
Venkatesh
--
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/CAPp28eqvJyaz_C2G%2Bs2v1V7txGb_tAJoprA6qmUAMRh4Vf%3DQsA%40mail.gmail.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/a4c84b6c-57fb-0547-d30d-12c6246c5242%40cd-adapco.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/CAPp28erb5GMhpGyZ%3DKPyw%2BCQRPgqy7a%3DK0L900J5PJAwZtqqkA%40mail.gmail.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/CAPiUgVdxXeFRmnS8ypdp4spPE%3DOkk_8LijVNXnY9rbKnLQ9Pyg%40mail.gmail.com.
Reply | Threaded
Open this post in threaded view
|

Re: How to get command versions supported by Pipeline

Ven H
Thank you for the response. However, the bat step runs fine in one machine and not the other. The only difference is in the version of .Net Core SDK. That's why I am surprised. Is it looking for an exact version of a specific command? Please let me know.

bat "dotnet restore"

Regards,
Venkatesh


On Tue, Oct 13, 2020 at 7:48 PM Slide <[hidden email]> wrote:
There is no direct support in Jenkins for the dotnet command, if you are using the bat step, then it should function just like if you ran the command in cmd.exe as the user that your Jenkins agent is running as. 

On Tue, Oct 13, 2020, 07:10 Ven H <[hidden email]> wrote:
Thanks a lot for your response. However, I have another slave where it works just fine without path. So, I am trying to understand which version it supports. Also, I don't want to hardcode the path in the Jenkinsfile. Please help.

Regards,
Venkatesh


On Tue, Oct 13, 2020 at 7:14 PM Eric Pyle <[hidden email]> wrote:
This message is telling you that your "bat" step does not know where to find the "dotnet" command. If you give the full path it should succeed.

On 10/13/2020 9:33 AM, Ven H wrote:
In my Jenkinsfile, I am using the following command

bat "dotnet restore"

I have .NET Core SDK installed in the Jenkins Slave, but still the job throws an error saying "'dotnet' is not recognized as an internal or external command,
operable program or batch file."

So, how to know which version of .NET Core SDK or for that matter any command (say MSBuild) is supported by the "bat" step of Jenkinsfile.

Please help.

Regards,
Venkatesh
--
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/CAPp28eqvJyaz_C2G%2Bs2v1V7txGb_tAJoprA6qmUAMRh4Vf%3DQsA%40mail.gmail.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/a4c84b6c-57fb-0547-d30d-12c6246c5242%40cd-adapco.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/CAPp28erb5GMhpGyZ%3DKPyw%2BCQRPgqy7a%3DK0L900J5PJAwZtqqkA%40mail.gmail.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/CAPiUgVdxXeFRmnS8ypdp4spPE%3DOkk_8LijVNXnY9rbKnLQ9Pyg%40mail.gmail.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/CAPp28ephQqaAppSTyM9h9NPzMVBkg0qCeG%3Dy1t1Bcb_SsvKtJQ%40mail.gmail.com.
Reply | Threaded
Open this post in threaded view
|

Re: How to get command versions supported by Pipeline

stuartrowe
The folder containing the "dotnet" executable/script needs to be added to your PATH environment variable. It's likely that the machine where this command works already has the "dotnet" folder included in the PATH environment variable.

On Tuesday, 13 October 2020 at 07:49:25 UTC-7 [hidden email] wrote:
Thank you for the response. However, the bat step runs fine in one machine and not the other. The only difference is in the version of .Net Core SDK. That's why I am surprised. Is it looking for an exact version of a specific command? Please let me know.

bat "dotnet restore"

Regards,
Venkatesh


On Tue, Oct 13, 2020 at 7:48 PM Slide <[hidden email]> wrote:
There is no direct support in Jenkins for the dotnet command, if you are using the bat step, then it should function just like if you ran the command in cmd.exe as the user that your Jenkins agent is running as. 

On Tue, Oct 13, 2020, 07:10 Ven H <[hidden email]> wrote:
Thanks a lot for your response. However, I have another slave where it works just fine without path. So, I am trying to understand which version it supports. Also, I don't want to hardcode the path in the Jenkinsfile. Please help.

Regards,
Venkatesh


On Tue, Oct 13, 2020 at 7:14 PM Eric Pyle <[hidden email]> wrote:
This message is telling you that your "bat" step does not know where to find the "dotnet" command. If you give the full path it should succeed.

On 10/13/2020 9:33 AM, Ven H wrote:
In my Jenkinsfile, I am using the following command

bat "dotnet restore"

I have .NET Core SDK installed in the Jenkins Slave, but still the job throws an error saying "'dotnet' is not recognized as an internal or external command,
operable program or batch file."

So, how to know which version of .NET Core SDK or for that matter any command (say MSBuild) is supported by the "bat" step of Jenkinsfile.

Please help.

Regards,
Venkatesh
--
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/CAPp28eqvJyaz_C2G%2Bs2v1V7txGb_tAJoprA6qmUAMRh4Vf%3DQsA%40mail.gmail.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/a4c84b6c-57fb-0547-d30d-12c6246c5242%40cd-adapco.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/CAPp28erb5GMhpGyZ%3DKPyw%2BCQRPgqy7a%3DK0L900J5PJAwZtqqkA%40mail.gmail.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].

--
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/0a8b93aa-35cd-4a18-969a-1f4cee8c4e3dn%40googlegroups.com.