小编unv*_*hed的帖子

GitLab CI:在两个独立的并行作业中重用相同的图像

我目前正在Latex使用容器并行构建两个文档,aergus/latex如下所示(Makefile存储库中提供了一个文档):

stages:
  - compile

.compile_pdf_template:
  stage: compile
  image: aergus/latex

presentation:
  extends: 
    - .compile_pdf_template
  script:
    - make presentation
  artifacts:
    paths:
      - presentation.pdf

report:
  extends: 
    - .compile_pdf_template
  script:
    - make report
  artifacts:
    paths:
      - report.pdf
Run Code Online (Sandbox Code Playgroud)

这按预期工作,但它会拉取图像两次(这是这个简单管道中最慢的步骤,因为文档只有很少的页面/幻灯片)。有没有什么方法可以在两个作业之间共享图像,仅有效地拉取一次,同时保持作业并行运行?

gitlab-ci

7
推荐指数
1
解决办法
6433
查看次数

标签 统计

gitlab-ci ×1