-
Notifications
You must be signed in to change notification settings - Fork 72
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
Feature request: Add git push option for arbitrary refspec #509
Comments
fluxcd/source-controller#1017 might help when implementing this. The |
We heavily use Gerrit in our team and suffer from not being able to create Gerrit changes, as described by @aristapimenta. When I try to configure |
I think adding refs would also allow Flux to work with GitLab, but we may need a lis of refs instead of just one item. cc @hiddeco |
GitLab integrations I was thinking about is different, and called "push options". See: |
@hiddeco then we can add ref name to IAC CRD same as we did with GitRepo and for push options we can have a separate field right? |
yes we can modify the CRD where the ref name would be specified under |
I vote for |
GitLab integrations I was thinking about is different, and called "push options". See:
Found this thread looking for a way to create Merge Requests via GitLab's push options. Very exciting! |
Looking forward to this feature as well for Gitlab! It looks like gogit supports |
Yes. If we vote for |
as i pointed out in today's community meeting, the most apt name is |
Eagerly waiting for this... |
Even if we get this feature in, I don't think image-automation-controller will be compatible with Gerrit. Gerrit uses the That is a big no-no in Flux, and one of the core reasons we use a library and don't shell out ourselves to push, pull, etc. |
@aryan9600 I've written my own messageTemplate that generates a Change-Id: ---
apiVersion: image.toolkit.fluxcd.io/v1beta1
kind: ImageUpdateAutomation
metadata:
name: flux-system-master
namespace: flux-system
spec:
interval: 1m0s
sourceRef:
kind: GitRepository
name: flux-system
namespace: flux-system
git:
checkout:
ref:
branch: master
push:
branch: master
commit:
author:
email: flux@localdomain
name: flux
messageTemplate: |
Perform automatic image update
Automation name: {{ .AutomationObject }}
Files:
{{ range $filename, $_ := .Updated.Files -}}
- {{ $filename }}
{{ end }}
Objects:
{{ range $resource, $_ := .Updated.Objects -}}
- {{ $resource.Kind }} {{ $resource.Name }}
{{ end }}
Images:
{{ range .Updated.Images -}}
- {{ . }}
{{ end }}
{{- $ChangeId := .AutomationObject -}}
{{- $ChangeId = printf "%s%s" $ChangeId ( .Updated.Files | toString ) -}}
{{- $ChangeId = printf "%s%s" $ChangeId ( .Updated.Objects | toString ) -}}
{{- $ChangeId = printf "%s%s" $ChangeId ( .Updated.Images | toString ) }}
Change-Id: {{ printf "I%s" ( sha256sum $ChangeId | trunc 40 ) }} |
okay, then please follow the instructions provided in #514 (comment) and see if it works for you. |
I will likely do this once back from a long vacation. Thank you for your assistance @aryan9600! |
@brovoca did you get a chance to try it out? |
Sorry, not yet, just came back from vacation. Not sure when I'll have a moment |
Hi, in my company we use Gerrit, and there's a special reference which opens the equivalent of merge/pull requests when commits are pushed to this reference:
It would be really great if we could specify such arbitrary reference, maybe like this:
The text was updated successfully, but these errors were encountered: