Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci(actions): trigger E2E tests on CircleCI manually from GitHub Actions #8426

Closed
wants to merge 2 commits into from

Conversation

jijiechen
Copy link
Member

Checklist prior to review

  • Link to relevant issue as well as docs and UI issues
    • N/A
  • This will not break child repos: it doesn't hardcode values (.e.g "kumahq" as a image registry) and it will work on Windows, system specific functions like syscall.Mkfifo have equivalent implementation on the other OS
    • Confirmed
  • Tests (Unit test, E2E tests, manual test on universal and k8s)
    • Manually tested
    • Don't forget ci/ labels to run additional/fewer tests
      • Added
  • Do you need to update UPGRADE.md?
    • No need
  • Does it need to be backported according to the backporting policy? (this GH action will add "backport" label based on these file globs, if you want to prevent it from adding the "backport" label use no-backport-autolabel label)
    • No need

This PR adds the ability to trigger E2E tests on CircilCI manually from GitHub Actions.

@jijiechen jijiechen added ci/skip-test PR: Don't run unit and e2e tests (maybe this is just a doc change) no-backport-autolabel labels Nov 21, 2023
@jijiechen jijiechen requested a review from lahabana November 21, 2023 10:02
@jijiechen jijiechen self-assigned this Nov 21, 2023
@jijiechen jijiechen requested a review from a team as a code owner November 21, 2023 10:02
@jijiechen jijiechen requested review from bartsmykla and removed request for a team November 21, 2023 10:02
@jijiechen
Copy link
Member Author

jijiechen commented Nov 21, 2023

I'll update the PR later based on the suggestions on the previous PR at #8424
You may review the content of this PR first. @lahabana

@jijiechen jijiechen changed the title ci(actions): trigger E2E tests on CircilCI manually from GitHub Actions ci(actions): trigger E2E tests on CircleCI manually from GitHub Actions Nov 21, 2023
--header "x-attribution-login: ${{ github.actor }}" \
--header "x-attribution-actor-id: ${{ github.actor }}" \
--header "Circle-Token: ${{ inputs.secureCircleCIToken }}" \
--data "$BODY"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The reason we don't use: https://github.com/CircleCI-Public/trigger-circleci-pipeline-action is that we can't pass params? I guess the problem with this is that we don't block until completion no?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe instead of having parameters to the circleci job we should just read https://github.com/CircleCI-Public/trigger-circleci-pipeline-action/tree/main#gha_meta in the circleCI job ?s

Copy link
Member Author

@jijiechen jijiechen Nov 22, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right, we can't pass custom parameters using that action. That's why I call it manually. The GHA_Meta provides a way to pass custom parameters, we have to composite all params into one in this way, and we don't have a easy way to extract these params as part of the CircleCI workflow (using their setup job could be a way, that might require significant changes to the whole strcture).

In terms of blocking until completion, I believe that action does not provide this ability either. I read through the source code, and checkout of their readme, they are calling the same API with the one in my code and they only provide state of the just-created pipeline as an output as well.

For blocking until complete, we may laverage their other APIs to all workflows and periodically check latest state. Doc at https://circleci.com/docs/api/v2/index.html#operation/getWorkflowById

@jijiechen jijiechen closed this Nov 23, 2023
@jijiechen jijiechen deleted the gh-actions-e2e-pr branch November 27, 2023 09:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci/skip-test PR: Don't run unit and e2e tests (maybe this is just a doc change) no-backport-autolabel
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants