Jobs from API 'Trigger a new Build by Project' Not Found

Hi there,

Background: I’m using Phabricator as our project management tools, and we want to integrate it with circle ci through api.

The problem is that we want to trigger the workflow, and the original way of using api ’ Trigger a new Job’ cannot trigger the workflow. Therefore, api ‘Trigger a new build by project’ seems to be the answer.

However, even I’ve enabled all the project settings needed and I’ve gotten a success message from circleci, I can still not see any jobs on my circleci job list!

Here is my api calls:

curl -X POST "https://circleci.com/api/v1.1/project/github/:username/:project/build?circle-token=:my-personal-token" \
-H "Content-Type:application/json" \
-d '{"tag":"my-tag"}'

and here’s what I got:

{
  "status" : 200,
  "body" : "Build created"
}

any thought? thanks.


FYI, this is the project setting

  1. GitHub Status updates: On
  2. Build forked pull requests: Off
  3. Pass secrets to builds from forked pull requests: On
  4. Only build pull requests: Off
  5. Auto-cancel redundant builds: On
  6. Enable pipelines: On

Everything here looks like it should work, as you suspect. It would be hard to help more without getting see the config and/or knowing a URL to the project. I can say that doing tag builds can sometimes trip people up because the config around tags is a bit fussy - without more to go on, that’s where I’d likely start trying to debug (for instance, if you don’t pass the tag does it work? Does this same config work if you create the tag on GitHub instead of using the API?

I can reproduce the error in my repository FongX777/graphql-it30-tutorial

At first, I tried to build with master branch, and it worked, and this is the ci page and my request:

curl -X POST 'https://circleci.com/api/v1.1/project/github/FongX777/graphql-it30-tutorial/build?circle-token=<my-token>'
-H 'Content-Type: application/json' \
-d '{"branch":"master"}'

Then I created a new tag directly through GitHub release page and called it ci-test as this link. But after I made a request like this:

curl -X POST 'https://circleci.com/api/v1.1/project/github/FongX777/graphql-it30-tutorial/build?circle-token=<my-token>'  \
-H 'Content-Type: application/json' \
-d '{"tag":"ci-test"}'
---
{
  "status" : 200,
  "body" : "Build created"
}

I found no build on my ci page…

I was wondering if there is any problem with tag build.

Any thoughts?

Running into this as well.

Has anybody been able to trigger workflows via the API?