Skip to content

Commit 2df2b2b

Browse files
committed
WIP: Test dependabot on branches
Signed-off-by: Renê de Souza Pinto <rene@renesp.com.br>
1 parent ef82a3f commit 2df2b2b

File tree

2 files changed

+162
-0
lines changed

2 files changed

+162
-0
lines changed

.github/dependabot.yml

Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
---
2+
# .github/dependabot.yml: Config file for Dependabot
3+
# This file was automaticaly generated: DO NOT EDIT!
4+
#
5+
version: 2
6+
updates:
7+
# gomod ecosystem
8+
- package-ecosystem: "gomod"
9+
directories:
10+
- "pkg/debug/collect-info-test"
11+
- "pkg/dnsmasq/dnstest"
12+
- "pkg/edgeview"
13+
- "pkg/installer/src"
14+
- "pkg/kube/cert-gen"
15+
- "pkg/kube/cnirpc"
16+
- "pkg/kube/eve-bridge"
17+
- "pkg/kube/update-component"
18+
- "pkg/measure-config"
19+
- "pkg/newlog"
20+
- "pkg/pillar"
21+
- "pkg/recovertpm/src"
22+
- "pkg/rngd/cmd/rngd"
23+
- "pkg/vtpm/swtpm-vtpm"
24+
- "pkg/wwan/mmagent"
25+
schedule:
26+
interval: "daily"
27+
target-branch: "master"
28+
groups:
29+
dependencies:
30+
patterns:
31+
- "*"
32+
update-types:
33+
- "minor"
34+
- "patch"
35+
# gomod ecosystem
36+
- package-ecosystem: "gomod"
37+
directories:
38+
- "pkg/debug/collect-info-test"
39+
- "pkg/dnsmasq/dnstest"
40+
- "pkg/edgeview"
41+
- "pkg/installer/src"
42+
- "pkg/kube/cert-gen"
43+
- "pkg/kube/cnirpc"
44+
- "pkg/kube/eve-bridge"
45+
- "pkg/kube/update-component"
46+
- "pkg/measure-config"
47+
- "pkg/newlog"
48+
- "pkg/pillar"
49+
- "pkg/recovertpm/src"
50+
- "pkg/rngd/cmd/rngd"
51+
- "pkg/vtpm/swtpm-vtpm"
52+
- "pkg/wwan/mmagent"
53+
schedule:
54+
interval: "daily"
55+
target-branch: "14.5-stable"
56+
groups:
57+
dependencies:
58+
patterns:
59+
- "*"
60+
update-types:
61+
- "minor"
62+
- "patch"
63+
# gomod ecosystem
64+
- package-ecosystem: "gomod"
65+
directories:
66+
- "pkg/debug/collect-info-test"
67+
- "pkg/dnsmasq/dnstest"
68+
- "pkg/edgeview"
69+
- "pkg/installer/src"
70+
- "pkg/kube/cert-gen"
71+
- "pkg/kube/cnirpc"
72+
- "pkg/kube/eve-bridge"
73+
- "pkg/kube/update-component"
74+
- "pkg/measure-config"
75+
- "pkg/newlog"
76+
- "pkg/pillar"
77+
- "pkg/recovertpm/src"
78+
- "pkg/rngd/cmd/rngd"
79+
- "pkg/vtpm/swtpm-vtpm"
80+
- "pkg/wwan/mmagent"
81+
schedule:
82+
interval: "daily"
83+
target-branch: "13.4-stable"
84+
groups:
85+
dependencies:
86+
patterns:
87+
- "*"
88+
update-types:
89+
- "minor"
90+
- "patch"

tools/gen_dependabot.sh

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
#!/bin/sh
2+
3+
BRANCHES="master 14.5-stable 13.4-stable"
4+
5+
cat > .github/dependabot.yml <<EOF
6+
---
7+
# .github/dependabot.yml: Config file for Dependabot
8+
# This file was automaticaly generated: DO NOT EDIT!
9+
#
10+
version: 2
11+
updates:
12+
EOF
13+
14+
for branch in $BRANCHES; do
15+
# docker ecosystem
16+
# DPKGS=$(find pkg/ -maxdepth 2 -name "Dockerfile*" -exec dirname {} \; | sort -u)
17+
# echo " # Docker ecosystem" >> .github/dependabot.yml
18+
# for d in $DPKGS; do
19+
# pkg="$d"
20+
#cat >> .github/dependabot.yml <<EOF
21+
# - package-ecosystem: "docker"
22+
# directory: "$d"
23+
# schedule:
24+
# interval: "daily"
25+
# target-branch: "$branch"
26+
#EOF
27+
# done
28+
29+
# echo >> .github/dependabot.yml
30+
31+
# gomod ecosystem
32+
GPKGS=$(find pkg -name "go.mod" | grep -v vendor | sort -u | xargs dirname)
33+
echo " # gomod ecosystem" >> .github/dependabot.yml
34+
cat >> .github/dependabot.yml <<EOF
35+
- package-ecosystem: "gomod"
36+
directories:
37+
EOF
38+
for d in $GPKGS; do
39+
pkg="$d"
40+
cat >> .github/dependabot.yml <<EOF
41+
- "$d"
42+
EOF
43+
done
44+
cat >> .github/dependabot.yml <<EOF
45+
schedule:
46+
interval: "daily"
47+
target-branch: "$branch"
48+
groups:
49+
dependencies:
50+
patterns:
51+
- "*"
52+
update-types:
53+
- "minor"
54+
- "patch"
55+
EOF
56+
57+
# echo >> .github/dependabot.yml
58+
59+
# cargo ecosystem
60+
# CPKGS=$(find pkg -name "Cargo.toml" | grep -v vendor | sort -u | xargs dirname)
61+
# echo " # cargo ecosystem" >> .github/dependabot.yml
62+
# for d in $CPKGS; do
63+
# pkg="$d"
64+
#cat >> .github/dependabot.yml <<EOF
65+
# - package-ecosystem: "cargo"
66+
# directory: "$d"
67+
# schedule:
68+
# interval: "daily"
69+
# target-branch: "$branch"
70+
#EOF
71+
# done
72+
done

0 commit comments

Comments
 (0)