silas / node-jenkins

Jenkins client
https://www.npmjs.com/package/jenkins
MIT License
356 stars 85 forks source link

Remove name option when listing jobs #85

Closed ccouzens closed 5 years ago

ccouzens commented 5 years ago

The acceptance tests were failing. In attempting to make them pass, I concluded they couldn't ever work.

As it was, the acceptance tests were 404ing, on URLs like: /job/test/api/json. This was because there is no job called test. If it was changed to search for this.jobName, then it would make a successful request. But the response type would be different - it wouldn't have the jobs array field that the following code looks for.

I can't find anyway to filter the /api/json route by jobname. As such, I think it's better to just get rid of the option, as it can't be supported.

ccouzens commented 5 years ago

It looks like this was added a couple months ago 9864a25faebbd924e61117877c57257958f240dc

And says something about folders. I'll see if I can get the acceptance tests to pass using folders.

silas commented 5 years ago

@ccouzens It's totally possible the acceptance tests aren't passing on recent versions of Jenkins. I probably should have locked the Docker image down to an exact version.

I'll need to speed some time getting those passing again.

If you're just trying to create a PR or something I wouldn't worry about getting the acceptance tests to pass.

ccouzens commented 5 years ago

Hi @silas , thanks for getting back to me.

I'll need to speed some time getting those passing again.

I'm happy to do it. The only 3 failures are listing jobs and terminating a job.

If you're just trying to create a PR or something I wouldn't worry about getting the acceptance tests to pass.

I'd like to be able to trigger a job and wait until it's completed rather than queued. But I'd like to take the scenic route- getting the tests passing and understanding what's already there.

Kind regards, Chris