GitLab CICD cache is not working with local includes - Stack Overflow

I am trying to setup a monorepo with GitLab CICD. I want to define the jobs for each sub project under

I am trying to setup a monorepo with GitLab CI/CD. I want to define the jobs for each sub project under that project and not on the root gitlab-ci.yml file. So right now I have:

cache:
  key: $CI_COMMIT_REF_SLUG
  paths:
    - infrastructure/node_modules/
    - infrastructure/dist/
    - frontend/node_modules/
    - frontend/dist/

include:
  - local: '/infrastructure/infrastructure.gitlab-ci.yml'
    rules:
      - changes:
        - 'infrastructure/*'
  - local: '/frontend/frontend.gitlab-ci.yml'
    rules:
      - changes:
        - 'frontend/*'

Originally the cache was also moved to each folder, but I was also trying with moving just the cache to the root gitlab-ci.yml.

The problem that I'm facing right now is that if only 1 sub-pipeline runs, everything works properly, but if both running together, because I have changes in both folders, only the frontend pipelines are running properly, however the infrastructure caching is not working.

When only infra pipeline is running, it works fine, so I have the node_modules shared between the jobs.

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745643125a4637810.html

相关推荐

  • GitLab CICD cache is not working with local includes - Stack Overflow

    I am trying to setup a monorepo with GitLab CICD. I want to define the jobs for each sub project under

    22天前
    80

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信