Skip to content
This repository has been archived by the owner on Feb 25, 2021. It is now read-only.

Commit

Permalink
Merge pull request #25 from cyberark/add-coverage-archiving
Browse files Browse the repository at this point in the history
Add coverage archive to Jenkins build
  • Loading branch information
andytinkham authored Aug 3, 2020
2 parents 2f958c8 + 5aa8909 commit cbb10b7
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
7 changes: 4 additions & 3 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,10 @@ pipeline {
steps {
sh './test.sh'
junit 'spec/reports/*.xml'
cobertura coberturaReportFile: 'coverage/coverage.xml'
}
}

// Only publish to RubyGems if branch is 'master'
// AND someone confirms this stage within 5 minutes
stage('Publish to RubyGems?') {
Expand Down Expand Up @@ -77,9 +78,9 @@ pipeline {
sh 'docker run -i --rm -v $PWD:/src -w /src alpine/git clean -fxd'
deleteDir()
}
}
}
}

post {
always {
cleanupAndNotify(currentBuild.currentResult)
Expand Down
1 change: 1 addition & 0 deletions conjur-policy-parser.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ Gem::Specification.new do |spec|
spec.add_development_dependency "rspec-expectations"
spec.add_development_dependency "ci_reporter_rspec"
spec.add_development_dependency "simplecov"
spec.add_development_dependency "simplecov-cobertura"
spec.add_development_dependency "pry"
spec.add_development_dependency "deepsort"
end
5 changes: 4 additions & 1 deletion spec/spec_helper.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# frozen_string_literal: true
require 'simplecov'
require 'simplecov-cobertura'

SimpleCov.formatter = SimpleCov::Formatter::CoberturaFormatter
SimpleCov.start do
add_filter '/spec/'
add_filter '/features/'
Expand All @@ -10,7 +13,7 @@
require 'logger'

if ENV['DEBUG']
Conjur::PolicyParser::YAML::Handler.logger.level = Logger::DEBUG
Conjur::PolicyParser::YAML::Handler.logger.level = Logger::DEBUG
end

require 'sorted_yaml.rb'
Expand Down

0 comments on commit cbb10b7

Please sign in to comment.