newbie_in
newbie_in

Reputation: 55

Use of linux commands in Jenkins in windows shell

In the build step section of the project configuration pane I have the possibility to execute a windows batch command.

Is there any way to use this to execute linux commands? Is there any other way?

Upvotes: 0

Views: 1593

Answers (2)

tarantoga
tarantoga

Reputation: 1106

The equivalent build step for Linux is "Execute shell". Of course the job needs to execute on a Linux machine for it to work.

If you want to execute Linux commands on a Windows slave, then use Cygwin or MinGW as others have suggested.

Upvotes: 0

rkachach
rkachach

Reputation: 17355

You can run scripts in Cygwin:

https://www.cygwin.com/

Like the following:

C:\cygwin\bin\bash mysript.sh

The purpose of Cygwin is to make porting unix-based applications to Windows much easier, by emulating the POSIX layer through the cygwin1.dll

Upvotes: 1

Related Questions