cliffano / nestor

Jenkins CLI and node.js client
http://blog.cliffano.com/tag/nestor/
MIT License
182 stars 27 forks source link

Support for folders? #42

Closed swsnr closed 4 years ago

swsnr commented 8 years ago

We use folders to organize projects on our CI server. Does nester support folders? I tried to use the full project name given by Jenkins (e.g. "foo/bar-build"), but nestor complained that the job doesn't exist.

Also nestor dashboard shows the folder, but not the jobs contained in that folder.

swsnr commented 8 years ago

Ok, by trial and error my co-worker found out that we could use foo/job/bar-build, similar to the URL scheme of the Jenkins website? Is that officially supported? Should it be documented?

cliffano commented 7 years ago

@lunaryorn It wasn't intentionally, but I'm glad it works as your co-worker found. Do you mind sending in a PR for README update?

Also, could you please upload the screenshot for nestor dashboard output?

swsnr commented 7 years ago

@cliffano If it wasn't intentional, does it become intentional if I make an update in README? I'd not like if the support for this was accidentally removed :blush: And wouldn't it be better to add "proper" support for folders with the same syntax that Jenkins uses in its UI, i.e. without the /job part in the middle?

I can't show you a screenshot of our nestor dashboard—it's an internal build server of my company—but I'm not sure what you expect to see there anyway.

There's nothing to see after all :wink:, The sub-jobs of the folder are missing. As an example we see unknown - foo, where foo is the folder, but the jobs in that folder (i.e. bar-build, to take the example from above) are missing from the dashboard.

It appears that nestor doesn't support folders generally, so I presume you can easily reproduce the issue in a clean Jenkins instance, by creating a folder and a job within the folder.

cliffano commented 7 years ago

@lunaryorn My bad, I misred the /job part in the middle, I thought it seamlessly fits. Are you interested in working on adding folder support?

swsnr commented 7 years ago

@cliffano I'm sorry but must admit that I do not particularly like Javascript, and given that we found a workaround that works for us the issue just isn't big enough to overcome that.

I'm afraid that I'd rather not like to work on this issue.

That's not to say that I expect you to work on this one. I understand that it's a very minor issue, and probably just a corner case (I don't know whether many people even use Jenkins folders), so I can absolutely understand if you don't want to spend time on it, and it's totally fine with me.

cliffano commented 7 years ago

@lunaryorn Not at all. I usually try to offer OP first prior to marking an issue as open to pick up by anyone. Having said that, I'm going to label this issue as feature-request . If anyone is interested to work on it, please leave a comment here.

I'll also add this to my todo list, will work on it when I get some free time and if no one else is picking it up. Thanks again @lunaryorn for reporting this missing feature. Much appreciated.

swsnr commented 7 years ago

@cliffano Thank you for understanding :blush: and thank you so much for this package; it's really helpful, so much better to view the console log in the local terminal than in the Jenkins UI 😄

thisgeek commented 6 years ago

At least in my case, the suggested workaround does not work.

If I run:

$ JENKINS_URL=http://user:pass@jenkins.server nestor console foo/job/bar/job/fuzz

for a job that I can see running at http://jenkins.server/job/foo/job/bar/job/fuzz/, then I'm getting Not found.

I also tried these variants:

Same result.

Also, dashboard will only show the root "folders", as @lunaryorn reported.

gpenverne commented 5 years ago

You can do it using :

$ JENKINS_URL=http://user:pass@jenkins.server/job/foo nestor console bar
$ JENKINS_URL=http://user:pass@jenkins.server/job/foo/job/bar nestor console fuzz