Caching files in parallel jobs only works in one of the jobs?

I have a Gitlab CI pipeline that runs 3 jobs in parallel and caches files created in those jobs to use further in the pipeline, but only files created in one of the 3 parallel jobs are actually being cached & available in subsequent jobs.

Here’s basically what my pipline code looks like:

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
<code>default:
cache:
key: $CI_COMMIT_SHA
paths:
- release/**/*
stages:
- stage1
- stage2
- stage3
job1:
stage: stage1
before_script:
- mkdir release
script:
- echo 'job1' > release/job1
job2:
stage: stage2
parallel:
matrix:
- ITEM:
- item1
- item2
- item3
script:
- echo "job2-$ITEM" > release/job2-$ITEM
job3:
stage: stage3
script:
- echo 'job3' > release/job3
post:
stage: .post
script:
- ls release/
</code>
<code>default: cache: key: $CI_COMMIT_SHA paths: - release/**/* stages: - stage1 - stage2 - stage3 job1: stage: stage1 before_script: - mkdir release script: - echo 'job1' > release/job1 job2: stage: stage2 parallel: matrix: - ITEM: - item1 - item2 - item3 script: - echo "job2-$ITEM" > release/job2-$ITEM job3: stage: stage3 script: - echo 'job3' > release/job3 post: stage: .post script: - ls release/ </code>
default:
  cache:
    key: $CI_COMMIT_SHA
    paths:
      - release/**/*

stages:
  - stage1
  - stage2
  - stage3

job1:
  stage: stage1
  before_script:
    - mkdir release
  script:
    - echo 'job1' > release/job1

job2:
  stage: stage2
  parallel:
    matrix:
      - ITEM:
          - item1
          - item2
          - item3
  script:
    - echo "job2-$ITEM" > release/job2-$ITEM

job3:
  stage: stage3
  script:
    - echo 'job3' > release/job3

post:
  stage: .post
  script:
    - ls release/

In the post job, the only file from stage2 is job2-item1. It should have also created job2-item2 and job2-item3.

In the item2 and item3 parallel jobs in stage2, it’s creating those files and caching them but for some reason job3 isn’t picking them up. also, the previously-cached items from job1 are being restored in job2 [item1] but not item2 or item3

job2 [item1]:

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
<code>Successfully extracted cache
...
Creating cache 4e6ab4bcc8d3d0b12c60ee71276fd205ae555268-non_protected...
release/**/*: found 2 matching artifact files and directories
</code>
<code>Successfully extracted cache ... Creating cache 4e6ab4bcc8d3d0b12c60ee71276fd205ae555268-non_protected... release/**/*: found 2 matching artifact files and directories </code>
Successfully extracted cache
...
Creating cache 4e6ab4bcc8d3d0b12c60ee71276fd205ae555268-non_protected...
release/**/*: found 2 matching artifact files and directories 

Note that it says “found 2 matching artifact files”–the job1 file and the newly-created job2 [item1] file.

job2 [item2]:

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
<code>WARNING: Cache file does not exist
Failed to extract cache
...
Creating cache 4e6ab4bcc8d3d0b12c60ee71276fd205ae555268-non_protected...
release/**/*: found 1 matching artifact files and directories
</code>
<code>WARNING: Cache file does not exist Failed to extract cache ... Creating cache 4e6ab4bcc8d3d0b12c60ee71276fd205ae555268-non_protected... release/**/*: found 1 matching artifact files and directories </code>
WARNING: Cache file does not exist                 
Failed to extract cache
...
Creating cache 4e6ab4bcc8d3d0b12c60ee71276fd205ae555268-non_protected...
release/**/*: found 1 matching artifact files and directories 

Note that it only found 1 file–the newly-created job2 [item2] file, but it’s not receiving the cached job1 file.

job2 [item3]:

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
<code>WARNING: Cache file does not exist
Failed to extract cache
...
Creating cache 4e6ab4bcc8d3d0b12c60ee71276fd205ae555268-non_protected...
release/**/*: found 1 matching artifact files and directories
</code>
<code>WARNING: Cache file does not exist Failed to extract cache ... Creating cache 4e6ab4bcc8d3d0b12c60ee71276fd205ae555268-non_protected... release/**/*: found 1 matching artifact files and directories </code>
WARNING: Cache file does not exist                 
Failed to extract cache
...
Creating cache 4e6ab4bcc8d3d0b12c60ee71276fd205ae555268-non_protected...
release/**/*: found 1 matching artifact files and directories 

What’s the right way to accomplish this?

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật