I'm learning jenkins and I've been having hard time with jenkins deploying to tomcat using parameters, especially jenkins running on windows machine. The issue is pretty much the same as the one asked before on stackoverflow, but I don't see the answer as a match as it's so broad. The issue was explained here
I have tomcat users permissions set as bellow
<role rolename="tomcat"/>
<role rolename="manager-gui"/>
<role rolename="manager-script"/>
<user username="tomcat" password="tomcat" roles="tomcat"/>
<user username="manager" password="tomcat" roles="tomcat,manager-gui"/>
<user username="jenkins" password="jenkins" roles="manager-script"/>
and I'm trying deploy using the following curl command on windows 10 with curl
curl -u %tcuser%:%tcpass% -F filedata=target/**.war "http://localhost:8080/manager/text/deploy?path=/devops&update=true"
I'm getting the following error in jenkins
C:\WINDOWS\system32\config\systemprofile\AppData\Local\Jenkins.[*******]\workspace\devops01>curl -u [*******]:[*******] -F filedata=target/**.war "http://localhost:8080/manager/text/deploy?path=/devops&update=true"
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
100 908 100 752 100 156 752 156 0:00:01 --:--:-- 0:00:01 7264
<!doctype html><html lang="en"><head><title>HTTP Status 405 – Method Not Allowed</title><style type="text/css">body {font-family:Tahoma,Arial,sans-serif;} h1, h2, h3, b {color:white;background-color:#525D76;} h1 {font-size:22px;} h2 {font-size:16px;} h3 {font-size:14px;} p {font-size:12px;} a {color:black;} .line {height:1px;background-color:#525D76;border:none;}</style></head><body><h1>HTTP Status 405 – Method Not Allowed</h1><hr class="line" /><p><b>Type</b> Status Report</p><p><b>Message</b> HTTP method POST is not supported by this URL</p><p><b>Description</b> The method received in the request-line is known by the origin server but not supported by the target resource.</p><hr class="line" /><h3>Apache Tomcat/8.5.54</h3></body></html>
C:\WINDOWS\system32\config\systemprofile\AppData\Local\Jenkins.[*******]\workspace\devops01>exit 0
Can someone please help me ?