Closed sayanee closed 6 years ago
Hey @sayanee, thanks for reaching out. To help troubleshoot, could you open up a support ticket here, including the following info:
--debug
flag in your CI configuration (after-build --debug
for single builds, format-coverage --debug
and upload-coverage --debug
for parallel builds).Send that over when you get a chance, and we'll be happy to take a closer look. Thanks!
Hey @sayanee, were you able to get this resolved? If not, please write into support with the information listed above, and we'll help get this sorted out. I'll close out this issue for now.
Thanks @davehenton! Yes I was able to solve it. For the benefit of others stumbling on similar issue, here's a sample code:
Makefile
PACKAGES = $(shell find . -name '*.go' -exec dirname {} \; | sort --unique)
test:
echo "mode: set" > c.out
$(foreach pkg,$(PACKAGES),\
echo > covsingle.out && \
go test $(pkg) -coverprofile=covsingle.out -covermode=set && \
tail -n +2 covsingle.out >> c.out || exit;)
rm covsingle.out
Jenkinsfile
...
stages {
stage("Running tests"){
steps {
echo "Running tests"
sh "cc-test-reporter before-build"
sh "make test"
sh "cc-test-reporter after-build --insecure"
}
}
...
I have been trying to setup codeclimate with golang and
Jenkinsfile
, but was unable to find any examples.I have referred to these resources already:
I am already running the test through Jenkins CI with
go test ./... -cover
. Any clue to theJenkinsfile
? Thanks a bunch 🙇♀️