File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11FROM quay.io/deis/go-dev:0.17.0
22# This Dockerfile is used to bundle the source and all dependencies into an image for testing.
33
4+ ADD https://codecov.io/bash /usr/local/bin/codecov
5+ RUN chmod +x /usr/local/bin/codecov
6+
47COPY glide.yaml /go/src/github.com/deis/controller-sdk-go/
58COPY glide.lock /go/src/github.com/deis/controller-sdk-go/
69
Original file line number Diff line number Diff line change @@ -78,7 +78,16 @@ parallel(
7878 withCredentials([[$class : ' StringBinding' ,
7979 credentialsId : ' 2da033eb-2e34-4efd-b090-ad892f348065' ,
8080 variable : ' CODECOV_TOKEN' ]]) {
81- sh " docker run -e CODECOV_TOKEN=\$ {CODECOV_TOKEN} --rm ${ test_image} sh -c 'test-cover.sh && curl -s https://codecov.io/bash | bash'"
81+ def codecov = " codecov -Z -C ${ git_commit} "
82+ if (git_branch == " remotes/origin/master" ) {
83+ codecov + = " -B master"
84+ } else {
85+ def branch_name = env. BRANCH_NAME
86+ def branch_index = branch_name. indexOf(' -' )
87+ def pr = branch_name. substring(branch_index+1 , branch_name. length())
88+ codecov + = " -P ${ pr} "
89+ }
90+ sh " docker run -e CODECOV_TOKEN=\$ {CODECOV_TOKEN} --rm ${ test_image} sh -c 'test-cover.sh && ${ codecov} '"
8291 }
8392 }
8493 }
You can’t perform that action at this time.
0 commit comments