Skip to content

Commit

Permalink
.github: use renovate to manage tooling versions; cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
paulfantom committed Mar 1, 2022
1 parent 20a1063 commit 5f128fd
Show file tree
Hide file tree
Showing 11 changed files with 49 additions and 89 deletions.
3 changes: 0 additions & 3 deletions .github/env

This file was deleted.

20 changes: 20 additions & 0 deletions .github/renovate.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,32 @@
"config:base"
],
"assignees": ["paulfantom"],
"reviewers": ["paulfantom"],
"regexManagers": [
{
"fileMatch": "metal/group_vars/k3s.yml",
"matchStrings": ["k3s_version: (?<currentValue>.*?)\\n"],
"datasourceTemplate": "github-tags",
"depNameTemplate": "k3s-io/k3s"
},
{
"fileMatch": ["^\\.github\\/workflows\\/[^/]+\\.ya?ml$"],
"matchStrings": ["jsonnet-version:\\s(?<currentValue>.*?)\\n"],
"datasourceTemplate": "github-tags",
"depNameTemplate": "google/jsonnet"
},
{
"fileMatch": ["^\\.github\\/workflows\\/[^/]+\\.ya?ml$"],
"matchStrings": ["golang-version:\\s(?<currentValue>.*?)\\n"],
"datasourceTemplate": "golang-version",
"depNameTemplate": "golang"
}
],
"packageRules": [
{
"addLabels": ["github_actions"],
"groupName": "github actions",
"matchPaths": [".github/**"]
}
]
}
16 changes: 10 additions & 6 deletions .github/workflows/images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,23 @@ on:
pull_request:
branches: [master]

env:
golang-version: 1.17.7

jobs:
validate:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Import environment variables
run: cat ".github/env" >> $GITHUB_ENV
- name: Show env
run: echo $GITHUB_ENV
- uses: actions/setup-go@v3
with:
go-version: '${{ env.golang-version }}'
- run: go install github.com/brancz/gojsontoyaml@latest
- run: wget https://github.com/estesp/manifest-tool/releases/download/v1.0.3/manifest-tool-linux-amd64 -O /tmp/manifest-tool && chmod +x /tmp/manifest-tool && sudo mv /tmp/manifest-tool /usr/bin/
- run: sudo apt update && sudo apt install -y jq
- run: |
wget https://github.com/estesp/manifest-tool/releases/download/v1.0.3/manifest-tool-linux-amd64 -O /tmp/manifest-tool
chmod +x /tmp/manifest-tool
sudo mv /tmp/manifest-tool /usr/bin/
- run: |
sudo apt update
sudo apt install -y jq
- run: ./hack/checkimages.sh
7 changes: 3 additions & 4 deletions .github/workflows/kubeconform.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,14 @@ on:
pull_request:
branches: [master]

env:
golang-version: 1.17.7

jobs:
apps:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Import environment variables
run: cat ".github/env" >> $GITHUB_ENV
- uses: actions/setup-go@v3
with:
go-version: '${{ env.golang-version }}'
Expand All @@ -33,8 +34,6 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Import environment variables
run: cat ".github/env" >> $GITHUB_ENV
- uses: actions/setup-go@v3
with:
go-version: '${{ env.golang-version }}'
Expand Down
34 changes: 0 additions & 34 deletions .github/workflows/kubelint.yml

This file was deleted.

7 changes: 4 additions & 3 deletions .github/workflows/monitoring.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,21 @@ on:
pull_request:
branches: [master]

env:
golang-version: 1.17.7

jobs:
alertmanager:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Import environment variables
run: cat ".github/env" >> $GITHUB_ENV
- uses: actions/setup-go@v3
with:
go-version: '${{ env.golang-version }}'
- run: go install github.com/brancz/gojsontoyaml@latest
- run: go install -a github.com/prometheus/alertmanager/cmd/amtool@latest
- name: Unpack config
run: gojsontoyaml -yamltojson <apps/monitoring/manifests/alertmanager/secret.yaml | jq -rc '.spec.template.data["alertmanager.yaml"]' > alertmanager.yaml
run: gojsontoyaml -yamltojson <apps/monitoring/manifests/alertmanager/secret.yaml | jq -rc '.spec.template.data["alertmanager.yaml"]' > alertmanager.yaml
- name: Replace secrets
run: |
sed -i 's|$(SLACK_API_URL)|https://example.org|g' alertmanager.yaml
Expand Down
19 changes: 0 additions & 19 deletions .github/workflows/pluto.yml

This file was deleted.

7 changes: 3 additions & 4 deletions .github/workflows/prometheusrule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,19 @@ on:
pull_request:
branches: [master]

env:
golang-version: 1.17.7

jobs:
verify:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Import environment variables
run: cat ".github/env" >> $GITHUB_ENV
- uses: actions/setup-go@v3
with:
go-version: '${{ env.golang-version }}'
- run: go install github.com/brancz/gojsontoyaml@latest
#- run: go get -u github.com/prometheus/prometheus/cmd/promtool
- run: |
echo "HOSTNAME: $HOSTNAME"
- name: Download latest release of promtool
run: |
VERSION=$(curl -s https://api.github.com/repos/prometheus/prometheus/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3)}' | sed 's/v//')
Expand Down
8 changes: 3 additions & 5 deletions .github/workflows/secrets.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,14 @@ on:
pull_request:
branches: [master]

env:
golang-version: 1.17.7

jobs:
validate:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Import environment variables
run: cat ".github/env" >> $GITHUB_ENV
- uses: actions/setup-go@v3
with:
go-version: '${{ env.golang-version }}'
- run: go install github.com/brancz/gojsontoyaml@latest
- run: sudo apt update && sudo apt install -y jq
- run: make secrets
8 changes: 6 additions & 2 deletions .github/workflows/versions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,17 @@ on:
- cron: '15 */6 * * *'
#push:
# branch: main

env:
golang-version: 1.17.7
jsonnet-version: 0.18.0
jb-version: 3aec759b6a423f5b50751443ccc81e91a0887c02 # Commit from mid February 2022

jobs:
versions:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Import environment variables
run: cat ".github/env" >> $GITHUB_ENV
- uses: actions/setup-go@v3
with:
go-version: '${{ env.golang-version }}'
Expand Down
9 changes: 0 additions & 9 deletions .kubelinter.yaml

This file was deleted.

0 comments on commit 5f128fd

Please sign in to comment.