Can't get zipped artifacts using wget

Hello,

I'm back. Have moved to a different company that uses TeamCity.

Question: I cannot get all artifacts for a build via wget. I can only get single build artifacts.

This works:
wget http://192.168.0.1:8111/guestAuth/repository/download/bt4/121:id/apps/my-app.war

This does not:
wget http://192.168.0.1:8111/guestAuth/downloadArtifacts.html?buildTypeId=121&buildId=lastSuccessful

What am I doing wrong?

Thanks,
-Dave

0
4 comments

Hello Dave,

  Didn't you forget bt prefix for buildTypeId in the second case? And I suppose you meant not buildTypeId=121 but buildTypeId=bt4 ?

  Regards,
  KIR

0
Avatar
Permanently deleted user

Hi Kir,

Right you are about mixing up the buildId with the buildTypeId.

However, even when I run it this way, I get an error 404:
wget http://192.168.0.1:8111/guestAuth/downloadArtifacts.html?buildTypeId=bt4&buildId=lastSuccessful

I also tried:
wget http://192.168.0.1:8111/guestAuth/downloadArtifacts.html?buildTypeId=bt4&buildId=lastSuccessful -O build.zip

Should this work?

Thanks,
-Dave

0

Hi Dave,

  First, please make sure the URL works from browser. For instance, you'll get 404 error if configuration has no successful builds at all.

  From browser it should definitely work, if not, this is a bug.

  When it works from browser, try wget - it should work as well.

  Regards,
  KIR

0
Avatar
Permanently deleted user

Hi Kir,

It was just a matter of wrapping the URL in quotes.

This worked:
wget "http://192.168.0.1:8111/guestAuth/downloadArtifacts.html?buildTypeId=bt4&buildId=lastSuccessful" -O build.zip

Sorry for my confusion. Thanks for your attention.

-Dave

0

Please sign in to leave a comment.