I am executing a pkill command on a linux shell via Jenkins. This command always fails the build, when the process does not exist.
sudo docker exec mycontainer sh -c 'pkill -f processToKill || true '
Why? How can I make it succeed, even when pkill fails?