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

Use updatecli to update version #3

Merged
merged 1 commit into from
Feb 2, 2024
Merged
Show file tree
Hide file tree
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
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
rbrtbnfgl marked this conversation as resolved.
Show resolved Hide resolved
# 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 }}'
rbrtbnfgl marked this conversation as resolved.
Show resolved Hide resolved
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 }}'
rbrtbnfgl marked this conversation as resolved.
Show resolved Hide resolved
username: '{{ requiredEnv .github.username }}'
user: '{{ .github.user }}'
rbrtbnfgl marked this conversation as resolved.
Show resolved Hide resolved
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"