That worked perfectly, thanks

P

On Tue, 16 Oct 2018 at 10:40 Paul D'Ambra <[email protected]> wrote:

> I'll try that today! Thanks so much for your time!
>
> P
>
> On Tue, 16 Oct 2018 at 08:57 Andrew Bayer <[email protected]> wrote:
>
>> Hi -
>>
>> Ah, ok, I think the issue is that dependencyCheckPublisher is just
>> setting the build result to FAILURE, but the step itself isn't failing, per
>> se - it's not throwing an error. The Pipeline will only stop running
>> subsequent steps if there's an actual error - it doesn't check build status
>> for that. So yeah, something like this after the dependencyCheckPublisher
>> call would probably do the trick:
>>
>> dependencyCheckPublisher(...)
>> script {
>>   if (currentBuild.result == "FAILURE") {
>>     error("Dependency Check failed")
>>   }
>> }
>>
>> A.
>>
>> On Mon, Oct 15, 2018 at 4:56 PM Paul D'Ambra <[email protected]>
>> wrote:
>>
>>> I think I've stripped out everything that I shouldn't share :)
>>>
>>> not doing anything fancy. the dependency check runs and fails the build
>>> but the steps after it run even though it failed.
>>>
>>> On Monday, 15 October 2018 15:28:19 UTC+1, Andrew Bayer wrote:
>>>>
>>>> Can you attach your Jenkinsfile? Thanks.
>>>>
>>>> On Mon, Oct 15, 2018 at 10:59 AM Paul D'Ambra <[email protected]>
>>>> wrote:
>>>>
>>>>> Hi, thanks for the link?
>>>>>
>>>>> I find the pipeline documentation a bit limited... there are no
>>>>> examples of usage in that link. Are you saying I need to "wrap" the
>>>>> dependency check stage in some way so that I can manually trigger the 
>>>>> error
>>>>> signal when it fails?
>>>>>
>>>>> Are you (or anyone) able to point me at an example of how that might
>>>>> work?
>>>>>
>>>>> Thanks
>>>>>
>>>>> On Mon, 15 Oct 2018 at 09:56 Ramanathan Muthaiah <[email protected]>
>>>>> wrote:
>>>>>
>>>>>> Most likely, you need this 'error
>>>>>> <https://jenkins.io/doc/pipeline/steps/workflow-basic-steps/#error-error-signal>
>>>>>> '.
>>>>>>
>>>>>> /Ram
>>>>>>
>>>>>>
>>>>>> On Thursday, October 4, 2018 at 1:36:03 PM UTC+5:30, Paul D'Ambra
>>>>>> wrote:
>>>>>>>
>>>>>>> I have a declarative Jenkins pipeline that in a parallel stage runs
>>>>>>> the dependency check plugin. With their support
>>>>>>> <https://github.com/jeremylong/DependencyCheck/issues/1510#issuecomment-426219678>
>>>>>>>  I
>>>>>>> have the plugin configured so that if a certain number of new
>>>>>>> vulnerabilities are detected it fails the build.
>>>>>>>
>>>>>>> However, even though the build is marked as failed in Jenkins the
>>>>>>> pipeline is running on past that stage.
>>>>>>>
>>>>>>> So, the build is marked as failed *and* the artefact has been
>>>>>>> deployed into an environment!
>>>>>>>
>>>>>>> The plugin authors believe this is either the analysis plugin or
>>>>>>> Jenkins at fault. But I don't know how to investigate further. Can 
>>>>>>> anyone
>>>>>>> here provide advice?
>>>>>>>
>>>>>>> Thanks
>>>>>>>
>>>>>> --
>>>>>> You received this message because you are subscribed to a topic in
>>>>>> the Google Groups "Jenkins Users" group.
>>>>>> To unsubscribe from this topic, visit
>>>>>> https://groups.google.com/d/topic/jenkinsci-users/tjxKjosOdqY/unsubscribe
>>>>>> .
>>>>>> To unsubscribe from this group and all its topics, send an email to
>>>>>> [email protected].
>>>>>> To view this discussion on the web visit
>>>>>> https://groups.google.com/d/msgid/jenkinsci-users/b91a6b50-360f-4bc3-9d7f-db78e86d92cf%40googlegroups.com
>>>>>> <https://groups.google.com/d/msgid/jenkinsci-users/b91a6b50-360f-4bc3-9d7f-db78e86d92cf%40googlegroups.com?utm_medium=email&utm_source=footer>
>>>>>> .
>>>>>> For more options, visit https://groups.google.com/d/optout.
>>>>>>
>>>>> --
>>>>> 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 [email protected].
>>>>> To view this discussion on the web visit
>>>>> https://groups.google.com/d/msgid/jenkinsci-users/CAKdKnDs7vZEZRMO9NkDu39KHtyQRbE8n3rRYJnYY3_5Um6V1NQ%40mail.gmail.com
>>>>> <https://groups.google.com/d/msgid/jenkinsci-users/CAKdKnDs7vZEZRMO9NkDu39KHtyQRbE8n3rRYJnYY3_5Um6V1NQ%40mail.gmail.com?utm_medium=email&utm_source=footer>
>>>>> .
>>>>> For more options, visit https://groups.google.com/d/optout.
>>>>>
>>>> --
>>> 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 [email protected].
>>
>>
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/jenkinsci-users/09f692bc-77c6-4dfd-b78c-0bb3a6886bef%40googlegroups.com
>>> <https://groups.google.com/d/msgid/jenkinsci-users/09f692bc-77c6-4dfd-b78c-0bb3a6886bef%40googlegroups.com?utm_medium=email&utm_source=footer>
>>> .
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>> --
>> You received this message because you are subscribed to a topic in the
>> Google Groups "Jenkins Users" group.
>> To unsubscribe from this topic, visit
>> https://groups.google.com/d/topic/jenkinsci-users/tjxKjosOdqY/unsubscribe
>> .
>> To unsubscribe from this group and all its topics, send an email to
>> [email protected].
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/jenkinsci-users/CAPbPdOYXW87xpxwBL7VBf-Ai5hg9jh9Hf4%2BvwO4CF_pNR%2BZRVw%40mail.gmail.com
>> <https://groups.google.com/d/msgid/jenkinsci-users/CAPbPdOYXW87xpxwBL7VBf-Ai5hg9jh9Hf4%2BvwO4CF_pNR%2BZRVw%40mail.gmail.com?utm_medium=email&utm_source=footer>
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/CAKdKnDtg_n%3DmzODddtfdZB2Rpsn0GwwEqdn2QxJqAtGdNac6Sw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to