trigger-circleci-pipeline-action icon indicating copy to clipboard operation
trigger-circleci-pipeline-action copied to clipboard

Bug: Triggering pipeline returns 404; but green on CCI

Open RicardoMonteiroSimoes opened this issue 1 year ago • 4 comments

Is there an existing issue for this?

  • [X] I have searched the existing issues

Current behavior

Right now I am changing our CCI setup to trigger through a GH Action. This is to allow us to disable these system tests via a specific label. Now, this appears to be working for anything that runs directly on GH.

Using the action from this repo (Also upgraded manually to 1.1, please refactor the example!), I have changed our config.yml file to check if GH_Action matches. This appears to work; as now the tests don't run, and my new job that checks if it doesn't match runs succesfully: image

Now my problem is that, the only reason these fail, is because the action itself returns a 404... image

The action setup is as simple as it gets:

name: Run CircleCi tests
on:
  pull_request:
    types: [opened, synchronize, reopened]
jobs:
  trigger-circleci:
    runs-on: ubuntu-latest
    steps:
      - name: run system tests
        id: cci_system_tests
        uses: CircleCI-Public/[email protected]
        env:
          CCI_TOKEN: ${{ secrets.CIRCLE_CI_TOKEN }}

So I am not entirely sure how this is supposed to work.

Minimum reproduction code

Please see above

Steps to reproduce

No response

Expected behavior

It should correctly trigger the test with the right parameters, so that it can run the tests, and report back in the PR action if they are passing or not.

GitHub Action Version

1.1.0

Other

No response

RicardoMonteiroSimoes avatar Aug 14 '23 08:08 RicardoMonteiroSimoes

After further researching, the running test on CircleCI is from the old integration, so we can assume that the action itself does not trigger anything at all. But Once I visit the URL from the action, I get no error, just the commit history.

RicardoMonteiroSimoes avatar Aug 14 '23 08:08 RicardoMonteiroSimoes

I retried it using CURL (or well, a CURL plugin for VSC :P )

POST https://circleci.com/api/v2/project/gh/team/repo/pipeline
Circle-Token: personal_token
content-type: application/json

{
    "branch":"feature/branch",
    "parameters":
    {
        "GHA_Actor":"RicardoMonteiroSimoes",
        "GHA_Action":"cci_system_tests",
        "GHA_Event":"pull_request"
    }
}

And this returns a 201, and starts the tests. So there must be something broken with this action!

RicardoMonteiroSimoes avatar Aug 14 '23 09:08 RicardoMonteiroSimoes

having the same problem.

aimuz avatar Feb 03 '24 09:02 aimuz

Getting the exact same error.

sergionettl avatar Feb 08 '24 10:02 sergionettl