Skip to content

Commit 37d6f60

Browse files
authored
feat: adds argocd cmp (#85)
1 parent 935d56b commit 37d6f60

File tree

4 files changed

+69
-1
lines changed

4 files changed

+69
-1
lines changed

blueprint.cue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ global: {
88
"^test(-.*)?$",
99
]
1010
registries: [
11-
ci.providers.aws.registry,
11+
"ghcr.io/input-output-hk/catalyst-forge",
1212
]
1313
providers: {
1414
aws: {

tools/argocd/Earthfile

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
VERSION 0.8
2+
3+
timoni:
4+
FROM golang:1.23.0
5+
6+
ARG TIMONI_VERSION=v0.22.1
7+
8+
WORKDIR /work
9+
10+
RUN go install github.com/stefanprodan/timoni/cmd/timoni@${TIMONI_VERSION}
11+
SAVE ARTIFACT /go/bin/timoni timoni
12+
13+
docker:
14+
FROM debian:bookworm-slim
15+
16+
ARG container="forge-argocd"
17+
ARG tag="latest"
18+
19+
ARG TARGETOS
20+
ARG TARGETARCH
21+
ARG USERPLATFORM
22+
23+
RUN useradd -m argocd
24+
25+
USER argocd
26+
WORKDIR /home/argocd
27+
28+
COPY +timoni/timoni /usr/local/bin/timoni
29+
COPY \
30+
--platform=$USERPLATFORM \
31+
(../../cli+build/forge \
32+
--GOOS=$TARGETOS \
33+
--GOARCH=$TARGETARCH \
34+
--version="argocd") /usr/local/bin/forge
35+
36+
RUN mkdir -p cmp-server/config
37+
COPY plugin.yml cmp-server/config/plugin.yaml
38+
39+
ENTRYPOINT [ "/var/run/argocd/argocd-cmp-server" ]
40+
SAVE IMAGE ${container}:${tag}
41+
42+

tools/argocd/blueprint.cue

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
version: "1.0"
2+
project: {
3+
name: "forge-argocd"
4+
release: {
5+
docker: {
6+
on: {
7+
merge: {}
8+
tag: {}
9+
}
10+
config: {
11+
tag: _ @forge(name="GIT_COMMIT_HASH")
12+
}
13+
}
14+
}
15+
}

tools/argocd/plugin.yml

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: forge-argocd
5+
spec:
6+
version: v1.0.0
7+
generate:
8+
command: [/usr/local/bin/forge]
9+
args: ["deploy", "template", "."]
10+
discover:
11+
fileName: "./blueprint.cue"

0 commit comments

Comments
 (0)