Skip to content
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

Add support for multibranch pipelines #16

Open
pzelnip opened this issue Oct 6, 2017 · 6 comments · May be fixed by #55
Open

Add support for multibranch pipelines #16

pzelnip opened this issue Oct 6, 2017 · 6 comments · May be fixed by #55
Labels
enhancement good first issue (PR available) PR available for that issue good first issue Good for newcomers

Comments

@pzelnip
Copy link
Contributor

pzelnip commented Oct 6, 2017

The multibranch pipelines plugin (https://wiki.jenkins.io/display/JENKINS/Pipeline+Multibranch+Plugin) for Jenkins allows one to effectively have a separate build job for a number of branches within a repository.

It'd be really cool if the Jenkins Status VSCode addon could support this. Currently if you specify the main url for a multibranch job (ie http://my.jenkinsserver.com/job/MainProject), it fails to retrieve the status of the job. If you specify a specific branch's job (http://my.jenkinsserver.com/job/MainProject/job/somebranch), you get the status of the most recent build on that branch. This works for monitoring a single "mainline" branch, but if you want to see the status of the most recent build of the branch you're working (which may very well not be master), then you have to manually edit the .jenkins config file to point to the Jenkins job for your branch which is cumbersome.

What I'm envisioning is having the base url in the .jenkins file (ie http://my.jenkinsserver.com/job/MainProject), and then the VS Code plugin queries Jenkins for the most recent build of the current branch you have checked out.

@pmartindev
Copy link

Love this feature! We use multibranch pipelines heavily, and this would be an excellent feature to have.

@LinuxSuRen
Copy link
Contributor

If there's no one prepared to do this, I'll take over it.

@alefragnani
Copy link
Owner

Hi @LinuxSuRen ,

Feel free to send a PR 👍

I would ask you to use this issue to describe how you intend to support the feature, so others (which are subscribed ) could participate in the discussion.

Thanks for your help

@pzelnip
Copy link
Contributor Author

pzelnip commented May 4, 2019

Doesn't help with the status badge, but I use the following tasks to allow me to quickly open up Jenkins in my browser:

        {
            "label": "Open Up Jenkins",
            "type": "shell",
            "command": "open https://my.jenkins.url.com/job/MyTopLevelFolder/job/MyProject/",
            "presentation": {
                "reveal": "silent"
           }
        },
        {
            "label": "Open Up Branch in Jenkins",
            "type": "shell",
            "command": "open https://my.jenkins.url.com/job/MyTopLevelFolder/job/MyProject/job/`git rev-parse --abbrev-ref HEAD`",
            "presentation": {
                "reveal": "silent"
           }
        },

This is kludgy, but works reasonably well for my workflow where we have a top level folder (MyTopLevelFolder in the example), and within that folder have a number of projects (MyProject in the example), each of which are multibranch pipeline jobs.

This allows me to open up the command pallette, type "run Task", and then pick "Open Up Branch In Jenkins" and the current branch on my machine is opened up in Jenkins (assuming it's been built, if not then I'll get a 404).

@presdec
Copy link

presdec commented May 30, 2023

Any chance of this getting resolved?

@LinuxSuRen
Copy link
Contributor

hi @alefragnani ,sorry for missing this message. I didn't have too much time in this area. Please go ahead if anyone is interested in it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement good first issue (PR available) PR available for that issue good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants