Skip to content

Latest commit

 

History

History
31 lines (22 loc) · 1.35 KB

README.md

File metadata and controls

31 lines (22 loc) · 1.35 KB

Redirect for view unprotected Jenkins Build Status for branch names with slashes

Use case

You want to automatically show badges in gitlab mr description templates with using environment %{source_branch}, but your braches has slashes. You cant's pass branches with slashes to jenkins, they must be escaped. So this redirect will do it for you.

Site

https://jenkins-badge-redirect.geminixandroid.com

Redirect path

https://jenkins-badge-redirect.geminixandroid.com/icon?

Query params

  • host - jenkins.domain.com
  • job - pipeline-tests
  • branch - bugfix/task-sample (slash here will be escaped for jenkins plugin)
  • all other query params also will be passed

Example

https://jenkins-badge-redirect.geminixandroid.com/icon?host=jenkins.domain.com&job=pipeline-tests&branch=bugfix/task-sample&subject=Some+tests

will be redirected to

https://jenkins.domain.com/buildStatus/icon?job=pipeline-tests%2Fbugfix%252Ftask-sample&subject=Some+tests

Run

npm install
npm start