Score:0

Jenkins maven curl - Can't open target/**.war

cz flag

I'm trying to deploy war file using Tomcat manager remote deploy script but I get the error 'Can't open 'target/**war' file. I'm following a tutorial and it works for the author.

https://community.spiceworks.com/topic/479900-how-do-i-use-wildcards-for-curl-upload article says

The curl command line utility is mainly intended for one-shot file transfers, it doesn't support wildcards per se.

So how can I specify the war file for each build?

Conditional step :

curl -u ${tcuser}:${tcpass} -T target/**.war "http://localhost:8080/manager/text/deploy?path=/devops&update=true"

Error:

C:\WINDOWS\system32\config\systemprofile\AppData\Local\Jenkins\.[*******]\workspace\devops>curl -u ${tcuser}:${tcpass} -T target/**.war "http://localhost:8080/manager/text/deploy?path=/devops&update=true" 
curl: Can't open 'target/**.war'!
curl: try 'curl --help' for more information
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.