Skip to content
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

chore(updatecli) add a manifest to bump kubectl with pattern #1046

Merged
merged 2 commits into from
Feb 13, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 56 additions & 0 deletions updatecli/updatecli.d/kubectl.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
---
name: Bump `kubectl` version

scms:
default:
kind: github
spec:
user: "{{ .github.user }}"
email: "{{ .github.email }}"
owner: "{{ .github.owner }}"
repository: "{{ .github.repository }}"
token: "{{ requiredEnv .github.token }}"
username: "{{ .github.username }}"
branch: "{{ .github.branch }}"

sources:
lastReleaseVersion:
kind: githubrelease
name: Get latest `kubectl` CLI version
transformers:
- trimprefix: "kubernetes-"
spec:
owner: "kubernetes"
repository: "kubectl"
token: "{{ requiredEnv .github.token }}"
username: "{{ .github.username }}"
versionfilter:
kind: regex
pattern: "^kubernetes-1.26.(\\d*)$"

targets:
updateVersion:
name: "Update `kubectl` version in the tools-versions.yml file"
sourceid: lastReleaseVersion
kind: yaml
spec:
file: provisioning/tools-versions.yml
key: $.kubectl_version
scmid: default
updateVersionInGoss:
name: Update `kubectl` version in the goss test
kind: yaml
spec:
file: goss/goss-common.yaml
key: $.command.kubectl.stdout[0]
scmid: default

actions:
default:
kind: github/pullrequest
title: Bump `kubectl` version to {{ source "lastReleaseVersion" }}
scmid: default
spec:
labels:
- dependencies
- kubectl