Skip to content
This repository has been archived by the owner on Feb 8, 2024. It is now read-only.

Triggering a pipeline by tag doesn't trigger any workflows #61

Open
jkleinsc opened this issue Oct 17, 2019 · 2 comments
Open

Triggering a pipeline by tag doesn't trigger any workflows #61

jkleinsc opened this issue Oct 17, 2019 · 2 comments

Comments

@jkleinsc
Copy link

I am trying to use the new API to trigger a pipeline by tag or commit and neither seem to work. It looks like the API doesn't support passing a commit/revision but it looks like tag is supported:
https://github.com/CircleCI-Public/api-preview-docs/blob/master/specs/v2-sketch.yaml#L750

However when I try to trigger via a tag, it doesn't end up triggering any workflows.
Here's the request body being sent

{ 
  parameters: { 
    'run-lint': false,
    'run-build-linux': false,
    'run-build-mac': false,
    'upload-to-s3': '1',
    'run-linux-x64-publish': true
  },
  tag: 'v8.0.0-nightly.20191016' 
}

And the response I get back:

{ 
  workflows: [],
  id: '84f3fc12-6fbf-47ac-85ea-9c977f071b39',
  errors: [],
  project_slug: 'gh/electron/electron',
  updated_at: '2019-10-17T14:09:40.081Z',
  number: 15408,
  state: 'created',
  created_at: '2019-10-17T14:09:40.081Z',
  trigger: { received_at: '2019-10-17T14:09:40.056Z',
     type: 'api',
     actor:
      { 
        login: 'jkleinsc',
        avatar_url: 'https://avatars0.githubusercontent.com/u/609052?v=4' 
      } 
  },
  vcs:
   { origin_repository_url: 'https://github.com/electron/electron',
     target_repository_url: 'https://github.com/electron/electron',
     revision: 'e06b0aa73b91ef90a40616f2ad4554117c69d7ee',
     provider_name: 'GitHub',
     tag: 'v8.0.0-nightly.20191016'
  } 
}
@simesy
Copy link

simesy commented Oct 27, 2019

I think i have the same problem as the OP, but on triggering a branch.

curl -u TOKEN: -X POST --header "Content-Type: application/json" -d '{"parameters": {}}, "branch": "upstream_change"' https://circleci.com/api/v2/project/github/ORG/PROJECT/pipeline

Although my response is different

{
  "number" : 62,
  "state" : "pending",
  "id" : "7d1e5c00-673d-47e0-8ac6-22e49011eb3a",
  "created_at" : "2019-10-27T04:52:09.794Z"
}

It's definitely triggering a build, but on the default branch, rather than the passed branch.

@sulami
Copy link
Contributor

sulami commented Oct 27, 2019 via email

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants