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

gitlab: allow configuring workflow run trigger criteria #432

Open
mvidalgarcia opened this issue Jan 26, 2022 · 1 comment
Open

gitlab: allow configuring workflow run trigger criteria #432

mvidalgarcia opened this issue Jan 26, 2022 · 1 comment

Comments

@mvidalgarcia
Copy link
Member

Current behavior

Currently, once a user enables the GitLab integration of one of their projects, a webhook is created. This webhook is configured in such a way that every time they push a new commit in the master branch or a merge request is created, a new REANA workflow run is triggered as long as there's a reana.yaml spec file in the repo root directory.

When the hook callback is called (POST /api/workflows), we handle the request taking into account if it was a push or a merge request by downloading the appropriate branch in order to create and submit the workflow.

GitLab API Project Hooks reference: https://docs.gitlab.com/ee/api/projects.html#hooks

Expected behavior

Ideally, the user should be able to configure under which conditions the REANA workflow CI is triggered. We could improve the GitLab webhook creation to pass options like tag_push_events (Trigger hook on tag push events.) so the CI is only run on tag creation.

To summarize, there're 3 criteria that the user should be able to toggle:

  • Push events (to master)
  • Merge requests events
  • Tag push events

The UI should be changed accordingly in order to allow this fine-grained configuration. A Toggle element, as we have now, is too limited. Perhaps we could keep the toggle to enable the integration and a cog icon that opens a modal with checkboxes to check/uncheck the other options. A brief UI mockup session is needed.

Ideas on how to represent this in the UI are welcome 🎨

@mdonadoni
Copy link
Member

Feature requested here: https://forum.reana.io/t/reana-cern-gitlab-questions/80

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Triage
Cluster next
Development

No branches or pull requests

3 participants