You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/spec/v1beta1/imageupdateautomations.md
+85-3Lines changed: 85 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -398,6 +398,7 @@ spec:
398
398
name: fluxcdbot
399
399
```
400
400
There are over 70 available functions. Some of them are defined by the [Go template language](https://pkg.go.dev/text/template) itself. Most of the others are part of the [Sprig template library](http://masterminds.github.io/sprig/).
401
+
401
402
### Push
402
403
403
404
The optional `push` field defines how commits are pushed to the origin.
@@ -463,21 +464,102 @@ spec:
463
464
branch: auto
464
465
```
465
466
466
-
In the following snippet, updates and commits will be made on the `auto` branch locally.
467
-
The commits will be then pushed to the `auto` branch and then using the `refs/heads/auto:refs/heads/main`
468
-
refspec:
467
+
In the following snippet, updates and commits will be made on the `main` branch locally.
468
+
The commits will be then pushed using the `refs/heads/main:refs/heads/auto` refspec:
469
469
470
470
```yaml
471
471
spec:
472
472
git:
473
473
checkout:
474
474
ref:
475
475
branch: main
476
+
push:
477
+
refspec: refs/heads/main:refs/heads/auto
478
+
```
479
+
480
+
#### Gerrit
481
+
482
+
483
+
[Gerrit](https://www.gerritcodereview.com/) operates differently from a
484
+
standard Git server. Rather than sending individual commits to a branch,
485
+
all changes are bundled into a single commit. This commit requires a distinct
486
+
identifier separate from the commit SHA. Additionally, instead of initiating
487
+
a Pull Request between branches, the commit is pushed using a refspec:
488
+
`HEAD:refs/for/main`.
489
+
490
+
As the image-automation-controller is primarily designed to work with
491
+
standard Git servers, these special characteristics necessitate a few
492
+
workarounds. The following is an example configuration that works
This instructs the image-automation-controller to clone the repository using the
533
+
`main`branch but execute its update logic and commit with the provided message
534
+
template on the `auto` branch. Commits are then pushed to the `auto` branch,
535
+
followed by pushing the `HEAD` of the `auto` branch to the `HEAD` of the remote
536
+
`main`branch. The message template ensures the inclusion of a [Change-Id](https://gerrit-review.googlesource.com/Documentation/concept-changes.html#change-id)
0 commit comments