Skip to content

Commit 4b5fffa

Browse files
committed
add plugin.yaml file
1 parent 5a21225 commit 4b5fffa

File tree

3 files changed

+44
-0
lines changed

3 files changed

+44
-0
lines changed

Dockerfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ FROM ubuntu:kinetic
1010
LABEL "repository"="https://github.com/linuxsuren/github-action-workflow"
1111
LABEL "homepage"="https://github.com/linuxsuren/github-action-workflow"
1212

13+
RUN mkdir -p /home/argocd/cmp-server/config
1314
COPY --from=builder /workspace/gaw /usr/local/bin/gaw
15+
COPY --from=builder /workspace/plugin.yaml /home/argocd/cmp-server/config/plugin.yaml
1416

1517
CMD ["gaw"]

README.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,34 @@ GitHub Actions compatible workflows
88
```shell
99
gaw convert .github/workflows/pull-request.yaml
1010
```
11+
12+
## As CMP
13+
This repository could be [Config Management Plugin](https://argo-cd.readthedocs.io/en/stable/user-guide/config-management-plugins/#option-2-configure-plugin-via-sidecar) as well.
14+
15+
```yaml
16+
apiVersion: apps/v1
17+
kind: Deployment
18+
metadata:
19+
name: argocd-repo-server
20+
spec:
21+
template:
22+
spec:
23+
containers:
24+
- args:
25+
- --loglevel
26+
- debug
27+
command:
28+
- /var/run/argocd/argocd-cmp-server
29+
image: ghcr.io/linuxsuren/github-action-workflow:master
30+
imagePullPolicy: IfNotPresent
31+
name: tool
32+
resources: {}
33+
securityContext:
34+
runAsNonRoot: true
35+
runAsUser: 999
36+
volumeMounts:
37+
- mountPath: /var/run/argocd
38+
name: var-files
39+
- mountPath: /home/argocd/cmp-server/plugins
40+
name: plugins
41+
```

plugin.yaml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
apiVersion: argoproj.io/v1alpha1
2+
kind: ConfigManagementPlugin
3+
metadata:
4+
name: gaw-plugin
5+
spec:
6+
version: v1.0
7+
generate:
8+
command: [gaw, convert, '.github/workflows/pull-request.yaml']
9+
discover:
10+
fileName: "./.github/workflows/*.yaml"
11+
lockRepo: true

0 commit comments

Comments
 (0)