create jenkins ci project - jamongx/twitter-clone GitHub Wiki
-
Dashboard -> New Item -> Name:
Twitter_Clone_User_Service_CI_Job->Maven Project -
Dashboard -> Twitter_Clone_User_Service_CI_Job -> Configure
-
General -> Description ->
Build code with help of maven and create an image on ansible and push it onto dockerhub -
Source Code Management -> Git -> Repositories -> Repository URL ->
https://github.com/jamongx/hello-world.git -
Source Code Management -> Git -> Branches to build ->
*/main -
Build Triggers -> [V] Build whenever a SNAPSHOT dependency is built
-
Build -> Root POM ->
pom.xml -
Build -> Goals and options ->
clean install -
Post Steps -> Run regardless of build result
-
Send files or execute commands over SSH -> SSH Server Name:
ansible-server -
Transfer Set Source files ->
target/*.jar -
Remove prefix ->
target -
Remote directory ->
//opt//docker -
Exec command ->
ansible-playbook /opt/docker/build_image_user_service.yml; -
Post-build Actions -> Build other projects -> Projects to build ->
Twitter_Clone_User_Service_CD_Job-> Trigger only if build is stable