在GitLab项目之间共享数据

发布于 2025-02-07 06:50:27 字数 121 浏览 1 评论 0原文

我们如何在不同的GitLab项目之间共享测试数据。 我们有一个集中式项目,其中包含测试数据,在运行其单位测试时,需要由不同的项目使用。那么,在相应的.gitlab-ci.yml项目文件中,在测试阶段导入测试数据的最佳方法是什么?

How could we share test data among different gitlab projects.
We have a centralized project containing test data which needs to be used by different projects while running their unit tests. So what would be the best way to import the test data in the test stage in corresponding .gitlab-ci.yml project file?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

咋地 2025-02-14 06:50:27

测试数据存储库可以在测试阶段的开头克隆:

test:
  script:
    - git clone https://gitlab-ci-token:$CI_JOB_TOKEN@gitlab/group/project_test_data.git
    - # run your tests using project_test_data

ci_job_token可以让您在克隆时识别。 cf: https:// https://docs.gitlab.com/ee/ee/ee/ci/ci/variables/ predefined_variables.html

The test data repository can be cloned at the beginning of test stage :

test:
  script:
    - git clone https://gitlab-ci-token:$CI_JOB_TOKEN@gitlab/group/project_test_data.git
    - # run your tests using project_test_data

The CI_JOB_TOKEN will let you identified when cloning. cf : https://docs.gitlab.com/ee/ci/variables/predefined_variables.html

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文