I downloaded Jenkins on my macOS machine and can access it just fine. I also have Docker installed on my MacOS. I have created a basic freestyle project on Jenkins with a single shell command; the command is simply a test to be sure Jenkins can make use of Docker on my machine: docker -v
.
Running the above command on my macOS terminal prints the docker version. But running the command as an "execute shell" build step in Jenkins throws the following error:
Started by user vismarkjuarez
Running as SYSTEM
Building in workspace /Users/vismarkjuarez/.jenkins/workspace/Test1
[Test1] $ /bin/sh -xe /var/folders/96/ld81p3156gdcry2gyrq888ww0000gn/T/jenkins4205572273474072782.sh
+ docker -v
/var/folders/96/ld81p3156gdcry2gyrq888ww0000gn/T/jenkins4205572273474072782.sh: line 2: docker: command not found
Build step 'Execute shell' marked build as failure
Finished: FAILURE
I think I need to configure Jenkins to point it to my MacOS Docker installation but am not sure how this is done. Most of the information I see online deals with configuring Jenkins as a Docker container. I'm running Jenkins on a macOS though.