tabeyti / jenkins-jack

Jack into your Jenkins to execute Pipeline scripts, provide Pipeline step autocompletions, pull Shared Library step documenation, run console groovy scripts across multiple nodes, and more! Honestly, not that much more.
Other
100 stars 32 forks source link

Add-on connects properly but uses incorrect job-URLs #49

Open con-vissenberg opened 3 years ago

con-vissenberg commented 3 years ago

I've setup the connection with this URL: https://jenkins1.company.com/jenkins The left panel shows all nodes, jobs etc. correctly, But when I click on a link, the web browser pops up with an incorrect URL like this: https://jenkins1.company.com/jenkins/jenkins/job/folder/job/my-build Note the extra jenkins/ part. Probably for the same reason, none of the other functions (like download log) works. (Using release 1.1.2)

mbravo-cbw commented 3 years ago

Im running into this issue as well, also using release 1.1.2. It looks like the URL.pathname is being passed as the parameter. Perhaps an if/else check could fix this issue?

for (let build of builds) {
    let urlPath = new Url(build.url).pathname;
    let folderPath = urlPath.split("/", 2)
    if (build.url.includes(folderPath[0])) {
        ext.connectionsManager.host.openBrowserAt(folderPath[1]);
    } else {
        ext.connectionsManager.host.openBrowserAt(new Url(build.url).pathname);
    }
}
tabeyti commented 3 years ago

Hey @con-vissenberg @mbravo-cbw!

This should be fixed in 1.1.3.

con-vissenberg commented 3 years ago

Great. Tried to test, but I cannot get it to login to the server, All I get is "Cannot connect...". I'm using a username and a token. Is that supported? BTW: the URL is something like this: https://jenkins1.company.com/jenkins It's https and I've tried with and without TLS check. (Also reverted back to 1.12, but same result). The weird thing is that it does show a correct list of nodes, even though it cannot see that without proper credentials.

O5ten commented 2 years ago

Having the same problem in 1.2.1 as @con-vissenberg, but with a username:password. Unable to download logs, but other features seem to work such as download replay script. 🤔