Hi
Here’s my pipeline:
1. node('pc1') {
2.
3. stage('Checkout') {
4. checkout([$class: 'SubversionSCM',
5. additionalCredentials: [[credentialsId: '<snip>', realm: '']],
6. excludedCommitMessages: '',
7. excludedRegions: '',
8. excludedRevprop: '',
9. excludedUsers: '',
10. filterChangelog: false,
11. ignoreDirPropChanges: false,
12. includedRegions: '',
13. locations: [[credentialsId: '<snip>', depthOption: 'infinity', ignoreExternalsOption: false, local: '.', remote: '<snip>']],
14. workspaceUpdater: [$class: 'UpdateUpdater']])
15. }
16.
17. sh '''make'''
18.
19. emailext attachLog: true, body: '$DEFAULT_CONTENT', subject: '$DEFAULT_SUBJECT', to: '<snip>'
20.
21. }
The resulting email has result ‘BUILDING’. How should I change the script to make email-ext report the final result (FAILURE or SUCCESS)?
Best regards
David
currentBuild.result
if(!currentBuild.result)
{
currentBuild.result = 'SUCCESS'
}Thanks for your answer.
I’m beginning to think that pipeline scripting is too difficult. It seems to me that there aren’t enough complete examples to demonstrate this stuff. The snippets generator does not help with putting a complete script together.
Jenkins seems to have gone from being very user friendly to difficult L
--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
jenkinsci-use...@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/jenkinsci-users/dd403b4e-dd28-484b-9c7e-3f8342e6faa6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Click here to report this email as spam.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/867d39cd53494612b471bc5238f31d16%40EUX13SRV1.EU.NEC.COM.
Understood. But the multibranch plugin is marked as deprecated and it seems that the multibranch pipeline is advised. Multibranch projects are very helpful for us so I thought it would be good to look at pipelines.
I guess I may be advised to try Blue Ocean, but that is git-centric and we are svn-centric. So we’re a bit stuck L
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/CAPiUgVd77cZ0G8hrXn5jDzPzBUZL04mAex0nrBU2cCKQTxgMaw%40mail.gmail.com.
I agree that some better examples would help a lot. In particular, an example script that runs a shell command and provides an email notification would be a great help.
> So far, I use simple Jenkins file that launch a lot of console cmd …
Please will you post your Jenkins file here or send it to me by email?
Best regards
David
From: jer...@bodycad.com [mailto:jer...@bodycad.com]
Sent: 24 April 2017 18:32
To: Jenkins Users <jenkins...@googlegroups.com>
Cc: David Aldrich <David....@EMEA.NEC.COM>
Subject: Re: How to use email-ext plugin in pipeline script?
It's not so hard, it's just some behavior/limitations that are a bit hard to grasp (groovy loop anyone). I think they went on a road to provide some features at high trade back cost.
Click here to report this email as spam.