hi
i have this problem that whenever a merge request is accepted some pipelines start to run.
also we have the same pipeline for pushing a branch to gitlab and also creating a new merge request
this is my job :
build:
stage: build
script:
- mvn $MAVEN_CLI_OPTS clean install -Dmaven.test.skip=true -P prod
artifacts:
expire_in: 800 mins 0 sec
paths:
- app.jar
- Dockerfile
- docker
cache:
key: "${CI_JOB_NAME}"
paths:
- /node_modules
policy: pull-push
rules:
- if: '$CI_PIPELINE_SOURCE == "push" && $CI_MERGE_REQUEST_TARGET_BRANCH_NAME != "master" && $CI_MERGE_REQUEST_TARGET_BRANCH_NAME != "develop"'
- if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
- if: '$CI_PIPELINE_SOURCE != "push" && $CI_PIPELINE_SOURCE != "merge_request_event" && $CI_COMMIT_REF_NAME == "master"'
- if: '$CI_PIPELINE_SOURCE != "push" && $CI_PIPELINE_SOURCE != "merge_request_event" && $CI_COMMIT_REF_NAME == "develop"'
i dont want the pipeline to be run after the merge request is accepted