-
Notifications
You must be signed in to change notification settings - Fork 132
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
feat: workflow_dispatch approach for GitLab #660
Comments
I am also trying to close the Feedback Loop from Flux to GitLab. Unfortunately, GitLab doesn't provide any action on a commit status change 😔. Another option would be to use a Post-Deployment Job that triggers the GitLab Pipeline. But I think it would be nice to have this feature built into flux since I imagine it is a common use case. To use the forwarder, a proxy would be required to translate the event from the flux provider to a valid GitLab webhook request. Couldn't we create a GitLab Pipeline Trigger Provider that does this? I have something like this in mind. ---
apiVersion: notification.toolkit.fluxcd.io/v1beta3
kind: Provider
metadata:
name: gitlab-trigger
spec:
type: gitlabtrigger
address: # https://gitlab.example.com/api/v4/projects/<project_id>/ref/<ref_name>/trigger/pipeline
secretRef:
name: #<token> with your pipeline trigger token.
---
apiVersion: notification.toolkit.fluxcd.io/v1beta3
kind: Alert
metadata:
name: gitlab-trigger
spec:
summary: "staging (us-west-2)"
providerRef:
name: gitlab-trigger
eventSeverity: info
eventSources:
- kind: Kustomization
name: 'podinfo'
eventMetadata: # could be used for optional CI/CD variables to be passed to the pipeline.
- key: 'cluster'
value: 'staging'
- key: 'region'
value: 'us-west-2' I am happy to provide a PR if we agree that this makes sense. |
We need for GitLab to tell us if the Pipeline Trigger is the right approach. CC @nagyv |
Hi! GitLab PM here. One GitLab team is working on https://gitlab.com/groups/gitlab-org/-/epics/10866 with the specific intent of supporting Flux integrations. Please, add you voice to the linked epic! |
I was wondering if there is something planned to add the
workflow_dispatch
approach for GitLab, as it is with GitHub->
notification-controller/internal/notifier/github_dispatch.go
Line 110 in 5500739
During my research I found this issue: https://forum.gitlab.com/t/workflow-dispatch-approach-in-gitlab-ci/72426, which states triggering a pipeline with passed in environment variables (aka payload)
Update: or will the forwarder with a POST to trigger a pipeline / job via webhook do it:
notification-controller/internal/notifier/forwarder.go
Line 80 in 5500739
Or does anyone have experience in implementing it? :)
The text was updated successfully, but these errors were encountered: