October 02, 2020

Jenkins with Github

Hello everyone, I am going to share some screenshots how to proceed -
I have done the procedure both manually and automatically.


firsly I have created a java project and run that project into command line . 


I run the java project in cmd line and start my jenkins from there only using -  java -jar jenkins.war command.


What next???
Then I created a job in jenkins and was able to run that project.

These commands  I have used in  Execute windows batch command in build- 


 Cd /Users/Reyansh/eclipse-workspace/firstproject/src
javac firstproject/firstproject.java
java firstproject/firstproject

Now comes to automation-

firstly make github account and create a remote repo and make a connection between local and remote repo.

Now, check git install plugin in jenkins.

create a job -


I have set up poll SCM-



Now if I start run my project, it will run but what I have done i went back to my project and made some changes and without click on build, It started the job itself.  As I have set up 
Poll SCM , it will check git repo every minute .

you can see in the output , it started by scm change-






No comments:

Post a Comment

Please let me know if you have any doubts.

Key concepts in Pipeline

 1. Agent- To build your code or deploy your software using azure pipelines, you need at least one agent. Two types of agent- Microsoft host...