Skip to content

pr0d1r2/jenkins_failed_lines

Repository files navigation

jenkins_failed_lines

Get failing lines from jenkins reports. Greately improve speed of re-creating issues locally.

Setup

export JENKINS_LOGIN="xxx"
export JENKINS_TOKEN="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"

Usage

rspec

bundle exec ruby jenkins_failed_lines.rb https://jenkins.example.com/job/pr-specs/8472/

Or:

bundle exec ruby jenkins_failed_lines.rb https://jenkins.example.com/job/pr-specs/8472/testReport/

Which results in:

spec/model/user_spec:11
spec/model/profile_spec:69

cucumber

bundle exec ruby jenkins_failed_lines.rb https://jenkins.example.com/job/pr-features/8472/

Or:

bundle exec ruby jenkins_failed_lines.rb https://jenkins.example.com/job/pr-features/8472/testReport/

Which results in:

features/profile.feature:21
features/profile.feature:44

Advanced usage

Run:

bundle exec rspec `bundle exec ruby jenkins_failed_lines.rb https://jenkins.example.com/job/pr-specs/8472/ https://jenkins.example.com/job/pr-specs/8888/ https://jenkins.example.com/job/pr-specs/10999/`

And go make a coffee.

Troubleshooting

missing the Overall/Read permission

In case you encounter problem:

pr0d1r2 is missing the Overall/Read permission

Solution in some cases is to use GitHub access token instead of jenkins one as some organisations build authentication on top of GitHub. Please visit https://github.com/settings/tokens to get your token.

About

Get failing lines from jenkins reports.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages