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

Enable GH action for generating community operator PRs #18627

Closed
nickboldt opened this issue Dec 15, 2020 · 3 comments
Closed

Enable GH action for generating community operator PRs #18627

nickboldt opened this issue Dec 15, 2020 · 3 comments
Assignees
Labels
area/ci CI build and releases, PR testing, & whitelabel/productization issues kind/task Internal things, technical debt, and to-do tasks to be performed. severity/P2 Has a minor but important impact to the usage or development of the system.

Comments

@nickboldt
Copy link
Contributor

nickboldt commented Dec 15, 2020

Is your task related to a problem? Please describe.

Today, to generate community operator PRs, we need to manually run a script using a user who has permission to pull/pushche-operator, and submit a PR from che-incubator/community-operators to https://github.com/operator-framework/community-operators/pulls?q=%22Update+eclipse-che+operator%22+is%3Aopen

Manual steps are here:

./olm/prepare-community-operators-update.sh

https://github.com/eclipse/che-release/blob/master/README.md#phase-2---manual-steps

Describe the solution you'd like

Instead of a manual step, a GH action should be called when a push occurs in the che-operator.

Started working on such a GH action, but it's stuck trying to push the PR:

   - Push branch update-eclipse-che-upstream-operator-7.23.0 to https://github.com/che-incubator/community-operators.git
To https://github.com/che-incubator/community-operators.git
 ! [remote rejected]   update-eclipse-che-upstream-operator-7.23.0 -> update-eclipse-che-upstream-operator-7.23.0 (refusing to allow a Personal Access Token to create or update workflow `.github/workflows/deploy_image.yaml` without `workflow` scope)
error: failed to push some refs to 'https://github.com/che-incubator/community-operators.git'

Log: https://github.com/eclipse/che-operator/runs/1558228150?check_suite_focus=true

Source: https://github.com/eclipse/che-operator/blob/master/.github/workflows/release-community-operator-PRs.yml#L64

Additional context

See also:

@nickboldt nickboldt added the kind/task Internal things, technical debt, and to-do tasks to be performed. label Dec 15, 2020
@nickboldt nickboldt mentioned this issue Dec 15, 2020
12 tasks
@che-bot che-bot added the status/need-triage An issue that needs to be prioritized by the curator responsible for the triage. See https://github. label Dec 15, 2020
@nickboldt nickboldt added severity/P2 Has a minor but important impact to the usage or development of the system. area/ci CI build and releases, PR testing, & whitelabel/productization issues area/productization and removed status/need-triage An issue that needs to be prioritized by the curator responsible for the triage. See https://github. labels Dec 15, 2020
@nickboldt
Copy link
Contributor Author

nickboldt commented Dec 18, 2020

The plan Florent and I came up with was:

  • GH action in che-operator triggers API call to another action in community-operators and chectl repos, passing in correct che-incub-bot-token
  • GH action in community operators (workflow action) is triggered, generates PRs for the updated CSVs
  • GH action in chectl (workflow action) is triggered, generates PR for the chectl release
  • GH action in chectl (push action, optional workflow too) is triggered when the PR is merged, starting the push to GH releases page

So the big missing pieces are:

  • create new bot account for che-incubator-bot: DONE
  • get CHE_INCUBATOR_BOT_GITHUB_TOKEN and add it to the appropriate repos via api push: DONE
  • split the current che-operator community PRs action into two repos

@nickboldt
Copy link
Contributor Author

nickboldt commented Jan 18, 2021

We're done the 2 chectl actions:

However, the first one should be triggered by API call when operator release is done - maybe we can have it happen when a *-release branch is deleted? eclipse-che/che-operator#630

  • ON_PUSH, manual: Add action in che-operator to trigger chectl action above (via API call + incubator token) when operator release is done
  • ON_PUSH, manual: Existing action in che-operator triggers creation of community-operators PRs
    • verify working (set correct bot token)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/ci CI build and releases, PR testing, & whitelabel/productization issues kind/task Internal things, technical debt, and to-do tasks to be performed. severity/P2 Has a minor but important impact to the usage or development of the system.
Projects
None yet
Development

No branches or pull requests

3 participants