Skip to content

Commit c6e2490

Browse files
authored
fix: uses correct id in argocd container (#87)
1 parent 74a0df4 commit c6e2490

File tree

5 files changed

+28
-9
lines changed

5 files changed

+28
-9
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ jobs:
138138
earthly_token: ${{ secrets.earthly_token }}
139139

140140
release:
141-
uses: input-output-hk/catalyst-forge/.github/workflows/release.yml@master
141+
uses: input-output-hk/catalyst-forge/.github/workflows/release.yml@fix-argo-container
142142
needs: [discover, check, build, test]
143143
if: (fromJson(needs.discover.outputs.releases)[0] != null) && !failure() && !cancelled()
144144
with:

foundry/api/blueprint.cue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ project: {
1717
environment: "dev"
1818
modules: main: {
1919
container: "foundry-api-deployment"
20-
version: "0.1.0"
20+
version: "0.1.1"
2121
values: {
2222
environment: name: "dev"
2323
server: image: {

tools/argocd/Earthfile

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ VERSION 0.8
33
timoni:
44
FROM golang:1.23.0
55

6-
ARG TIMONI_VERSION=v0.22.1
6+
ARG TIMONI_VERSION=v0.17.0
77

88
WORKDIR /work
99

@@ -20,7 +20,8 @@ docker:
2020
ARG TARGETARCH
2121
ARG USERPLATFORM
2222

23-
RUN useradd -m argocd
23+
RUN apt-get update && apt-get install -y ca-certificates amazon-ecr-credential-helper
24+
RUN useradd -m -u 999 argocd
2425

2526
USER argocd
2627
WORKDIR /home/argocd
@@ -36,7 +37,8 @@ docker:
3637
RUN mkdir -p cmp-server/config
3738
COPY plugin.yml cmp-server/config/plugin.yaml
3839

39-
ENTRYPOINT [ "/var/run/argocd/argocd-cmp-server" ]
40-
SAVE IMAGE ${container}:${tag}
41-
40+
COPY init.sh /home/argocd/init.sh
41+
RUN chmod +x /home/argocd/init.sh
4242

43+
ENTRYPOINT [ "/var/run/argocd/argocd-cmp-server", "--loglevel=info" ]
44+
SAVE IMAGE ${container}:${tag}

tools/argocd/blueprint.cue

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,9 @@ project: {
44
release: {
55
docker: {
66
on: {
7-
merge: {}
8-
tag: {}
7+
//merge: {}
8+
//tag: {}
9+
always: {}
910
}
1011
config: {
1112
tag: _ @forge(name="GIT_COMMIT_HASH")

tools/argocd/init.sh

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#!/bin/bash
2+
3+
set -o errexit
4+
set -o nounset
5+
set -o pipefail
6+
set -o xtrace
7+
8+
ACCOUNT_ID=$(echo "${AWS_ROLE_ARN}" | cut -d':' -f5)
9+
mkdir -p /home/argocd/.docker
10+
cat >/home/argocd/.docker/config.json <<EOF
11+
{
12+
"credHelpers": {
13+
"${ACCOUNT_ID}.dkr.ecr.${AWS_REGION}.amazonaws.com": "ecr-login"
14+
}
15+
}
16+
EOF

0 commit comments

Comments
 (0)