k3s/updatecli/updatecli.d/helm-controller.yaml
Guilherme Macedo 8f28de259c
Add initial Updatecli ADR automation (#6583)
* Add initial Updatecli ADR automation

Signed-off-by: Guilherme Macedo <guilherme.macedo@suse.com>
2023-01-03 12:56:08 -05:00

69 lines
1.7 KiB
YAML

---
name: "Bump Helm Controller version"
scms:
k3s:
kind: "github"
spec:
user: "{{ .github.user }}"
email: "{{ .github.email }}"
username: "{{ .github.username }}"
token: "{{ requiredEnv .github.token }}"
owner: "{{ .k3s.org }}"
repository: "{{ .k3s.repo }}"
branch: "{{ .k3s.branch }}"
commitmessage:
title: "Bump Helm Controller version"
actions:
github:
title: "Bump Helm Controller version"
kind: "github/pullrequest"
scmid: "k3s"
spec:
automerge: false
mergemethod: "squash"
usetitleforautomerge: true
sources:
helm-controller:
name: "Get Helm Controller latest release version"
kind: "githubrelease"
spec:
owner: "{{ .helm_controller.org }}"
repository: "{{ .helm_controller.repo }}"
branch: "{{ .helm_controller.branch }}"
token: "{{ requiredEnv .github.token }}"
versionfilter:
kind: "latest"
get-pwd:
name: "Run Updatecli execution directory"
kind: "shell"
disablesourceinput: true
spec:
command: 'pwd'
environments:
- name: PATH
conditions:
helm-controller:
name: "Check Helm Controller usage in go.mod"
kind: "file"
scmid: "k3s"
disablesourceinput: true
spec:
file: "go.mod"
matchpattern: 'github.com/k3s-io/helm-controller'
targets:
go-mod:
name: "Run go mod update"
kind: "shell"
scmid: "k3s"
disablesourceinput: true
spec:
command: '{{ source "get-pwd" }}/updatecli/scripts/run-go-mod-update.sh github.com/k3s-io/helm-controller@{{ source "helm-controller" }}'
environments:
- name: PATH
- name: HOME