automating hudson builds with ant throwing 403

Posted by Christopher Dancy on Stack Overflow See other posts from Stack Overflow or by Christopher Dancy
Published on 2010-03-12T15:02:47Z Indexed on 2010/03/12 15:07 UTC
Read the original article Hit count: 318

Filed under:
|
|

We have a hudson server which deploys builds. We have a few services which we want to be able to remotely tell hudson to deploy a certain build ... these services are using ant. So I'm trying to get it working but keeping getting a 403 response when giving a build number like so...

<ac:post    to="http://hostname:8080/hudson/job/test_release_indexes/build?"
    verbose="true" wantresponse="true">
        <prop name="token" value="indexes"/>
        <prop name="BUILDNUMBER" value="0354"/>
</ac:post> 

this throws the 403. I've also tried passing it props for the username and password like so ...

<ac:post to="http://srulesre2:8080/hudson/job/test_dartmouth_indexes/build?"
    verbose="true" wantresponse="true">
        <prop name="token" value="indexes"/>
        <prop name="BUILDNUMBER" value="0354"/>
        <prop name="username" value="test"/>
        <prop name="password" value="test"/>
</ac:post>

I've tried a hundred different variations on username and password ... like j_username and j_password or user and pass ... but nothing is working ... keep getting the same 403. And the username and password are valid because I can manually log in with admin privileges. Any ideas would be great

© Stack Overflow or respective owner

Related posts about ant

Related posts about hudson