Answer the question
In order to leave comments, you need to log in
How to write a CI/CD script that, after successful tests, pushes the code to the master branch from pre-relase?
Create a CI / CD (continuous integration) file in which you need to implement the following logic:
1. you upload the code to dev and nothing should happen here
2. you upload the code to the pre-realse branch
3. gitlab should do tests using CI / CD your software and if they pass, then send your code to master
The first two points do not cause problems, the last one I don’t understand at all how to release it, please tell me
Answer the question
In order to leave comments, you need to log in
.gitlab-ci.yml
stages:
- test
- push
pre_release_test:
stage: test
only:
- pre-realse
script:
- # тут описываем скриптом шаги которые нужны для тестирования
pre_release_push:
stage: push
only:
- pre-realse
script:
- # тут описываем скриптом шаги которые нужны для того чтобы запушить код в master
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question