Building a maven/java project with gitlab CI and deploying the jar into ubuntu EC2

Hi all,

Can you point me to some instructions to use gitlab CI to build and push a jar file to a AWS EC2 instance (Ubuntu)

I’m developing a project, currently what I’m doing every time I push a change, is to log into ubuntu (AWS EC2) and pull the changes there. then run the project there to create and run the jar file.
I’m looking to automate the process with gitlab CI.
So as when I push the jar is generated
gitlab CI would push the jar it has built to ubuntu (AWS EC2 instance).

thanks

bump. I’m interested in this as well.

I think this may help:

I’ll post back to see how it plays out.

Hey thanks this sounds good, but I think the bash file would require some modification, in particular we would need to add a maven command to build/install the jar file.
Also I don’t yet know where the webhook part fits in? the part that allow the build to automatically start once I commit and push the code?