From 0f79e5c26f285658cfdf4c4f35d0d2d41da1c425 Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Mon, 3 Feb 2020 13:05:52 +0100 Subject: [PATCH] move coverage step to build pipeline --- .drone.star | 42 ++++++++++++++++++------------------------ .drone.yml | 30 +++++++++++++----------------- 2 files changed, 31 insertions(+), 41 deletions(-) diff --git a/.drone.star b/.drone.star index afaae2a..8a87320 100644 --- a/.drone.star +++ b/.drone.star @@ -90,6 +90,24 @@ def binaries(arch): 'cd release/ && sha256sum * > sha256sum.txt', ], }, + { + 'name': 'coverage', + 'image': 'plugins/codecov', + 'settings': { + 'token': { + 'from_secret': 'codecov_token', + }, + 'files':[ + 'coverage.txt' + ], + }, + 'when': { + 'ref': [ + 'refs/heads/master', + 'refs/pull/**' + ], + }, + }, { 'name': 'publish', 'image': 'plugins/github-release', @@ -125,23 +143,6 @@ def notification(): 'type': 'docker', 'name': 'notification', 'steps': [ - { - 'name': 'coverage', - 'image': 'plugins/codecov', - 'settings': { - 'token': { - 'from_secret': 'codecov_token', - }, - 'files':[ - 'coverage.txt' - ] - }, - 'when': { - 'status': [ - 'success', - ] - } - }, { 'name': 'matrix', 'image': 'plugins/matrix', @@ -160,12 +161,6 @@ def notification(): 'from_secret': 'matrix_username', }, }, - 'when': { - 'ref': [ - 'refs/heads/master', - 'refs/tags/**', - ], - } }, ], 'depends_on': [], @@ -173,7 +168,6 @@ def notification(): 'ref': [ 'refs/heads/master', 'refs/tags/**', - 'refs/pull/**', ], 'status': [ 'success', diff --git a/.drone.yml b/.drone.yml index 12e198b..c74813f 100644 --- a/.drone.yml +++ b/.drone.yml @@ -59,6 +59,18 @@ steps: commands: - cd release/ && sha256sum * > sha256sum.txt +- name: coverage + image: plugins/codecov + settings: + files: + - coverage.txt + token: + from_secret: codecov_token + when: + ref: + - refs/heads/master + - refs/pull/** + - name: publish image: plugins/github-release settings: @@ -92,17 +104,6 @@ platform: arch: amd64 steps: -- name: coverage - image: plugins/codecov - settings: - files: - - coverage.txt - token: - from_secret: codecov_token - when: - status: - - success - - name: matrix image: plugins/matrix settings: @@ -115,16 +116,11 @@ steps: template: "Status: **{{ build.status }}**
Build: [{{ repo.Owner }}/{{ repo.Name }}]({{ build.link }}) ({{ build.branch }}) by {{ build.author }}
Message: {{ build.message }}" username: from_secret: matrix_username - when: - ref: - - refs/heads/master - - refs/tags/** trigger: ref: - refs/heads/master - refs/tags/** - - refs/pull/** status: - success - failure @@ -134,6 +130,6 @@ depends_on: --- kind: signature -hmac: e861eec40c380dc94525d15f454ec7df9dc941623435d9ccf1975fd8f90bd9c0 +hmac: 4d47c1352ad084436acc5f2fefff9cddf87ed1d09be8e41d7e37d818b164d718 ...