Skip to content

Commit

Permalink
Use updatecli to update version
Browse files Browse the repository at this point in the history
Signed-off-by: Manuel Buil <[email protected]>
  • Loading branch information
manuelbuil committed Feb 2, 2024
1 parent 928c7b9 commit 0c35fc8
Show file tree
Hide file tree
Showing 3 changed files with 68 additions and 3 deletions.
4 changes: 1 addition & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
ARG GO_IMAGE=rancher/hardened-build-base:v1.20.7b3
ARG TAG="v1.8.10"
ARG ARCH="amd64"
FROM ${GO_IMAGE} as base-builder
# setup required packages
RUN set -x && \
Expand All @@ -15,7 +13,7 @@ FROM base-builder as autoscaler-builder
ARG SRC=github.com/kubernetes-sigs/cluster-proportional-autoscaler
ARG PKG=github.com/kubernetes-sigs/cluster-proportional-autoscaler
RUN git clone --depth=1 https://${SRC}.git $GOPATH/src/${PKG}
ARG TAG="1.8.10"
ARG TAG=1.8.10
ARG ARCH="amd64"
WORKDIR $GOPATH/src/${PKG}
RUN git fetch --all --tags --prune
Expand Down
64 changes: 64 additions & 0 deletions updatecli/updatecli.d/updatednsnodecache.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
---
name: "Update autoscaler version"

sources:
autoscaler:
name: Get autoscaler version
kind: githubrelease
spec:
owner: kubernetes-sigs
repository: cluster-proportional-autoscaler
token: '{{ requiredEnv .github.token }}'
typefilter:
release: true
draft: false
prerelease: false
versionfilter:
kind: latest

targets:
dockerfile:
name: "Bump to latest autoscaler version in Dockerfile"
kind: dockerfile
scmid: default
sourceid: autoscaler
spec:
file: "Dockerfile"
instruction:
keyword: "ARG"
matcher: "TAG"

makefile:
name: "Bump to latest autoscaler version in Makefile"
kind: file
scmid: default
disablesourceinput: true
spec:
file: Makefile
matchpattern: '(?m)^TAG \?\= (.*)'
replacepattern: 'TAG ?= {{ source "autoscaler" }}$$(BUILD_META)'

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

actions:
default:
title: 'Bump autoscaler version to {{ source "autoscaler" }}'
kind: github/pullrequest
spec:
automerge: false
labels:
- chore
- skip-changelog
- status/auto-created
scmid: default

3 changes: 3 additions & 0 deletions updatecli/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,6 @@ github:
email: "41898282+github-actions[bot]@users.noreply.github.com"
username: "UPDATECLI_GITHUB_ACTOR"
token: "UPDATECLI_GITHUB_TOKEN"
repository: "image-build-cluster-proportional-autoscaler"
branch: "main"
owner: "rancher"

0 comments on commit 0c35fc8

Please sign in to comment.