-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: update dependencies with UpdateCLI values
- Loading branch information
Showing
8 changed files
with
6,890 additions
and
11 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,43 @@ | ||
--- | ||
name: Updatecli | ||
|
||
on: | ||
# Trigger Updatecli if a new commit land on the main branch | ||
push: | ||
branches: [ main ] | ||
# Trigger Updatecli if a pullrequest is open targeting the main branch. | ||
# This is useful to test Updatecli manifest change | ||
pull_request: | ||
branches: [ main ] | ||
# Manually trigger Updatecli via GitHub UI | ||
workflow_dispatch: | ||
# Trigger Updatecli once day by a cronjob | ||
schedule: | ||
# * is a special character in YAML, so you have to quote this string | ||
# Run once a day | ||
- cron: '0 0 * * *' | ||
|
||
permissions: | ||
contents: "write" | ||
pull-requests: "write" | ||
|
||
jobs: | ||
updatecli: | ||
runs-on: "ubuntu-latest" | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Install Updatecli in the runner | ||
uses: updatecli/updatecli-action@v2 | ||
|
||
- uses: azure/setup-kubectl@v3 | ||
id: kubectl | ||
|
||
- uses: azure/setup-helm@v4.2.0 | ||
id: helm | ||
|
||
- name: Run Updatecli in apply mode | ||
run: "updatecli apply --config ./updatecli/updatecli.d --values updatecli/values.yaml" | ||
env: | ||
UPDATECLI_GITHUB_TOKEN: "${{ secrets.UPDATECLI_GITHUB_TOKEN }}" |
Large diffs are not rendered by default.
Oops, something went wrong.
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
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
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,72 @@ | ||
sources: | ||
lastGithubRelease: | ||
kind: githubrelease | ||
spec: | ||
owner: 'grafana' | ||
repository: 'agent' | ||
token: '{{ requiredEnv "UPDATECLI_GITHUB_TOKEN" }}' | ||
versionfilter: | ||
kind: semver | ||
|
||
targets: | ||
agent_image: | ||
name: Bump Agent image version | ||
kind: hcl | ||
scmid: github | ||
spec: | ||
file: 'locals.tf' | ||
path: 'locals.agent_version' | ||
transformers: | ||
- trimprefix: "v" | ||
operator_image: | ||
name: Bump Operator image version | ||
kind: yaml | ||
scmid: github | ||
spec: | ||
file: 'grafana/operator-values.yaml' | ||
key: '$.image.tag' | ||
module_version: | ||
name: Bump Operator module version | ||
kind: hcl | ||
scmid: github | ||
spec: | ||
file: 'locals.tf' | ||
path: 'locals.version' | ||
transformers: | ||
- trimprefix: "v" | ||
kubectl: | ||
name: run kubectl when chart values changed | ||
kind: shell | ||
scmid: github | ||
dependson: | ||
- operator_image | ||
dependsonchange: true | ||
disablesourceinput: true | ||
spec: | ||
command: "rm -rf grafana/charts ksm/charts && kubectl kustomize . -o grafana-agent.yaml --enable-helm" | ||
environments: | ||
- name: PATH | ||
|
||
scms: | ||
github: | ||
kind: "github" | ||
spec: | ||
user: "argoyle" | ||
email: "updatecli@opzkit.io" | ||
owner: "opzkit" | ||
repository: "terraform-aws-k8s-addons-grafana-agent-operator" | ||
token: '{{ requiredEnv "UPDATECLI_GITHUB_TOKEN" }}' | ||
username: 'UpdateCLI' | ||
branch: "main" | ||
|
||
# Define action configurations if one needs to be created | ||
actions: | ||
addon: | ||
kind: "github/pullrequest" | ||
scmid: "github" | ||
spec: | ||
automerge: true | ||
draft: false | ||
labels: | ||
- "dependencies" | ||
title: "Update Grafana Agent Operator version" |
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,54 @@ | ||
sources: | ||
lastRelease: | ||
kind: helmchart | ||
spec: | ||
url: 'https://grafana.github.io/helm-charts' | ||
name: 'grafana-agent-operator' | ||
|
||
targets: | ||
chart: | ||
name: bump chart version | ||
kind: yaml | ||
scmid: github | ||
spec: | ||
file: 'grafana/kustomization.yaml' | ||
key: '$.helmCharts[0].version' | ||
transformers: | ||
- addprefix: "'" | ||
- addsuffix: "'" | ||
kubectl: | ||
name: run kubectl when chart changed | ||
kind: shell | ||
scmid: github | ||
dependson: | ||
- chart | ||
dependsonchange: true | ||
disablesourceinput: true | ||
spec: | ||
command: "rm -rf grafana/charts ksm/charts && kubectl kustomize . -o grafana-agent.yaml --enable-helm" | ||
environments: | ||
- name: PATH | ||
|
||
scms: | ||
github: | ||
kind: "github" | ||
spec: | ||
user: "argoyle" | ||
email: "updatecli@opzkit.io" | ||
owner: "opzkit" | ||
repository: "terraform-aws-k8s-addons-grafana-agent-operator" | ||
token: '{{ requiredEnv "UPDATECLI_GITHUB_TOKEN" }}' | ||
username: 'UpdateCLI' | ||
branch: "main" | ||
|
||
# Define action configurations if one needs to be created | ||
actions: | ||
addon: | ||
kind: "github" | ||
scmid: "github" | ||
spec: | ||
automerge: true | ||
draft: false | ||
labels: | ||
- "dependencies" | ||
title: "Update Grafana Agent Operator version" |
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,55 @@ | ||
sources: | ||
lastRelease: | ||
kind: helmchart | ||
spec: | ||
url: 'https://prometheus-community.github.io/helm-charts' | ||
name: 'kube-state-metrics' | ||
|
||
targets: | ||
chart: | ||
name: bump chart version | ||
kind: yaml | ||
scmid: github | ||
spec: | ||
file: 'ksm/kustomization.yaml' | ||
key: '$.helmCharts[0].version' | ||
transformers: | ||
- addprefix: "'" | ||
- addsuffix: "'" | ||
kubectl: | ||
name: run kubectl when chart changed | ||
kind: shell | ||
scmid: github | ||
dependson: | ||
- chart | ||
dependsonchange: true | ||
disablesourceinput: true | ||
spec: | ||
command: "rm -rf grafana/charts ksm/charts && kubectl kustomize . -o grafana-agent.yaml --enable-helm" | ||
environments: | ||
- name: PATH | ||
|
||
scms: | ||
github: | ||
kind: "github" | ||
spec: | ||
user: "argoyle" | ||
email: "updatecli@opzkit.io" | ||
owner: "opzkit" | ||
repository: "terraform-aws-k8s-addons-grafana-agent-operator" | ||
token: '{{ requiredEnv "UPDATECLI_GITHUB_TOKEN" }}' | ||
username: 'UpdateCLI' | ||
branch: "main" | ||
|
||
# Define action configurations if one needs to be created | ||
actions: | ||
addon: | ||
kind: "github" | ||
scmid: "github" | ||
spec: | ||
automerge: true | ||
draft: false | ||
labels: | ||
- "dependencies" | ||
title: "Update Kube State Metrics version" | ||
|
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,4 @@ | ||
github: | ||
user: "UpdateCLI" | ||
email: "updatecli@opzkit.io" | ||
username: "github-actions" |