From 524357036b9e6cded1076e6b080f358c0cdaa9b0 Mon Sep 17 00:00:00 2001 From: Joshua Gilman Date: Wed, 23 Oct 2024 08:47:09 -0700 Subject: [PATCH 01/12] fix: uses correct id in argocd container --- .github/workflows/release.yml | 10 ++++++++++ tools/argocd/Earthfile | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 68f5045..d882183 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -75,5 +75,15 @@ jobs: args: ${{ matrix.release.project }} ${{ matrix.release.name }} local: ${{ inputs.local }} verbosity: ${{ inputs.verbosity }} + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: Release Temp + uses: input-output-hk/catalyst-forge/actions/run@master + if: matrix.release.project == './tools/argocd' + with: + command: release + args: --force ${{ matrix.release.project }} ${{ matrix.release.name }} + local: ${{ inputs.local }} + verbosity: ${{ inputs.verbosity }} env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file diff --git a/tools/argocd/Earthfile b/tools/argocd/Earthfile index c5e438b..fc4fab5 100644 --- a/tools/argocd/Earthfile +++ b/tools/argocd/Earthfile @@ -20,7 +20,7 @@ docker: ARG TARGETARCH ARG USERPLATFORM - RUN useradd -m argocd + RUN useradd -m -u 999 argocd USER argocd WORKDIR /home/argocd From 85a855d32a843d6d85300dec360b6301ae66cf7d Mon Sep 17 00:00:00 2001 From: Joshua Gilman Date: Wed, 23 Oct 2024 09:06:57 -0700 Subject: [PATCH 02/12] wip: fix --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 524f518..c83eb62 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -150,7 +150,7 @@ jobs: earthly_token: ${{ secrets.earthly_token }} deploy: - uses: input-output-hk/catalyst-forge/.github/workflows/deploy.yml@master + uses: input-output-hk/catalyst-forge/.github/workflows/deploy.yml@fix-argo-container needs: [discover, check, build, test, release] if: (fromJson(needs.discover.outputs.deployments)[0] != null) && github.ref == format('refs/heads/{0}', github.event.repository.default_branch) && !failure() && !cancelled() with: From d018c20edc67b3375712d2e5c5d7eb3b694beeb9 Mon Sep 17 00:00:00 2001 From: Joshua Gilman Date: Wed, 23 Oct 2024 09:24:04 -0700 Subject: [PATCH 03/12] wip: fix --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c83eb62..42510c3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -138,7 +138,7 @@ jobs: earthly_token: ${{ secrets.earthly_token }} release: - uses: input-output-hk/catalyst-forge/.github/workflows/release.yml@master + uses: input-output-hk/catalyst-forge/.github/workflows/release.yml@fix-argo-container needs: [discover, check, build, test] if: (fromJson(needs.discover.outputs.releases)[0] != null) && !failure() && !cancelled() with: @@ -150,7 +150,7 @@ jobs: earthly_token: ${{ secrets.earthly_token }} deploy: - uses: input-output-hk/catalyst-forge/.github/workflows/deploy.yml@fix-argo-container + uses: input-output-hk/catalyst-forge/.github/workflows/deploy.yml@master needs: [discover, check, build, test, release] if: (fromJson(needs.discover.outputs.deployments)[0] != null) && github.ref == format('refs/heads/{0}', github.event.repository.default_branch) && !failure() && !cancelled() with: From 9aac7a90fb30c662e4a773e903e564eed1076533 Mon Sep 17 00:00:00 2001 From: Joshua Gilman Date: Wed, 23 Oct 2024 09:58:15 -0700 Subject: [PATCH 04/12] fix: adds ca certs --- tools/argocd/Earthfile | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/argocd/Earthfile b/tools/argocd/Earthfile index fc4fab5..52d045e 100644 --- a/tools/argocd/Earthfile +++ b/tools/argocd/Earthfile @@ -20,6 +20,7 @@ docker: ARG TARGETARCH ARG USERPLATFORM + RUN apt-get update && apt-get install -y ca-certificates RUN useradd -m -u 999 argocd USER argocd From b96428cc57920959ad9bb159f6c655573b364272 Mon Sep 17 00:00:00 2001 From: benbooth493 Date: Thu, 24 Oct 2024 11:36:06 +0100 Subject: [PATCH 05/12] Add init.sh script --- tools/argocd/Earthfile | 4 ++-- tools/argocd/helpers/init.sh | 16 ++++++++++++++++ 2 files changed, 18 insertions(+), 2 deletions(-) create mode 100644 tools/argocd/helpers/init.sh diff --git a/tools/argocd/Earthfile b/tools/argocd/Earthfile index 52d045e..e7196ed 100644 --- a/tools/argocd/Earthfile +++ b/tools/argocd/Earthfile @@ -37,7 +37,7 @@ docker: RUN mkdir -p cmp-server/config COPY plugin.yml cmp-server/config/plugin.yaml + COPY init.sh /home/argocd/init.sh + ENTRYPOINT [ "/var/run/argocd/argocd-cmp-server" ] SAVE IMAGE ${container}:${tag} - - diff --git a/tools/argocd/helpers/init.sh b/tools/argocd/helpers/init.sh new file mode 100644 index 0000000..3d28779 --- /dev/null +++ b/tools/argocd/helpers/init.sh @@ -0,0 +1,16 @@ +#!/bin/bash + +set -o errexit +set -o nounset +set -o pipefail +set -o xtrace + +ACCOUNT_ID=$(echo "${AWS_ROLE_ARN}" | cut -d':' -f5) +mkdir -p /home/argocd/.docker +cat >/home/argocd/.docker/config.json < Date: Thu, 24 Oct 2024 11:41:28 +0100 Subject: [PATCH 06/12] Move to root --- tools/argocd/{helpers => }/init.sh | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename tools/argocd/{helpers => }/init.sh (100%) diff --git a/tools/argocd/helpers/init.sh b/tools/argocd/init.sh similarity index 100% rename from tools/argocd/helpers/init.sh rename to tools/argocd/init.sh From 2d6be7eb613b0629d2381029fac8c40685102e24 Mon Sep 17 00:00:00 2001 From: benbooth493 Date: Thu, 24 Oct 2024 11:52:05 +0100 Subject: [PATCH 07/12] Set execute bit --- tools/argocd/Earthfile | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/argocd/Earthfile b/tools/argocd/Earthfile index e7196ed..276180d 100644 --- a/tools/argocd/Earthfile +++ b/tools/argocd/Earthfile @@ -38,6 +38,7 @@ docker: COPY plugin.yml cmp-server/config/plugin.yaml COPY init.sh /home/argocd/init.sh + RUN chmod +x /home/argocd/init.sh ENTRYPOINT [ "/var/run/argocd/argocd-cmp-server" ] SAVE IMAGE ${container}:${tag} From 80a0230e0a2cf8a0b87f03090ea3fa7829c15fe6 Mon Sep 17 00:00:00 2001 From: Joshua Gilman Date: Thu, 24 Oct 2024 08:12:35 -0700 Subject: [PATCH 08/12] fix: try version 0.17.0 --- tools/argocd/Earthfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/argocd/Earthfile b/tools/argocd/Earthfile index 276180d..700d191 100644 --- a/tools/argocd/Earthfile +++ b/tools/argocd/Earthfile @@ -3,7 +3,7 @@ VERSION 0.8 timoni: FROM golang:1.23.0 - ARG TIMONI_VERSION=v0.22.1 + ARG TIMONI_VERSION=v0.17.0 WORKDIR /work From cb1295e1c52f04c977e52c33673951f4d9717d78 Mon Sep 17 00:00:00 2001 From: Joshua Gilman Date: Thu, 24 Oct 2024 08:26:54 -0700 Subject: [PATCH 09/12] wip: adds ECR helper --- tools/argocd/Earthfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/argocd/Earthfile b/tools/argocd/Earthfile index 700d191..b31dd56 100644 --- a/tools/argocd/Earthfile +++ b/tools/argocd/Earthfile @@ -20,7 +20,7 @@ docker: ARG TARGETARCH ARG USERPLATFORM - RUN apt-get update && apt-get install -y ca-certificates + RUN apt-get update && apt-get install -y ca-certificates amazon-ecr-credential-helper RUN useradd -m -u 999 argocd USER argocd From 622f5b197dd5c1d51f5dcac7d8d8bd206d67706f Mon Sep 17 00:00:00 2001 From: benbooth493 Date: Tue, 29 Oct 2024 09:03:35 +0000 Subject: [PATCH 10/12] Bump version --- foundry/api/blueprint.cue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/foundry/api/blueprint.cue b/foundry/api/blueprint.cue index 00d8c23..00c6a9c 100644 --- a/foundry/api/blueprint.cue +++ b/foundry/api/blueprint.cue @@ -17,7 +17,7 @@ project: { environment: "dev" modules: main: { container: "foundry-api-deployment" - version: "0.1.0" + version: "0.1.1" values: { environment: name: "dev" server: image: { From e4c73cc34f3f4eefd477085ab3ded1f9cb281e3b Mon Sep 17 00:00:00 2001 From: Joshua Gilman Date: Tue, 29 Oct 2024 10:31:17 -0700 Subject: [PATCH 11/12] wip: adds debug flag --- tools/argocd/Earthfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/argocd/Earthfile b/tools/argocd/Earthfile index b31dd56..7616cd5 100644 --- a/tools/argocd/Earthfile +++ b/tools/argocd/Earthfile @@ -40,5 +40,5 @@ docker: COPY init.sh /home/argocd/init.sh RUN chmod +x /home/argocd/init.sh - ENTRYPOINT [ "/var/run/argocd/argocd-cmp-server" ] + ENTRYPOINT [ "/var/run/argocd/argocd-cmp-server", "--loglevel=info" ] SAVE IMAGE ${container}:${tag} From 6e6cc05b02b7d628c6cac12fd253bee034ea3e19 Mon Sep 17 00:00:00 2001 From: Joshua Gilman Date: Wed, 30 Oct 2024 18:05:47 -0700 Subject: [PATCH 12/12] wip: use always --- .github/workflows/release.yml | 10 ---------- tools/argocd/blueprint.cue | 5 +++-- 2 files changed, 3 insertions(+), 12 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index d882183..68f5045 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -75,15 +75,5 @@ jobs: args: ${{ matrix.release.project }} ${{ matrix.release.name }} local: ${{ inputs.local }} verbosity: ${{ inputs.verbosity }} - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - name: Release Temp - uses: input-output-hk/catalyst-forge/actions/run@master - if: matrix.release.project == './tools/argocd' - with: - command: release - args: --force ${{ matrix.release.project }} ${{ matrix.release.name }} - local: ${{ inputs.local }} - verbosity: ${{ inputs.verbosity }} env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file diff --git a/tools/argocd/blueprint.cue b/tools/argocd/blueprint.cue index 36e9ffa..74e8bf7 100644 --- a/tools/argocd/blueprint.cue +++ b/tools/argocd/blueprint.cue @@ -4,8 +4,9 @@ project: { release: { docker: { on: { - merge: {} - tag: {} + //merge: {} + //tag: {} + always: {} } config: { tag: _ @forge(name="GIT_COMMIT_HASH")