muraliphani / RentalCars

0 stars 0 forks source link

Create a pipeline job using jenkins file to download a file from ec2 machine 1 and upload to ec2 machine 2 #13

Open muraliphani opened 2 years ago

muraliphani commented 2 years ago
  1. Create a ec2 instance and login to ec2 instance cerate folder and add some file to that folder and zip that folder
  2. create second ec2 instance
  3. create jenkins pipeline job and crete jenkins file and add the stage copy file from m1 to m2 for your own practice: using ssh plugin in jenkins you can copy file from one machine to another machine

sshagent(['tomcatpem']) { sh "scp -o StrictHostKeyChecking=no target/RentalCars.war ubuntu@${ip_address}:/home/ec2-user/apache-tomcat-9.0.63/webapps" }