gitlab: allow configuring workflow run trigger criteria #432
Labels
community/lhcb
integration/gitlab
REANA-GitLab integration issues.
priority/soon
size/m
type/enhancement
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 areana.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:
master
)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 🎨
The text was updated successfully, but these errors were encountered: