小编Ash*_*ngh的帖子

Gitlab ci 问题是通过触发器将工件传递到下游管道并需要关键字

我正在开发一个多管道项目,并使用trigger关键字触发下游管道,但我无法传递在上游项目中创建的工件。我用来needs获取这样的工件:

获取工件的下游管道块:

needs:
    - project: workspace/build
        job: build
        ref: master
        artifacts: true
Run Code Online (Sandbox Code Playgroud)

要触发的上游管道块:

build:
    stage: build
    artifacts:
    paths:
        - ./policies
    expire_in: 2h
    only:
    - master
    script:
    - echo 'Test'
    allow_failure: false

triggerUpstream:
    stage: deploy
    only:
    - master
    trigger:
    project: workspace/deploy
Run Code Online (Sandbox Code Playgroud)

但我收到以下错误:

This job depends on other jobs with expired/erased artifacts:
Run Code Online (Sandbox Code Playgroud)

我不确定出了什么问题。

pipeline gitlab gitlab-ci gitlab-pipelines

6
推荐指数
1
解决办法
1万
查看次数

标签 统计

gitlab ×1

gitlab-ci ×1

gitlab-pipelines ×1

pipeline ×1