I’m absolutely new in CI/CD for this case. In the follow I try to describe my scenario at the best. Maybe someone can help me with an gitlab-ci.yaml example.
- Production Server (prod.foo.bar, SSH, kickstarter.sh script which pulling the newst production branch changes)
- Branch: master (Developer push their code in here, or from feature-branches MR’s)
- Branch: production (protected, only MR from master → production is possible)
So good, so far. How can I code it into a gitlab-ci.yaml with the following requierements?
MR from master to production → all is fine and approved → after approving merge is started → after merge is complete the ci should go ahead and execute the kickstart.sh script on the prod-server
The CI script should running from the production realm (not from master) and only when the MR (master → production) is approved and done.
Can someone help me in this case?