我们如何在当前构建完成后触发下一个作业

How can we trigger the next job from current build when it completed

我们如何触发不同项目的工作。例如,我的父作业“abc”有像“https://github.n.com/user_name/abc”. After building this job successgully, I have to trigger next job “xyz” has repository like “https://github.n.com/user_name/xyz”这样的存储库。这两个项目都有不同的存储库位置。 我的问题是 abc 项目构建如何触发 xyz 项目构建。 谢谢, 拉胡尔

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

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/