Skip to content

Please add more documentation details / examples #31

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
mr2001 opened this issue Mar 11, 2020 · 1 comment
Open

Please add more documentation details / examples #31

mr2001 opened this issue Mar 11, 2020 · 1 comment

Comments

@mr2001
Copy link

mr2001 commented Mar 11, 2020

Hello,

I am trying to download a file from Jenkins. The authentication part, using the API token works correctly. However, I constantly get "error 404 not found" when trying to download a file. Do I have to specify the full path to the file? If yes, then what is the correct format? Is this a web address?
Is the job name also an URL?

This is the code that fails:
` Using stream = client.Artifacts.[Get]("Req_Test", 156, "AllPlot.xml") '<-- ERROR HERE

  Using reader = New StreamReader(stream)
    Dim rawresp As String
    rawresp = reader.ReadToEnd()
  End Using
End Using`

Error is:
JenkinsNET.Exceptions.JenkinsArtifactGetException: 'Failed to retrieve artifact 'AllPlot.xml'!'
WebException: The remote server returned an error: (404) Not Found.

Can you please advise? Would be useful to include some example in the Wiki.

Thank you for your help,
Regards,
M. Rusu

@mr2001
Copy link
Author

mr2001 commented Mar 11, 2020

I got it working by specifying both the path to the job and the path to the file, something like:

` Using stream = client.Artifacts.[Get]("QC_Dashboard/job/MLS_Req_Test", 156, "hw_traceability/artifacts/hw_traceability.json")

  Using reader = New StreamReader(stream)
    Dim rawresp As String
    rawresp = reader.ReadToEnd()
  End Using
End Using `

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant