We have a configured jenkins node (macOS) with SSH connection with user X. When trying to execute fastlane from the jenkins job (inside a shell executable build action) job output shows the below error.
/var/folders/jg/mjb6fch147sdj76ynnrgnjrr0000gr/T/jenkins5916553296139089998.sh: line 3: fastlane: command not found
However when connecting to node (macOS) directly we can run the fastlane command.
The user is the same for the both cases.
Any help would be appreciated thank you.
I had similar error in ubuntu. Follow these checklist:
whoami
or id -un
in your jenkins script before the fastlane commandfastlane
Print the PATH variable inside of the jenkins script and then using the same user of previous paragraph, print the PATH in your mac. Compare them and share the results.
Just to try if they are different, you can override the PATH in the jenkins script with the value obtained in your mac. Something like this
echo "user:"
id -un
export PATH=/usr/local/bin:/Library/Frameworks/etc...
fastlane action get_version_number