GitLab CI 的“依赖项”的用例是什么?
What's the use case for GitLab CI's `dependencies`?
GitLab CI 有 dependencies
的概念,即 "should be used in conjunction with artifacts and allows you to define the artifacts to pass between different jobs".
但是,“artifacts
之前所有阶段的默认通过”。这使我得出结论,只有在需要在相同或稍后阶段的作业之间传递工件时,您才需要使用 dependencies
。然而,"an error will be shown if you define jobs from the current stage or next ones."
所以如果它不需要用于前面的阶段,并且不能用于前面阶段以外的任何东西,那么什么时候你使用dependencies
?
artifacts from all previous stages are passed by default
就是这个意思。默认情况下,您会获得所有依赖项。但是,有时您并不想要所有这些。例如,如果您管道中的最后一步是向 slackchat 发送通知,您不希望为此下载数百兆字节的工件。
GitLab CI 有 dependencies
的概念,即 "should be used in conjunction with artifacts and allows you to define the artifacts to pass between different jobs".
但是,“artifacts
之前所有阶段的默认通过”。这使我得出结论,只有在需要在相同或稍后阶段的作业之间传递工件时,您才需要使用 dependencies
。然而,"an error will be shown if you define jobs from the current stage or next ones."
所以如果它不需要用于前面的阶段,并且不能用于前面阶段以外的任何东西,那么什么时候你使用dependencies
?
artifacts from all previous stages are passed by default
就是这个意思。默认情况下,您会获得所有依赖项。但是,有时您并不想要所有这些。例如,如果您管道中的最后一步是向 slackchat 发送通知,您不希望为此下载数百兆字节的工件。