|
|
@ -5,10 +5,12 @@ You will need to configure Maven as a global build tool. |
|
|
|
|
|
|
|
|
In the Jenkins web interface, go to: |
|
|
In the Jenkins web interface, go to: |
|
|
|
|
|
|
|
|
`Manage Jenkins` -> `Global Tool Configuration` -> `Maven installations` -> `Add Maven`. |
|
|
|
|
|
|
|
|
`Manage Jenkins` -> `Tools` -> `Maven installations` -> `Add Maven`. |
|
|
|
|
|
|
|
|
Give your Maven installation a name and check the option to `Install automatically`. |
|
|
Give your Maven installation a name and check the option to `Install automatically`. |
|
|
|
|
|
|
|
|
|
|
|
Select the `Save` button. |
|
|
|
|
|
|
|
|
## Setting up the Jenkins Job |
|
|
## Setting up the Jenkins Job |
|
|
Create a freestyle job and configure it as follows: |
|
|
Create a freestyle job and configure it as follows: |
|
|
|
|
|
|
|
|
@ -22,7 +24,9 @@ https://github.com/LinkedInLearning/learning-jenkins-3003221 |
|
|
5. For the goal, enter `package`. |
|
|
5. For the goal, enter `package`. |
|
|
|
|
|
|
|
|
## WINDOWS SYSTEMS |
|
|
## WINDOWS SYSTEMS |
|
|
Select the `Execute Windows batch command` build step |
|
|
|
|
|
|
|
|
Select `Add build step` -> `Execute Windows batch command`. |
|
|
|
|
|
|
|
|
|
|
|
Enter: |
|
|
``` |
|
|
``` |
|
|
java -cp target/hello-1.0-SNAPSHOT.jar com.learningjenkins.App |
|
|
java -cp target/hello-1.0-SNAPSHOT.jar com.learningjenkins.App |
|
|
``` |
|
|
``` |
|
|
@ -31,7 +35,9 @@ Save the job and start the build. |
|
|
[Follow this link for more details on Windows](WINDOWS.md) |
|
|
[Follow this link for more details on Windows](WINDOWS.md) |
|
|
|
|
|
|
|
|
## MacOS, Linux, and Docker |
|
|
## MacOS, Linux, and Docker |
|
|
Select the `Execute shell` build step. |
|
|
|
|
|
|
|
|
Select `Add build step` -> `Execute shell`. |
|
|
|
|
|
|
|
|
|
|
|
Enter: |
|
|
``` |
|
|
``` |
|
|
java -cp target/hello-1.0-SNAPSHOT.jar com.learningjenkins.App |
|
|
java -cp target/hello-1.0-SNAPSHOT.jar com.learningjenkins.App |
|
|
``` |
|
|
``` |
|
|
@ -44,4 +50,3 @@ Save the job and start the build. |
|
|
ERROR: Couldn't find any revision to build. Verify the repository and branch configuration for this job. |
|
|
ERROR: Couldn't find any revision to build. Verify the repository and branch configuration for this job. |
|
|
``` |
|
|
``` |
|
|
This error means you have probably entered the wrong branch under Source Code Management. You need to enter `*/03_01` for the branch. |
|
|
This error means you have probably entered the wrong branch under Source Code Management. You need to enter `*/03_01` for the branch. |
|
|
|
|
|
|