I have probably been Googling this the wrong way...
I have a Node express server.
I want to deploy it using Jenkins to ec2.
What are my options?
- if I want to upload the code manually, I use ssh... but I want it to be done from Jenkins.
- Yes the server is on a git repo.
- I would like a devops flow
You'll have to use AWS CodeDeploy jenkins plugin. This apply to any type of code. Node, java etc
See AWS article Setting Up the Jenkins Plugin for AWS CodeDeploy
Jenkins Plugin Github Link
I recommend you , to do it step by step :
https://gist.github.com/jrichardsz/38b335f6a5dc8c67a386fd5fb3c6200e
That is all. Just test with "build" option and verify if your application goes well.
At this point, this job is functional. The flow could be :
Note: If and only if this step has no errors, you can start with the following step.
This guide could be help you with the required configurations :
https://jrichardsz.github.io/devops/devops-with-git-and-jenkins-using-webhooks