Issue
When running aws
from Jenkins pipeline I have the following error message: command not found
- which aws
returns command not found
.
By other hand, when running aws
from a single job it works - which aws
returns /usr/local/bin/aws
.
Do you have any idea why this is happening?
Thank you.
Solution
You still need to install the AWS CLI inside the docker container.
# Swap to root user to install pip and aws cli then go back to jenkins user
USER root
RUN apt-get update
RUN apt install python3-pip -y
RUN pip3 install awscli --upgrade
USER jenkins
Answered By - Loaf