Already up to date gitlab pipeline stackoverflow

Viewed 465

i trying gitlab pipeline. now i make some changes & code pushed in master branch pipeline showing already update to date but i have changes in code enter image description here

I try to pull in three phase but still same issue .gitlab-ci.yml

before_script:
  - echo "Before script"
building:
  stage: build
  script:
    - git pull origin master
testing:
  stage: test
  script:
    - git pull origin master
deploying:
  stage: deploy
  script:
    - git pull origin master
2 Answers

If the gitlab-ci workflow starts by cloning your repository, no amount of git pull will change the fact you already have the full history, and, at the time of the workflow, this is "already up to date".

In other words, a git pull would not be needed in your gitlab-ci.yml file.

If your pipeline is running on the same repo that you changed, there is no need to use git pull. Although, if your pipeline triggers (on repo A) another pipeline on another repository (repo B), to access files in repo A, you have to pull repo A in repo B pipeline.

Related