gitlab - Sending to production or review environments depending on branch -


we're using gitlab-ci have troubles have review , production environments @ same time.

we have several stages in our .gitlab-ci.yml here i'll focus on deploy stage:

deploy:   stage: deploy   script:     - commands   environment:     name: review/$ci_build_ref_name     url: http://$ci_build_ref_slug.$deploy_server     on_stop: stop_deploy   only:     - /^feature-[cw]\/.*$/  deploy:   stage: deploy   script:     - other commands   environment:     name: production   only:     - prod   stop_deploy:   stage: deploy   variables:     git_strategy: none   script:     - clean commands   when: manual   environment:     name: review/$ci_build_ref_name     action: stop   only:     - /^feature-[cw]\/.*$/ 

the issue first job not run on branches name starts feature-c/. when removing second job, first job run on branches.

the job deploys production correctly run when pushed prod.

so why first job not run when second job defined? conflict comes from?

thanks!

the answer quite simple; can't have same name :) name 1 deploy-review , other deploy-prod , fixed.


Comments

Popular posts from this blog

Command prompt result in label. Python 2.7 -

javascript - How do I use URL parameters to change link href on page? -

amazon web services - AWS Route53 Trying To Get Site To Resolve To www -