1
0
mirror of synced 2026-02-06 19:05:55 +00:00

Add repo path and push branch to image update cmd

Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
This commit is contained in:
Stefan Prodan
2021-03-17 17:30:57 +02:00
committed by Hidde Beydals
parent b6a8163dd9
commit d9331b0c91
2 changed files with 84 additions and 14 deletions

View File

@@ -9,7 +9,31 @@ An ImageUpdateAutomation object specifies an automated update to images
mentioned in YAMLs in a git repository.
```
flux create image update <name> [flags]
flux create image update [name] [flags]
```
### Examples
```
# Configure image updates for the main repository created by flux bootstrap
flux create image update flux-system \
--git-repo-ref=flux-system \
--git-repo-path="./clusters/my-cluster" \
--checkout-branch=main \
--author-name=flux \
--author-email=flux@example.com \
--commit-template="{{range .Updated.Images}}{{println .}}{{end}}"
# Configure image updates to push changes to a different branch, if the branch doesn't exists it will be created
flux create image update flux-system \
--git-repo-ref=flux-system \
--git-repo-path="./clusters/my-cluster" \
--checkout-branch=main \
--push-branch=image-updates \
--author-name=flux \
--author-email=flux@example.com \
--commit-template="{{range .Updated.Images}}{{println .}}{{end}}"
```
### Options
@@ -17,10 +41,12 @@ flux create image update <name> [flags]
```
--author-email string the email to use for commit author
--author-name string the name to use for commit author
--branch string the branch to checkout and push commits to
--checkout-branch string the branch to checkout
--commit-template string a template for commit messages
--git-repo-ref string the name of a GitRepository resource with details of the upstream git repository
--git-repo-path string path to the directory containing the manifests to be updated, defaults to the repository root
--git-repo-ref string the name of a GitRepository resource with details of the upstream Git repository
-h, --help help for update
--push-branch string the branch to push commits to, defaults to the checkout branch if not specified
```
### Options inherited from parent commands