Gitlab doesn't apply gitlab-ci.yml

I have pipeline:

stages:          # List of stages for jobs, and their order of execution

  - test

  - deploy

deploy-test:

  stage: test

  image: python

  only:

    - /^B[Ii]-.*$/

  script:

     - git --version

     - pip install argparse adal msal requests-toolbelt requests

     - . PublishPBIReports.sh

deploy-prod:      # This job runs in the deploy stage.

  stage: deploy  # It only runs when *both* jobs in the test stage complete successfully.

  image: python

  only:

    - master

  script:

     - git --version

     - pip install argparse adal msal requests-toolbelt requests

     - pbifiles=(git diff --name-only HEAD HEAD~1 -- '***.pbix')

     - echo $pbifiles

     - echo $CI_COMMIT_BRANCH

I can’t understand that happen, because i created new branch and i see that gitlab-ci.yml with old configuration. Another user created new branch and he received last version gitlab-ci.yml. I thought that when i create new branch i receive last version gitlab-ci.yml, right?

Now some branches use old versions gitlab-ci.yml and every time when pipeline run of course i get error. When i do changes in gitlab-ci.yml, this changes should apply for all branches ???

This does sound very odd.

Is your default branch set correctly? Are all your branches created from the default branch on GitLab?

default branch - master…all branches created from master

First of all, mind the dot in front of the filename; it’s .gitlab-ci.yml not gitlab-ci.yml

Secondly, some branches may have older .gitlab-ci.yml version because the branch was created before your new commits were pushed / merged to master branch.

.gitlab-ci.yml file is tracked by git just like any other file. It’s just a normal file in the repository. If you commit a change on master branch it will not just “apply for all branches” because those branches are tracked separately. If you want the new configuration on other branches merge the master branch to those other branches.