-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use updatecli to update the build base image
Signed-off-by: Manuel Buil <[email protected]>
- Loading branch information
1 parent
a26a56e
commit 69892ef
Showing
1 changed file
with
78 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
--- | ||
name: "Update build base version" | ||
|
||
sources: | ||
gomod: | ||
name: Get latest Golang version based on go.mod | ||
kind: file | ||
spec: | ||
file: https://raw.githubusercontent.com/kubernetes-sigs/cluster-proportional-autoscaler/master/go.mod | ||
matchpattern: 'go ([0-9]+\.[0-9]+)' | ||
transformers: | ||
- trimprefix: "go " | ||
|
||
buildbase: | ||
name: Get build base version | ||
kind: githubrelease | ||
dependson: | ||
- "gomod" | ||
spec: | ||
owner: rancher | ||
repository: image-build-base | ||
token: '{{ requiredEnv .github.token }}' | ||
typefilter: | ||
release: true | ||
draft: false | ||
prerelease: false | ||
versionfilter: | ||
kind: regex | ||
pattern: '{{ source "gomod"}}\.\S+' | ||
|
||
targets: | ||
dockerfile: | ||
name: "Bump to latest build base version in Dockerfile" | ||
kind: dockerfile | ||
scmid: default | ||
sourceid: buildbase | ||
spec: | ||
file: Dockerfile | ||
instruction: | ||
keyword: ARG | ||
matcher: "GO_IMAGE" | ||
transformers: | ||
- addprefix: "rancher/hardened-build-base:" | ||
|
||
drone: | ||
name: "Bump to latest build base version in Dockerfile" | ||
kind: file | ||
scmid: default | ||
disablesourceinput: true | ||
spec: | ||
file: .drone.yml | ||
matchpattern: '(?m)^ image: rancher/hardened-build-base:(.*)' | ||
replacepattern: ' image: rancher/hardened-build-base:{{ source "buildbase" }}' | ||
|
||
scms: | ||
default: | ||
kind: github | ||
spec: | ||
token: '{{ requiredEnv .github.token }}' | ||
username: '{{ .github.username }}' | ||
user: '{{ .github.user }}' | ||
email: '{{ .github.email }}' | ||
owner: '{{ .github.owner }}' | ||
repository: '{{ .github.repository }}' | ||
branch: '{{ .github.branch }}' | ||
|
||
actions: | ||
default: | ||
title: 'Bump build base version to {{ source "buildbase" }}' | ||
kind: github/pullrequest | ||
spec: | ||
automerge: false | ||
labels: | ||
- chore | ||
- skip-changelog | ||
- status/auto-created | ||
scmid: default | ||
|