Im trying some changes related to rules but not successful requirement: When a feature-A or feature-B is merged to develop , when merge req is approved the build stage should run. Thanks !
build_development:
stage: build
# when: manual
script:
- |
echo "Intiating application docker build and push to ECR.."
tags:
- docker
# only:
# - merge_requests
# - develop
# except:
# - prod
# rules:
# - if: '$CI_MERGE_REQUEST_APPROVED == "true" && $CI_MERGE_REQUEST_SOURCE_BRANCH_NAME == /^feature-.*$/'
# when: always
rules:
- if: '$CI_MERGE_REQUEST_APPROVED == "true" && $CI_MERGE_REQUEST_TARGET_BRANCH_NAME =~ /^develop$/'
when: always