I have a set up a pipeline .gitlab-ci.yml where build and deploy to dev works fine. The rule is to run a pipeline for QA after the merge request from develop to QA.
When I create a merge request it runs a pipeline only for this stage ,it is not running build stage again. Can you please help me how to make build run for every stage.
stages:
- build
- deploy dev
- deploy release
build:
stage: build
script:
- build
deploy dev:
stage: deploy dev
environment: DEV
only:
- develop
deploy release:
stage: deploy release
dependencies:
- build
environment: QA
rules:
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
- if: $CI_MERGE_REQUEST_SOURCE_BRANCH_NAME == "develop"