Skip to content
This repository was archived by the owner on Sep 11, 2024. It is now read-only.

Commit 83a0638

Browse files
committedOct 27, 2016
add a task to build/upload coverity tarball
1 parent 566038a commit 83a0638

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed
 

‎.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -24,3 +24,5 @@ Gemfile.local
2424
*.swp
2525
coverage/*
2626
.vagrant/
27+
cov-int/
28+
cov-fluentd.tar.gz

‎Rakefile

+18
Original file line numberDiff line numberDiff line change
@@ -53,4 +53,22 @@ task :coverage do |t|
5353
Rake::Task["test"].invoke
5454
end
5555

56+
desc 'Build Coverity tarball & upload it'
57+
task :coverity do
58+
# https://scan.coverity.com/projects/fluentd?tab=overview
59+
# See "View Defects" after sign-in.
60+
#
61+
# Setup steps:
62+
# 1. get coverity build tool and set PATH to bin/: https://scan.coverity.com/download
63+
# 2. set environment variables:
64+
# * $COVERITY_USER (your email address)
65+
# * $COVERITY_TOKEN (token for Fluentd project: https://scan.coverity.com/projects/fluentd?tab=project_settings)
66+
sh "cov-build --dir cov-int --no-command --fs-capture-search ./"
67+
sh "tar czf cov-fluentd.tar.gz cov-int"
68+
user = ENV['COVERITY_USER']
69+
token = ENV['COVERITY_TOKEN']
70+
sh "curl --form token=#{token} --form email=#{user} --form file=@cov-fluentd.tar.gz --form version=\"Master\" --form description=\"GIT Master\" https://scan.coverity.com/builds?project=Fluentd"
71+
FileUtils.rm_rf(['./cov-int', 'cov-fluentd.tar.gz'])
72+
end
73+
5674
task default: [:test, :build]

0 commit comments

Comments
 (0)
This repository has been archived.