1

我们如何触发不同项目的工作。例如,我有父工作“abc”有像“<a href="https://github.n.com/user_name/abc" rel="nofollow noreferrer">https://github.n.com/ 这样的存储库用户名/abc”。成功构建此作业后,我必须触发下一个作业“xyz”具有类似“<a href="https://github.n.com/user_name/xyz" rel="nofollow noreferrer">https://github .n.com/user_name/xyz”。这两个项目都有不同的存储库位置。我的问题是abc项目构建如何触发xyz项目构建。谢谢,拉胡尔

4

1 回答 1

1

根据他们的文档,您可以使用工作流功能来创建后续的构建作业线。

https://circleci.com/docs/2.0/#using-the-workflows-functionality

version: 2
jobs:
  one:
    docker:
      - image: circleci/ruby:2.4.1
    steps:
      - checkout
      - run: echo "A first hello"
      - run: sleep 25
  two:
    docker:
      - image: circleci/ruby:2.4.1
    steps:
      - checkout
      - run: echo "A more familiar hi"
      - run: sleep 15
workflows:
  version: 2
  one_and_two:
    jobs:
      - one
      - two

至于它们在不同的存储库上,我假设您可以调用git clone而不是结帐(以防结帐不支持传递 url)。

编辑:这里提供了更多关于工作流的文档:https ://circleci.com/docs/2.0/workflows/

于 2018-05-03T12:22:42.520 回答