In this article,we will see Create and Build Job in Jenkins.
Steps to Follow
- Create a maven Job “kt-mavenjob”.
- Build job “kt-mavenjob”.
- Verify Console Output of job “Kt-mavenjob”
1. Create a maven Job “kt-mavenjob”
Click on New Item to create a new job.
Enter an Item name “kt-mavenjob” and select “Maven Project” and click on OK.
Go to Repository “time-tracker” by using below link.
https://github.com/Ramesh-Ktexperts/time-tracker
Copy the Repository “time-tracker” URL.
Go to Source Code Management,
select Git and paste the Repository “time-tracker” URL which was copied.
Go to Build,
Enter maven command in the Goals and Options field “clean package” and click on Save.
2. Build job “kt-mavenjob”
Click on Build Now.
The job is going to building, It may take some time to complete.
We can see the green ball which means the job is build successfully.
3. Verify Console Output of job “Kt-mavenjob”
Click on green ball for seeing console output.
we can see the console output.
Console Output
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 |
Started by user Ramesh Atchala Running as SYSTEM Building in workspace C:\Program Files (x86)\Jenkins\workspace\kt-mavenjob No credentials specified > git.exe rev-parse --is-inside-work-tree # timeout=10 Fetching changes from the remote Git repository > git.exe config remote.origin.url https://github.com/Ramesh-Ktexperts/time-tracker.git # timeout=10 Fetching upstream changes from https://github.com/Ramesh-Ktexperts/time-tracker.git > git.exe --version # timeout=10 > git.exe fetch --tags --force --progress -- https://github.com/Ramesh-Ktexperts/time-tracker.git +refs/heads/*:refs/remotes/origin/* # timeout=10 > git.exe rev-parse "refs/remotes/origin/master^{commit}" # timeout=10 > git.exe rev-parse "refs/remotes/origin/origin/master^{commit}" # timeout=10 Checking out Revision 2da7656631ced619b4ae8c5320cc856fb0a35d6a (refs/remotes/origin/master) > git.exe config core.sparsecheckout # timeout=10 > git.exe checkout -f 2da7656631ced619b4ae8c5320cc856fb0a35d6a # timeout=10 Commit message: "Modified" First time build. Skipping changelog. Parsing POMs Discovered a new module training.taylor.time-tracker:time-tracker-parent Time Tracker (Parent) Discovered a new module training.taylor.time-tracker:time-tracker-core Time Tracker (Core) Discovered a new module training.taylor.time-tracker:time-tracker-web Time Tracker (Web) Modules changed, recalculating dependency graph Established TCP socket on 50737 [kt-mavenjob] $ java -cp "C:\Program Files (x86)\Jenkins\plugins\maven-plugin\WEB-INF\lib\maven35-agent-1.13.jar;C:\DevTools\apache-maven-3.6.3\boot\plexus-classworlds-2.6.0.jar;C:\DevTools\apache-maven-3.6.3/conf/logging" jenkins.maven3.agent.Maven35Main C:\DevTools\apache-maven-3.6.3 "C:\Program Files (x86)\Jenkins\war\WEB-INF\lib\remoting-3.36.jar" "C:\Program Files (x86)\Jenkins\plugins\maven-plugin\WEB-INF\lib\maven35-interceptor-1.13.jar" "C:\Program Files (x86)\Jenkins\plugins\maven-plugin\WEB-INF\lib\maven3-interceptor-commons-1.13.jar" 50737 <===[JENKINS REMOTING CAPACITY]===>channel started Executing Maven: -B -f C:\Program Files (x86)\Jenkins\workspace\kt-mavenjob\pom.xml clean package [INFO] Scanning for projects... [INFO] ------------------------------------------------------------------------ [INFO] Reactor Build Order: [INFO] [INFO] Time Tracker (Parent) [pom] [INFO] Time Tracker (Core) [jar] [INFO] Time Tracker (Web) [war] [INFO] [INFO] ----------< training.taylor.time-tracker:time-tracker-parent >---------- [INFO] Building Time Tracker (Parent) 0.5.0-SNAPSHOT [1/3] [INFO] --------------------------------[ pom ]--------------------------------- [INFO] [INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ time-tracker-parent --- [INFO] [INFO] -----------< training.taylor.time-tracker:time-tracker-core >----------- [INFO] Building Time Tracker (Core) 0.5.0-SNAPSHOT [2/3] [INFO] --------------------------------[ jar ]--------------------------------- [INFO] [INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ time-tracker-core --- [INFO] Deleting C:\Program Files (x86)\Jenkins\workspace\kt-mavenjob\core\target [INFO] [INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ time-tracker-core --- [INFO] Using 'UTF-8' encoding to copy filtered resources. [INFO] skip non existing resourceDirectory C:\Program Files (x86)\Jenkins\workspace\kt-mavenjob\core\src\main\resources [INFO] [INFO] --- maven-compiler-plugin:3.6.1:compile (default-compile) @ time-tracker-core --- [INFO] Changes detected - recompiling the module! [INFO] Compiling 3 source files to C:\Program Files (x86)\Jenkins\workspace\kt-mavenjob\core\target\classes [INFO] [parsing started SimpleFileObject[C:\Program Files (x86)\Jenkins\workspace\kt-mavenjob\core\src\main\java\training\taylor\timetracker\core\Tracker.java]] [INFO] [parsing completed 55ms] [INFO] [parsing started SimpleFileObject[C:\Program Files (x86)\Jenkins\workspace\kt-mavenjob\core\src\main\java\training\taylor\timetracker\core\dao\TimeEntry.java]] [INFO] [parsing completed 13ms] [INFO] [loading C:\windows\system32\config\systemprofile\.m2\repository\org\springframework\spring-context\5.0.2.RELEASE\spring-context-5.0.2.RELEASE.jar(/org/springframework/context/annotation/Configuration.class)] [INFO] [loading /modules/java.base/java/util/ArrayList.class] [INFO] [loading /modules/java.base/java/lang/annotation/Target.class] [INFO] [loading /modules/java.base/java/lang/annotation/ElementType.class] [INFO] [loading /modules/java.base/java/lang/annotation/Retention.class] [INFO] [loading /modules/java.base/java/lang/annotation/RetentionPolicy.class] [INFO] [loading /modules/java.base/java/lang/Deprecated.class] [INFO] [loading /modules/java.base/java/lang/annotation/Annotation.class] [INFO] [loading C:\windows\system32\config\systemprofile\.m2\repository\org\springframework\spring-core\5.0.2.RELEASE\spring-core-5.0.2.RELEASE.jar(/org/springframework/core/annotation/AliasFor.class)] [INFO] [loading C:\windows\system32\config\systemprofile\.m2\repository\org\springframework\spring-context\5.0.2.RELEASE\spring-context-5.0.2.RELEASE.jar(/org/springframework/context/annotation/ScopedProxyMode.class)] [INFO] [loading /modules/java.base/java/lang/Override.class] [INFO] [loading C:\windows\system32\config\systemprofile\.m2\repository\org\springframework\spring-beans\5.0.2.RELEASE\spring-beans-5.0.2.RELEASE.jar(/org/springframework/beans/factory/annotation/Autowire.class)] [INFO] [loading /modules/java.base/java/lang/annotation/Repeatable.class] [INFO] [loading C:\windows\system32\config\systemprofile\.m2\repository\org\springframework\spring-context\5.0.2.RELEASE\spring-context-5.0.2.RELEASE.jar(/org/springframework/context/annotation/ComponentScan$Filter.class)] [INFO] [total 1183ms] [INFO] [INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ time-tracker-core --- [INFO] Using 'UTF-8' encoding to copy filtered resources. [INFO] skip non existing resourceDirectory C:\Program Files (x86)\Jenkins\workspace\kt-mavenjob\core\src\test\resources [INFO] [INFO] --- maven-compiler-plugin:3.6.1:testCompile (default-testCompile) @ time-tracker-core --- .m2\repository\org\springframework\spring-jcl\5.0.2.RELEASE\spring-jcl-5.0.2.RELEASE.jar,C:\windows\system32\config\systemprofile\.m2\repository\org\springframework\spring-expression\5.0.2.RELEASE\spring-expression-5.0.2.RELEASE.jar,C:\windows\system32\config\systemprofile\.m2\repository\junit\junit\4.12\junit-4.12.jar,C:\windows\system32\config\systemprofile\.m2\repository\org\hamcrest\hamcrest-core\1.3\hamcrest-core-1.3.jar,C:\windows\system32\config\systemprofile\.m2\repository\org\springframework\spring-test\5.0.2.RELEASE\spring-test-5.0.2.RELEASE.jar,.] Autowired.class)] INFO] [loading C:\windows\system32\config\systemprofile\.m2\repository\org\springframework\spring-context\5.0.2.RELEASE\spring-context-5.0.2.RELEASE.jar(/org/springframework/context/annotation/ComponentScan.class)] [INFO] [INFO] --- maven-surefire-plugin:2.12.4:test (default-test) @ time-tracker-core --- [INFO] Surefire report directory: C:\Program Files (x86)\Jenkins\workspace\kt-mavenjob\core\target\surefire-reports ------------------------------------------------------- T E S T S ------------------------------------------------------- Running training.taylor.timetracker.core.TrackerCoreConfigTest Feb 01, 2020 8:53:39 PM org.springframework.test.context.support.AbstractTestContextBootstrapper getDefaultTestExecutionListenerClassNames INFO: Loaded default TestExecutionListener class names from location [META-INF/spring.factories]: [org.springframework.test.context.web.ServletTestExecutionListener, org.springframework.test.context.support.DirtiesContextBeforeModesTestExecutionListener, org.springframework.test.context.support.DependencyInjectionTestExecutionListener, org.springframework.test.context.support.DirtiesContextTestExecutionListener, org.springframework.test.context.transaction.TransactionalTestExecutionListener, org.springframework.test.context.jdbc.SqlScriptsTestExecutionListener] Feb 01, 2020 8:53:39 PM org.springframework.test.context.support.AbstractTestContextBootstrapper instantiateListeners INFO: Could not instantiate TestExecutionListener [org.springframework.test.context.web.ServletTestExecutionListener]. Specify custom listener classes or make the default listener classes (and their required dependencies) available. Offending class: [javax/servlet/ServletContext] Feb 01, 2020 8:53:39 PM org.springframework.test.context.support.AbstractTestContextBootstrapper instantiateListeners INFO: Could not instantiate TestExecutionListener [org.springframework.test.context.jdbc.SqlScriptsTestExecutionListener]. Specify custom listener classes or make the default listener classes (and their required dependencies) available. Offending class: [org/springframework/transaction/interceptor/TransactionAttribute] Feb 01, 2020 8:53:39 PM org.springframework.test.context.support.AbstractTestContextBootstrapper instantiateListeners Feb 01, 2020 8:53:39 PM org.springframework.context.support.AbstractApplicationContext prepareRefresh INFO: Refreshing org.springframework.context.support.GenericApplicationContext@9838eb: startup date [Sat Feb 01 20:53:39 IST 2020]; root of context hierarchy Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 2.024 sec Running training.taylor.timetracker.core.TrackerTest Results : Tests run: 3, Failures: 0, Errors: 0, Skipped: 0 [JENKINS] Recording test results [INFO] [INFO] --- maven-jar-plugin:2.4:jar (default-jar) @ time-tracker-core --- [INFO] Building jar: C:\Program Files (x86)\Jenkins\workspace\kt-mavenjob\core\target\time-tracker-core-0.5.0-SNAPSHOT.jar [INFO] [INFO] -----------< training.taylor.time-tracker:time-tracker-web >------------ [INFO] Building Time Tracker (Web) 0.5.0-SNAPSHOT [3/3] [INFO] --------------------------------[ war ]--------------------------------- [INFO] [INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ time-tracker-web --- [INFO] [INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ time-tracker-web --- [INFO] Using 'UTF-8' encoding to copy filtered resources. [INFO] skip non existing resourceDirectory C:\Program Files (x86)\Jenkins\workspace\kt-mavenjob\web\src\main\resources [INFO] [INFO] --- maven-compiler-plugin:3.6.1:compile (default-compile) @ time-tracker-web --- [INFO] No sources to compile [INFO] [INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ time-tracker-web --- [INFO] Using 'UTF-8' encoding to copy filtered resources. [INFO] skip non existing resourceDirectory C:\Program Files (x86)\Jenkins\workspace\kt-mavenjob\web\src\test\resources [INFO] [INFO] --- maven-compiler-plugin:3.6.1:testCompile (default-testCompile) @ time-tracker-web --- [INFO] No sources to compile [INFO] [INFO] --- maven-surefire-plugin:2.12.4:test (default-test) @ time-tracker-web --- [INFO] No tests to run. [JENKINS] Recording test results [INFO] [INFO] --- maven-war-plugin:2.2:war (default-war) @ time-tracker-web --- [INFO] Packaging webapp [INFO] Assembling webapp [time-tracker-web] in [C:\Program Files (x86)\Jenkins\workspace\kt-mavenjob\web\target\time-tracker-web-0.5.0-SNAPSHOT] [INFO] Processing war project [INFO] Copying webapp resources [C:\Program Files (x86)\Jenkins\workspace\kt-mavenjob\web\src\main\webapp] [INFO] Webapp assembled in [148 msecs] [INFO] Building war: C:\Program Files (x86)\Jenkins\workspace\kt-mavenjob\web\target\time-tracker-web-0.5.0-SNAPSHOT.war [INFO] WEB-INF\web.xml already added, skipping [INFO] ------------------------------------------------------------------------ [INFO] Reactor Summary for Time Tracker (Parent) 0.5.0-SNAPSHOT: [INFO] [INFO] Time Tracker (Parent) .............................. SUCCESS [ 1.748 s] [INFO] Time Tracker (Core) ................................ SUCCESS [ 38.646 s] [INFO] Time Tracker (Web) ................................. SUCCESS [ 3.289 s] [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESS [INFO] ------------------------------------------------------------------------ [INFO] Total time: 46.783 s [INFO] Finished at: 2020-02-01T20:53:54+05:30 [INFO] ------------------------------------------------------------------------ Waiting for Jenkins to finish collecting data [JENKINS] Archiving C:\Program Files (x86)\Jenkins\workspace\kt-mavenjob\web\pom.xml to training.taylor.time-tracker/time-tracker-web/0.5.0-SNAPSHOT/time-tracker-web-0.5.0-SNAPSHOT.pom [JENKINS] Archiving C:\Program Files (x86)\Jenkins\workspace\kt-mavenjob\web\target\time-tracker-web-0.5.0-SNAPSHOT.war to training.taylor.time-tracker/time-tracker-web/0.5.0-SNAPSHOT/time-tracker-web-0.5.0-SNAPSHOT.war [JENKINS] Archiving C:\Program Files (x86)\Jenkins\workspace\kt-mavenjob\core\pom.xml to training.taylor.time-tracker/time-tracker-core/0.5.0-SNAPSHOT/time-tracker-core-0.5.0-SNAPSHOT.pom [JENKINS] Archiving C:\Program Files (x86)\Jenkins\workspace\kt-mavenjob\core\target\time-tracker-core-0.5.0-SNAPSHOT.jar to training.taylor.time-tracker/time-tracker-core/0.5.0-SNAPSHOT/time-tracker-core-0.5.0-SNAPSHOT.jar [JENKINS] Archiving C:\Program Files (x86)\Jenkins\workspace\kt-mavenjob\pom.xml to training.taylor.time-tracker/time-tracker-parent/0.5.0-SNAPSHOT/time-tracker-parent-0.5.0-SNAPSHOT.pom channel stopped Finished: SUCCESS |
Thank you for giving your valuable time to read the above information.
Follow us on
Website : www.ktexperts.com
Facebook Page : KTexperts
Linkedin Page : KT EXPERTS
Follow Me
Ramesh’s Linkedin : https://www.linkedin.com/in/ramesh-atchala/