jx console as of today seems to open e.g. http://jenkins.jx.192.168.99.100.nip.io/ which opens the dashboard of the traditional Jenkins UI.
As being a total Jenkins newb myself(not actually as I do have been using it in my paid jobs for years but I personally had not tended to tweak admin settings thru UI not to break things...) and also a company-internal ambassador of jx, I'd like everyone including me in my organization to get used to Jenkins through a friendly UI like so-called "modern" CI services like Travis, CircleCI, and so on.
I'm really hesitant to say things like this but honestly - can we just default it to http://jenkins.jx.192.168.99.100.nip.io/blue/pipelines/blue/pipelines/ so that it opens up BlueOcean? 馃槂
Regardless, thank you very much for starting a great project!
I had been struggling long about how to get people adapt to Jenkins due to my inability to tell people how to use it correctly(in my own definition - like "don't modify settings at any level via UI whenever possible", "code everything from pipelines to Jenkins cluster settings", "use container images for build reproducibility everywhere").
And I have ended up combining two or more CI systems in multiple occasions - like Jenkins for veterans and others for new-comers.
It has been a frustration to me though - even though I LOVE all CI systems I've personally adopted for their distinct sweet-spots, for longer-term productivity throughout the whole organization, I still believed that converging to a single versatile CI is important.
jx seems to be the way to go towards my goal. Please keep up the great work, and please let me know if I can help you in any way to accelerate this evolution! Thx.
@mumoshu great idea thanks!
I could give this a try. Is the GetServiceUrl that should be updated?
@gtseres ooh that'd be awesome yeah, thanks!
I guess we should tweak this function to take an optional extra path within the service:
https://github.com/jenkins-x/jx/blob/master/pkg/jx/cmd/console.go#L71
then after the URL is found for the service (which typically has no path associated with it) then we should append the path if there is one. For most services there won't be - but for Jenkins we can then use nicer default paths etc.
I guess we could also let folks add a CLI argument to switch from the nice shiny BlueOcean to classic too via extra arguments here: https://github.com/jenkins-x/jx/blob/master/pkg/jx/cmd/console.go#L19
e.g. so folks could do
$ jx console
=> opens jenkins in blue ocean
$ jx console --classic
=> opens jenkins in classic mode (i.e. no path)
We could even get more clever and try guess the current project's organisation and try view that folder first? :)
@gtseres give me a shout if you need a hand navigating around this code or need any hints. There's a fair few helper functions around that might help.
e.g. this function is handy for joining urls and paths:
https://github.com/jenkins-x/jx/blob/master/pkg/util/urls.go#L9
// lets add a path
path := "/blue/pipelines/blue/pipelines/"
if o.ClassicMode {
path = ""
}
// lets make sure there's the right number of / between the paths...
u = util.UrlJoin(u, path)
i can help as well if needed
Most helpful comment
@gtseres ooh that'd be awesome yeah, thanks!
I guess we should tweak this function to take an optional extra path within the service:
https://github.com/jenkins-x/jx/blob/master/pkg/jx/cmd/console.go#L71
then after the URL is found for the service (which typically has no path associated with it) then we should append the path if there is one. For most services there won't be - but for Jenkins we can then use nicer default paths etc.
I guess we could also let folks add a CLI argument to switch from the nice shiny BlueOcean to classic too via extra arguments here: https://github.com/jenkins-x/jx/blob/master/pkg/jx/cmd/console.go#L19
e.g. so folks could do
We could even get more clever and try guess the current project's organisation and try view that folder first? :)