alefragnani / vscode-jenkins-status

Jenkins Status Extension for Visual Studio Code
MIT License
27 stars 20 forks source link

Poll multiple jobs #11

Closed pankajpatel closed 4 years ago

pankajpatel commented 7 years ago

Can it poll multiple Jobs as a project may have multiple jobs?

Similar to polling, this extension can be used to trigger the builds manually. https://wiki.jenkins.io/display/jenkins/remote+access+api

alefragnani commented 7 years ago

Hi @pankajpatel ,

I think it should be splited in two diferente issues, so each one should be tracked separatedly šŸ˜„

The first one (multiple jops), would require a bit more work, but some definitions are required:

The second (build command) is easier to do, based on the current model. I created #12 to track this.

What do you think about it?

pankajpatel commented 7 years ago

I can provide the suggestions in form of design and then explain about the flow. Will it be ok?

alefragnani commented 7 years ago

That's a good start šŸ‘

pankajpatel commented 7 years ago

The .jenkins file can look like following:

{
  "url": "http://127.0.0.1:8080/job/myproject",
  "username": "jenkins_user",
  "password": "jenkins_password_or_token",
  "jobs": {
    "jobName1": { //jobName1 can be shorter
      "name": "job-name-one" //can be same as jobName1
    }, 
    "jobName2": {
      "name": "job-name-one",
      "url": "http://127.0.0.1:8080/job/myproject", //->|
      "username": "jenkins_user",                   //->|---> custom config for the job
      "password": "jenkins_password_or_token"       //->|
    }
  }
}

jobstatus-running

jobstatus-completed

jobstatus-multiple

alefragnani commented 7 years ago

Hi @pankajpatel ,

First of all, thanks for your suggestion šŸ‘

I think the .Jenkins file would become simpler if it doesn't mix single and the multi-job configs. Maybe something like this:

{
    "jobs": [
        {
            "name": "First Job",
            "url": "http://127.0.0.1:8080/job/myproject",
        },
        {
            "name": "Second Job",
            "url": "http://127.0.0.1:8080/job/myOtherProject",
            "username": "jenkins_user",
            "password": "jenkins_password_or_token"
        }   
    ]   
}

About the StatusBar, I don't know if I understand the last image. Are you suggesting to concatenate all jobs in the StatusBar? If yes, I think it would have an alternate/compact idea, to avoid a StatusBar full of jobs (if there is a bunch of jobs, or if the jobName isn't short enough.

What do you think?

pankajpatel commented 7 years ago

Not all the jobs but the executing ones or the ones which have finished execution very shortly. And show ellipsis if the status text exceeds any specified length.

alefragnani commented 7 years ago

I guess that would be better if I just add to the StatusBar the jobs that didn't have success. Doing so, it's easy to see the jobs that needs attention.

eramitmittal commented 6 years ago

Have a look at https://github.com/eramitmittal/vscode-jenkins-status

alefragnani commented 4 years ago

Iā€™m returning to the project, and the first step will be to merge the PR #17 from @eramitmittal . It should be released in the weekend.

Stay tuned