Running compiled Jar file in Jenkins

I am trying to run jar executable via jenkins. What I'm trying to achieve here, I have a jar executable file created and located locally on my machine. I want to put it in Git and then run it in jenkins. There are some, how can I do this? I am completely new to Jenkins, and if someone can help, it will save me a lot of time.

+6
source share
1 answer

You can do almost anything you want with Jenkins, since you can run arbitrary scripts / executables.

If you want to put this .jar in git, then Jenkins jobs will fetch it when it fetch the repo. Then you just need to add a script to the shell step construction and put your java my.jar my.class .... command line java my.jar my.class ....

On the other hand, sometimes he frowned to put binaries in git. In particular, it is true that .jar will need to be updated frequently. Therefore, you might want to provide .jar to Jenkins' task using alternative methods. For example, using the maven repository.

+9
source

Source: https://habr.com/ru/post/971947/


All Articles