vscode-jenkins-status icon indicating copy to clipboard operation
vscode-jenkins-status copied to clipboard

Automatically extract jenkins server from README.md

Open leeopop opened this issue 5 years ago • 5 comments

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?

leeopop avatar Apr 19 '19 08:04 leeopop

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?

alefragnani avatar May 08 '19 04:05 alefragnani

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).

pzelnip avatar May 08 '19 18:05 pzelnip

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/

leeopop avatar May 09 '19 08:05 leeopop

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.

alefragnani avatar May 09 '19 22:05 alefragnani

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

leeopop avatar May 10 '19 00:05 leeopop