alefragnani / vscode-jenkins-status

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

Automatically extract jenkins server from README.md #36

Open leeopop opened 5 years ago

leeopop commented 5 years ago

I thinks writing server address in README.md as a build status badge and .jenkins is duplicated. How about making a trigger that extract jenkins server address from the build badge url?

alefragnani commented 5 years ago

Hi @leeopop ,

I'm not sure I understand. Do you mean, instead of defining the url in .jenkins, the extension should load README.md file (located in the repository's root folder) and detect the url parsing the build badge?

pzelnip commented 5 years ago

I wasn't the creator of the issue, but that's how I read the intent -- look for a README.md at the top level root, scan that file for a Jenkins badge & extract the URL, which would take precedence over the .jenkins file (which you can't commit to VC if it has credentials).

leeopop commented 5 years ago

pzelnip provided a good translation of my poor writing :)

Yes, it would be nice to look for README.md file and scan the build badge url pattern and then extract the server address.

However, I'm not saying that README.md should replace .jenkins, but use README.md only when .jenkins does not exist.

Moreover, we may support other various url patterns suggested by Jenkins's build badge plugin. https://jenkins.leeopop.kr/job/ANLAB-KAIST/job/jenkins_build_test/job/master/badge/

alefragnani commented 5 years ago

I think that instead of automatically use README.md file, when .jenkins is not available, it should have a Command to import the URL and create the .jenkins file. So, the extension remains looking just for .jenkins file in root folder to activate.

leeopop commented 5 years ago

Yeap, that will also work nice with ignoring .jenkins by .gitignore and let the plugin instantly create .jenkins for users.