2.0: Running a specific job using the API


#1

This refers to the ability to have multiple jobs defined within a CircleCI 2.0 build plan. Referencing the documentation:
https://circleci.com/docs/2.0/configuration-reference/

Specifically this paragraph:

If you are not using workflows, the jobs map must contain a job named build. This build job is the default entry-point for a run that is triggered by a push to your VCS provider. It is possible to then specify additional jobs and run them using the CircleCI API.

Let’s say I have these jobs defined within the yaml file, and I’m not using workflows:

  • build
  • deploy_only
  • some_other_job_title

I have a couple of questions:

  1. Is the “build” job the only one that runs automatically when the build is triggered?
  2. How do I trigger the “deploy_only” job from the API? I’ve looked through the API documentation and I’m not seeing that.

Thank you.


#2

Found it:
https://circleci.com/docs/2.0/api-job-trigger/


#3

This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.