glenlivet1986
glenlivet1986

Reputation: 260

How to post a file via HTTP PUT directly after fetching it via HTTP GET?

I'm using Jenkins to do auto-deployment to Tomcat server.

I know how to do remote deployment via Tomcat manager. enter link description here

I know how to fetch the war from Nexus by using curl.

I'm wondering if it is possible to use curl to achieve both actions in one command, maybe using pipes?

Upvotes: 2

Views: 52

Answers (1)

Michael-O
Michael-O

Reputation: 18405

Yes, you can actually. curl has a feature called --next which can do both actions:

$ curl ...nexus-options... https://url-to-nexus --next ...tomcat-options... https://url-to-tomcat

See documentation for --next.

Upvotes: 2

Related Questions