diff options
author | Evan Lojewski <github@meklort.com> | 2019-11-14 20:22:06 -0700 |
---|---|---|
committer | Evan Lojewski <github@meklort.com> | 2019-11-14 20:22:06 -0700 |
commit | d57ba9d611fd5da2cdeada363a9c131dd3e2e57e (patch) | |
tree | 0e4f17c4c0c8c9652337b5ba0dcf0cef65edb481 /.jenkins.groovy | |
parent | 64da0ad1933705fc58b50f1450babda7bc6c3e8e (diff) | |
download | bcm5719-ortega-d57ba9d611fd5da2cdeada363a9c131dd3e2e57e.tar.gz bcm5719-ortega-d57ba9d611fd5da2cdeada363a9c131dd3e2e57e.zip |
Enable jenkins to report pass/fail results.
Diffstat (limited to '.jenkins.groovy')
-rw-r--r-- | .jenkins.groovy | 41 |
1 files changed, 38 insertions, 3 deletions
diff --git a/.jenkins.groovy b/.jenkins.groovy index 98d62be..3d87688 100644 --- a/.jenkins.groovy +++ b/.jenkins.groovy @@ -42,6 +42,19 @@ /// @endcond //////////////////////////////////////////////////////////////////////////////// +def notify(status, description) +{ + githubNotify account: 'meklort', + context: JOB_NAME, + credentialsId: 'jenkins_status', + description: description, + gitApiUrl: '', + repo: 'bcm5719-fw', + sha: GIT_COMMIT, + status: status, + targetUrl: BUILD_URL +} + def build(nodeName) { node(nodeName) @@ -82,6 +95,28 @@ def build(nodeName) } } - -build('master') -build('debian') +try +{ + notify('PENDING', 'Build Pending ') + parallel( + "fedora": { build('master') }, + "debian": { build('debian') }, + ) +} +catch(e) +{ + currentBuild.result = 'FAILURE' + throw e +} +finally +{ + def currentResult = currentBuild.result ?: 'SUCCESS' + if(currentResult == 'SUCCESS') + { + notify('SUCCESS', 'Build Passed ') + } + else + { + notify('FAILURE', 'Build Failed ') + } +} |