0

I'm seeing so many different sources how to to achieve CI with Jenkins and EC2 and strangely none seem to fit my needs.

I have 2 EC2 ubuntu instances. One is empty and the other has Jenkins installed on it. I want to perform a build on the Jenkins machine and copy the jar to the other ubuntu machine. Once the jar is there i want to run mvn spring-boot:run

That's is - a very simple flow which i can't find a good source to follow that doesn't include slaves, dockers etc..

Killyz
  • 109
  • 2
  • 9

2 Answers2

0

AWS Code Deploy lets you use a Jenkins and deploy it on your EC2 instances.

Quick google search gave me this very detailed instruction on how to setup code pipeline with AWS Code Deploy.

The pipeline uses GitHub -> Jenkins -> EC2 flow, as you need it.

DevDio
  • 1,525
  • 1
  • 18
  • 26
  • Thanks, I'm not familiar with CodeDeploy... is it a free AWS service like micro EC2 instances? – Killyz Sep 06 '17 at 15:19
  • It is free if you are using EC2 instance, see [Code Deploy](https://aws.amazon.com/codedeploy/faqs/) `Billing` section. If you are running `on-premise` instance, you pay $0.02 per instance update. If you wonder what is `on-premise` instance, see [this](http://docs.aws.amazon.com/codedeploy/latest/userguide/instances-on-premises.html). – DevDio Sep 06 '17 at 15:43
0

Set up jenkins to do a build then scp the artifact to the other machine

There's an answer here how to setup ssh keys for jenkins to publish via ssh about setting up the keys for ssh

Vorsprung
  • 32,923
  • 5
  • 39
  • 63