# How to Skip a stage based on a Jenkins trigger

**URL:** <https://community.jenkins.io/t/how-to-skip-a-stage-based-on-a-jenkins-trigger/2261>\
**Category:** Using Jenkins\
**Created:** [April 27, 2022, 10:43am UTC](https://community.jenkins.io/t/how-to-skip-a-stage-based-on-a-jenkins-trigger/2261 "2022-04-27T10:43:19Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ayoubelkass](https://dub1.discourse-cdn.com/flex013/user_avatar/community.jenkins.io/ayoubelkass/32/1360_2.png) [@ayoubelkass](https://community.jenkins.io/u/ayoubelkass)\
**Post date:** [April 27, 2022, 10:43am UTC](https://community.jenkins.io/t/how-to-skip-a-stage-based-on-a-jenkins-trigger/2261/1 "2022-04-27T10:43:19Z")

</div>

Hello everyone,

i would like to ask if there is anyways to Skip certain stages after a GitLab webhook is triggered  
here is my JenkinsFile :

 ![JF](https://europe1.discourse-cdn.com/flex013/uploads/jenkins/original/2X/a/aa0a03a41d83221e7c509c516c1417625d590f19.png)

and here is the triggers i set for this pipeline :

**- opened merge request events**  
**- accepted merge request event**

Now what i’d like as a result is this :

**1) for the 3rd stage (push docker image to docker registry) & 4th stage(check&run) to be skipped when the merge request is opened.**

**2) for the whole pipeline to Run completely when the merge request is accepted.**

i can’t seem to figure it out or any work-around to do it.

P.S : it shall be a simple pipeline project (I don’t want to use a multi-branch project)
