Skip to content

Commit 72b6c25

Browse files
jayfranco999dduportallemeurherve
authored
chore(updatecli): add OpenVPN certificate inventory manifest (#499)
* chore(updatecli): add OpenVPN certificate inventory manifest Signed-off-by: jayfranco999 <jaideepfrancis999@gmail.com> * fixup Signed-off-by: jayfranco999 <jaideepfrancis999@gmail.com> * fixup Signed-off-by: jayfranco999 <jaideepfrancis999@gmail.com> * fixup Signed-off-by: jayfranco999 <jaideepfrancis999@gmail.com> * remove `vpn` and `updatecli` labels --------- Signed-off-by: jayfranco999 <jaideepfrancis999@gmail.com> Co-authored-by: Damien Duportal <damien.duportal@gmail.com> Co-authored-by: Hervé Le Meur <91831478+lemeurherve@users.noreply.github.com>
1 parent 930777a commit 72b6c25

File tree

1 file changed

+50
-0
lines changed

1 file changed

+50
-0
lines changed
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
---
2+
name: "Sync OpenVPN certificate inventory from cert/pki/issued"
3+
scms:
4+
default:
5+
kind: github
6+
spec:
7+
user: "{{ .github.user }}"
8+
email: "{{ .github.email }}"
9+
owner: "{{ .github.owner }}"
10+
repository: "{{ .github.repository }}"
11+
token: "{{ requiredEnv .github.token }}"
12+
branch: "{{ .github.branch }}"
13+
14+
sources:
15+
certificatesList:
16+
name: "Discover OpenVPN certificate usernames"
17+
kind: shell
18+
spec:
19+
command: |
20+
set -eu
21+
for cert in cert/pki/issued/*.crt; do
22+
[ -e "$cert" ] || continue
23+
basename "$cert" .crt
24+
done | sort | paste -sd "," -
25+
26+
targets:
27+
updateCertificates:
28+
name: "Update certificate inventory in updatecli/values.yaml"
29+
kind: yaml
30+
sourceid: certificatesList
31+
spec:
32+
file: updatecli/values.yaml
33+
key: $.certificates
34+
scmid: default
35+
36+
actions:
37+
default:
38+
kind: github/pullrequest
39+
scmid: default
40+
spec:
41+
draft: true
42+
title: "chore(updatecli): sync OpenVPN certificate inventory"
43+
description: |
44+
This PR synchronizes the OpenVPN certificate inventory from the
45+
contents of `cert/pki/issued/`.
46+
47+
**Certificates discovered:**
48+
{{- range $cert := splitList "," (source "certificatesList") }}
49+
- `{{ $cert }}`
50+
{{- end }}

0 commit comments

Comments
 (0)