1

I have repository in GitLab. and I have Test and Dev branches in this repository. In Gitlab pipeline, I schedule a job to auto run Test branch pipeline every 24 hours. in Test .gitlab-ci.yml I have

deploy:
  stage: deploy
  script:
    - git pull --ff-only origin Dev
  only:
    - Test

After merging Dev in Test, this part of code was removed. And next time Test branch pipeline could not pull from Dev branch, when pipeline run.

How can I pull code from Dev branch to Test Branch without losing the code - git pull --ff-only origin Dev ?

Or maybe it is possible to have tow .gitlab-ci.yml on branch? (if yes, how GitLab should know which one of them be diploid first? )

user8231110
  • 153
  • 9

1 Answers1

0

Or maybe it is possible to have two .gitlab-ci.yml on branch

You would generally create your .gitlab-ci.yml in the main/master branch.
Which means that .gitlab-ci.yml would not be impacted by merges between Test and Dev. Which is what you need.

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250