Any shell script to install Appium in Jenkins on Mac?

I was able to install appium in Jenkins on a Windows machine(localhost) using the command npm install -g [email protected] in the Windows Batch section

Now for Mac, we select execute shell script and in that section I tried the same command and ran the job.

Looking at the console output, it did not install the appium as it does in Windows machine on Jenkins

Any idea if I have used the correct shell command or I am missing something else?
Thanks

Appium should be installed on machine where tests going to be executed.

  1. Where is installed Jenkins? What machine?
  2. Are you running job on SAME machine where jenkins installed? Normally job should be executed on another machine. Jenkins is like command center should have own machine. Other machines connecting to Jenkins machine and executing jobs. Such machines called slaves. Slaves could be any machine needed for executing job: Linux, Windows, MacOS …
  3. Depending on how you connecting slave machines or starting job Jenkins can have no idea where is appium, java and so on on slave. There is “inject environment” settings with job which solve this.

Hi Aleksei,

Appium is installed on the machine where tests going to be executed.

  1. Jenkins is installed on the Mac machine where these tests going to be executed
  2. Yes I am running the job on the same machine where jenkins is installed

so in job execute some command to understand did you get env variables and inject if absent.

it is looks like:

but all specific to OS you have. mine is macOS (where jobs are executed)