Anurag Ghosh
Anurag Ghosh

Reputation: 65

deploy jar file using Jenkins

How to deploy a jar file using Jenkins deployment jobs? Is there any specific plugin available for jar deployments.

For War or EAR, we can go to Jenkins_deployment Jobs >> Post-build Actions >> Deploy war/ear to a container - and provide the below info.

  1. WAR/EAR files,
  2. Context path,
  3. Containers

Can anyone please help in this?

Upvotes: 0

Views: 13298

Answers (3)

Puttaswamy C M
Puttaswamy C M

Reputation: 1

If you want to send artifacts from windows build server to linux machine you can use send artifact over ssh from build section

If you want to send artifact from windows build server to windows application server you can use robocopy

Upvotes: 0

Upen
Upen

Reputation: 1438

Please have a look at the SCP plugin

This plugin uploads build artifacts to repository sites using SCP (SSH) protocol.

Upvotes: -1

vikingsteve
vikingsteve

Reputation: 40408

Most containers have a directory where you can "place" the war, in order to deploy it.

Therefore in Jenkins you can set up Send build artifacts over SSH

Name: my_server123 (You must have a configured server)

Transfers: Transfer set:

source files: `path/to/target/*.war
remove prefix: `path/to/target

On configuring the server, you should go in Configure Jenkins -> Configure system -> SSH Servers

Add the server you need to deploy to, username (+password) and Remote directory: /opt/app/tomcat/webapps (or whatever)

Upvotes: 0

Related Questions