move coverage step to build pipeline

This commit is contained in:
Robert Kaussow 2020-02-03 13:05:52 +01:00
parent f03db66645
commit 0f79e5c26f
2 changed files with 31 additions and 41 deletions

View File

@ -90,6 +90,24 @@ def binaries(arch):
'cd release/ && sha256sum * > sha256sum.txt', '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', 'name': 'publish',
'image': 'plugins/github-release', 'image': 'plugins/github-release',
@ -125,23 +143,6 @@ def notification():
'type': 'docker', 'type': 'docker',
'name': 'notification', 'name': 'notification',
'steps': [ 'steps': [
{
'name': 'coverage',
'image': 'plugins/codecov',
'settings': {
'token': {
'from_secret': 'codecov_token',
},
'files':[
'coverage.txt'
]
},
'when': {
'status': [
'success',
]
}
},
{ {
'name': 'matrix', 'name': 'matrix',
'image': 'plugins/matrix', 'image': 'plugins/matrix',
@ -160,12 +161,6 @@ def notification():
'from_secret': 'matrix_username', 'from_secret': 'matrix_username',
}, },
}, },
'when': {
'ref': [
'refs/heads/master',
'refs/tags/**',
],
}
}, },
], ],
'depends_on': [], 'depends_on': [],
@ -173,7 +168,6 @@ def notification():
'ref': [ 'ref': [
'refs/heads/master', 'refs/heads/master',
'refs/tags/**', 'refs/tags/**',
'refs/pull/**',
], ],
'status': [ 'status': [
'success', 'success',

View File

@ -59,6 +59,18 @@ steps:
commands: commands:
- cd release/ && sha256sum * > sha256sum.txt - 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 - name: publish
image: plugins/github-release image: plugins/github-release
settings: settings:
@ -92,17 +104,6 @@ platform:
arch: amd64 arch: amd64
steps: steps:
- name: coverage
image: plugins/codecov
settings:
files:
- coverage.txt
token:
from_secret: codecov_token
when:
status:
- success
- name: matrix - name: matrix
image: plugins/matrix image: plugins/matrix
settings: settings:
@ -115,16 +116,11 @@ steps:
template: "Status: **{{ build.status }}**<br/> Build: [{{ repo.Owner }}/{{ repo.Name }}]({{ build.link }}) ({{ build.branch }}) by {{ build.author }}<br/> Message: {{ build.message }}" template: "Status: **{{ build.status }}**<br/> Build: [{{ repo.Owner }}/{{ repo.Name }}]({{ build.link }}) ({{ build.branch }}) by {{ build.author }}<br/> Message: {{ build.message }}"
username: username:
from_secret: matrix_username from_secret: matrix_username
when:
ref:
- refs/heads/master
- refs/tags/**
trigger: trigger:
ref: ref:
- refs/heads/master - refs/heads/master
- refs/tags/** - refs/tags/**
- refs/pull/**
status: status:
- success - success
- failure - failure
@ -134,6 +130,6 @@ depends_on:
--- ---
kind: signature kind: signature
hmac: e861eec40c380dc94525d15f454ec7df9dc941623435d9ccf1975fd8f90bd9c0 hmac: 4d47c1352ad084436acc5f2fefff9cddf87ed1d09be8e41d7e37d818b164d718
... ...