0

I am a beginner to learn gitlab CI/CD and doing some projects related to it. I have a trouble when using OpenFaaS and build a large number of function.I want to use CI/CD to automatically build functions that have updates, remain functions are not, but I don't know how to get name of specific folder or directory changed in my source to build corresponding functions.

So I wonder if we have a way to get name of specific directory changed in Gitlab CI/CD? Or another tools CI/CD can do that?

1 Answers1

0

only:changes is what you are looking for:

#.gitlab-ci.yml
my job:
  script: echo "I am triggered only when changes to some/dir are applied"
  only:
    changes:
      - some/dir/**/*
makozaki
  • 3,772
  • 4
  • 23
  • 47
  • Tks youu, in my script ca we get the name of the changed path? – Phạm Ngọc Tâm Jan 26 '22 at 16:47
  • If this answers your original question then please accept the answer. About getting changed paths in your script please ask another question, describe what you did so far with example of your script, and ask specific question for problem you cannot solve by yourself. – makozaki Jan 27 '22 at 07:24