From 42356bc74fa2396e8d969ff74635c3c74ce8c265 Mon Sep 17 00:00:00 2001 From: Carlos Tadeu Panato Junior Date: Wed, 13 Feb 2019 20:32:12 +0100 Subject: [PATCH] add codecov back (#10215) * add codecov back * add token * remove option * update codecov * upddate codecov * add back threshold * add some configs * update per feedback * add error fallback * fix error * testing --- build/Jenkinsfile.pr | 9 ++++++++- codecov.yml | 9 ++++++++- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/build/Jenkinsfile.pr b/build/Jenkinsfile.pr index f91e75fa90..8b4d5d1846 100644 --- a/build/Jenkinsfile.pr +++ b/build/Jenkinsfile.pr @@ -124,15 +124,22 @@ pipeline { withDockerContainer(args: "-u root --privileged --net ${COMPOSE_PROJECT_NAME}_mm-test -v ${WORKSPACE}/src:/go/src/", image: 'mattermost/mattermost-build-server:dec-7-2018') { ansiColor('xterm') { - sh """ + sh """ cd /go/src/github.com/mattermost/mattermost-server mkdir -p client/plugins cat config/config.json make test-server BUILD_NUMBER='${BRANCH_NAME}-${BUILD_NUMBER}' TESTFLAGS= TESTFLAGSEE= + """ } + withCredentials([string(credentialsId: 'CODECOV_TOKEN', variable: 'CODECOV')]) { + sh ''' + cd /go/src/github.com/mattermost/mattermost-server + curl -s https://codecov.io/bash | bash -s - -t $CODECOV || echo 'Codecov failed to upload' + ''' + } } } } diff --git a/codecov.yml b/codecov.yml index 49b7d2f63e..33dbba2658 100644 --- a/codecov.yml +++ b/codecov.yml @@ -1,9 +1,16 @@ +codecov: + ci: + - build.mattermost.com + notify: + require_ci_to_pass: yes + coverage: status: project: default: - threshold: 1% + threshold: 1 patch: off + changes: off ignore: - store/storetest comment: false