Get failing lines from jenkins reports. Greately improve speed of re-creating issues locally.
export JENKINS_LOGIN="xxx"
export JENKINS_TOKEN="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
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
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
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.
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.