I am trying to load an artifact from a Jenkins project using a dos script package. The reason this is more than trivial is because my artifact is a zip file that includes the Jenkins build number in its name, so I don't know the exact file name.
My current attack plan is to use wget pointing to: / lastSuccessfulBuild / artifact / to do some sort of recursive / mirror loading.
If I do the following:
wget -r -np -l 1 -A zip --auth-no-challenge --http-user=**** --http-password=**** http://*.*.*.*:8080/job/MyProject/lastSuccessfulBuild/artifact/
(* s are the characters I changed to publish to SO)
I never get a zip file. If I omit the -A zip option, I get index.html, so I think authorization works if there is no problem with any session caching?
With -A zip, I get as part of the answer:
Removing ... + 8080 / job / MyProject / lastSuccessfulBuild / artifact / index.html as it should be rejected.
So, I'm not sure, maybe this is deleting this file and therefore should not follow its links? but doing -A zip, html doesn't work either.
I tried several wget options and also curled, but didn't get anywhere.
I don't know if I have the wrong wget options or if there is anything special about Jenkins authentication.
Any help appreciated. Thanks.
curl batch-file jenkins wget artifacts
Erik
source share