最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

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

programmeradmin1浏览0评论

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.

发布评论

评论列表(0)

  1. 暂无评论