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) cleanup manifests #23

Merged
merged 1 commit into from
Aug 20, 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
52 changes: 52 additions & 0 deletions updatecli/updatecli.d/golang.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
---
name: Bump Golang 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:
latestGoVersion:
name: Get latest Golang version
kind: golang

conditions:
checkForDockerImage:
name: "Check for a Docker image golang:<versions> used by the Makefile"
kind: dockerimage
disablesourceinput: true
spec:
architectures:
- amd64
- arm64
image: golang
tag: '{{ source "latestGoVersion" }}'

targets:
updateDockerfile:
name: Bump Golang version to {{ source `latestGoVersion` }}
kind: dockerfile
spec:
file: Dockerfile
instruction:
keyword: "FROM"
matcher: "golang"
scmid: default

actions:
default:
kind: github/pullrequest
scmid: default
title: Bump Golang version to {{ source "latestGoVersion" }}
spec:
labels:
- dependencies
- golang
29 changes: 17 additions & 12 deletions updatecli/updatecli.d/mirrorbits.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: "Bump mirrorbits version"
name: "Bump mirrorbits version"

scms:
default:
Expand All @@ -16,12 +16,18 @@ scms:
sources:
latestRelease:
name: Get latest mirrorbits release version
kind: githubRelease
## Since https://github.com/jenkins-infra/docker-mirrorbits/pull/18, we do not use a fixed mirrorbits tags but
## a custom reference to allow us building for arm64, until we have a new release (https://github.com/etix/mirrorbits/issues/179).
# kind: githubrelease
# spec:
# owner: "etix"
# repository: "mirrorbits"
# token: "{{ requiredEnv .github.token }}"
# username: "{{ .github.username }}"
kind: shell
spec:
owner: "etix"
repository: "mirrorbits"
token: "{{ requiredEnv .github.token }}"
username: "{{ .github.username }}"
command: echo '955a8b2e1aacea1cae06396a64afbb531ceb36d4'

# no need for condition to check if the docker image is published as we're downloading mirrorbits from github in the Dockerfile

targets:
Expand All @@ -33,14 +39,13 @@ targets:
instruction:
keyword: "ARG"
matcher: "mirrorbits_version"
scmID: default
scmid: default

pullrequests:
actions:
default:
kind: github
scmID: default
targets:
- updateReleaseInDockerfile
kind: github/pullrequest
title: Bump mirrorbits version to {{ source `latestRelease` }}
scmid: default
spec:
labels:
- dependencies
Expand Down
20 changes: 9 additions & 11 deletions updatecli/updatecli.d/tini.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
title: "Bump tini version"
---
name: "Bump tini version"

scms:
default:
Expand All @@ -13,17 +14,15 @@ scms:
branch: "{{ .github.branch }}"

sources:
latestRelease:
lastVersion:
name: Get Latest tini release version
kind: githubRelease
kind: githubrelease
spec:
owner: "krallin"
repository: "tini"
token: "{{ requiredEnv .github.token }}"
username: "{{ .github.username }}"

# no need for condition to check if the docker image is published as we're downloading tini from github in the Dockerfile

targets:
updateReleaseInDockerfile:
name: Update the version of tini in the Dockerfile
Expand All @@ -33,14 +32,13 @@ targets:
instruction:
keyword: "ARG"
matcher: "tini_version"
scmID: default
scmid: default

pullrequests:
actions:
default:
kind: github
scmID: default
targets:
- updateReleaseInDockerfile
kind: github/pullrequest
title: Bump tini version to {{ source `lastVersion` }}
scmid: default
spec:
labels:
- dependencies
Expand Down