- Install Git
- Install Maven
- Install Docker
git clone https://github.com/njokuifeanyigerald/cicd-deploy-to-EC2.git
mvn clean install
docker build -t bopgeek/kubernetes-configmap-reload .
docker login
docker push bopgeek/kubernetes-configmap-reload
SSH-AGENT
-
first of all, ssh into your aws terminal, then vi <securtity_key>.pem and paste the contents of the .pem file you used for the ssh into the webserver
-
chmod 400 <security_key>.pem
-
Download a plugin called ssh-agent
-
go to credentials in your jenkins, in the credential typee - choose ssh-key, paste the <>.pem key in it, choose a username(example if you re using an ubuntu image, write ubuntu as the username)
-
click
Enter directly
then paste your <>.pem file used for ssh in the specific server