parent
5471f6521c
commit
fceadf2d13
|
@ -17,6 +17,7 @@ pipeline {
|
|||
DOCKER = credentials('dockerhub-upboundci')
|
||||
AWS = credentials('aws-upbound-bot')
|
||||
GITHUB_UPBOUND_BOT = credentials('github-upbound-jenkins')
|
||||
CODECOV_TOKEN = credentials('codecov-crossplane-runtime')
|
||||
}
|
||||
|
||||
stages {
|
||||
|
@ -95,37 +96,17 @@ pipeline {
|
|||
}
|
||||
}
|
||||
|
||||
stage('Record Coverage') {
|
||||
stage('Publish Coverage to Codecov') {
|
||||
when {
|
||||
allOf {
|
||||
branch 'master';
|
||||
expression {
|
||||
return env.shouldBuild != "false"
|
||||
}
|
||||
expression {
|
||||
return env.shouldBuild != "false"
|
||||
}
|
||||
}
|
||||
steps {
|
||||
script {
|
||||
currentBuild.result = 'SUCCESS'
|
||||
}
|
||||
step([$class: 'MasterCoverageAction', scmVars: [GIT_URL: env.GIT_URL]])
|
||||
}
|
||||
}
|
||||
|
||||
stage('PR Coverage to Github') {
|
||||
when {
|
||||
allOf {
|
||||
not { branch 'master' };
|
||||
expression { return env.CHANGE_ID != null };
|
||||
expression { return env.shouldBuild != "false"}
|
||||
sh 'curl -s https://codecov.io/bash | bash -s -- -c -f _output/tests/**/coverage.txt -F unittests'
|
||||
}
|
||||
}
|
||||
steps {
|
||||
script {
|
||||
currentBuild.result = 'SUCCESS'
|
||||
}
|
||||
step([$class: 'CompareCoverageAction', publishResultAs: 'comment', scmVars: [GIT_URL: env.GIT_URL]])
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue