# Multiple pipeline usage

**URL:** <https://community.jenkins.io/t/multiple-pipeline-usage/13039>\
**Category:** Ask a question\
**Tags:** question, pipeline\
**Created:** [March 5, 2024, 7:05am UTC](https://community.jenkins.io/t/multiple-pipeline-usage/13039 "2024-03-05T07:05:41Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![sravanig](https://avatars.discourse-cdn.com/v4/letter/s/7ba0ec/32.png) [@sravanig](https://community.jenkins.io/u/sravanig)\
**Post date:** [March 5, 2024, 7:05am UTC](https://community.jenkins.io/t/multiple-pipeline-usage/13039/1 "2024-03-05T07:05:41Z")

</div>

i want to use 3 pipelines and if anything fails in the 3rd pipeline, i want to continue or resume building from the third pipeline. how to do that???  
What should I use to do that?

---

<div class="post-metadata">

**Author:** ![poddingue](https://dub1.discourse-cdn.com/flex013/user_avatar/community.jenkins.io/poddingue/32/985_2.png) [@poddingue](https://community.jenkins.io/u/poddingue)\
**Post date:** [March 6, 2024, 9:15am UTC](https://community.jenkins.io/t/multiple-pipeline-usage/13039/2 "2024-03-06T09:15:03Z")

</div>

I think you could achieve this by using Jenkins’ `catchError` or `try/catch` block in your pipeline script. This allows the pipeline to continue running even if a step fails.

Here’s a basic example of how you could structure your pipeline:

```auto
pipeline {
    agent any

    stages {
        stage('Pipeline 1') {
            steps {
                // Your steps for Pipeline 1
            }
        }
        stage('Pipeline 2') {
            steps {
                // Your steps for Pipeline 2
            }
        }
        stage('Pipeline 3') {
            steps {
                catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE') {
                    // Your steps for Pipeline 3
                }
            }
        }
    }
}

```

In this example, if anything fails in the ‘`Pipeline 3`’ stage, the build result will be set to ‘`SUCCESS`’ and the stage result will be set to ‘`FAILURE`’.  
This means that the build will continue even if there’s a failure in ‘Pipeline 3’.
