From c195d93c7f346bd316ea224ade17f469cc591ac9 Mon Sep 17 00:00:00 2001 From: ptownley Date: Tue, 21 Apr 2026 08:18:21 +0100 Subject: [PATCH 1/4] attempt to run CI --- .github/workflows/ci.yml | 18 +++++----- .github/workflows/ms-qc.yml | 66 ++++++++++++++++++++++++++++++++++ .github/workflows/ms-test.yml | 68 +++++++++++++++++++++++++++++++++++ .github/workflows/release.yml | 41 --------------------- 4 files changed, 143 insertions(+), 50 deletions(-) create mode 100644 .github/workflows/ms-qc.yml create mode 100644 .github/workflows/ms-test.yml delete mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e2704f7..d8ff9db 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,14 +1,14 @@ -# DO NOT EDIT THIS FILE DIRECTLY! -# This is synced from the juno-fx/ci repository in the .microservice/workflows directory and should be modified there. -name: Microservice CI/CD +name: Microservice CI on: - push: - paths-ignore: - - '.github/**' - - 'crds/**' workflow_dispatch: workflow_call: + jobs: - ci: - uses: juno-fx/ci/.github/workflows/ms-ci.yml@main + QC: + uses: juno-fx/Orion-Py/.github/workflows/ms-qc.yml@10-enable-ci + secrets: inherit + Test: + needs: + - QC + uses: juno-fx/Orion-Py.github/workflows/ms-test.yml@10-enable-ci secrets: inherit diff --git a/.github/workflows/ms-qc.yml b/.github/workflows/ms-qc.yml new file mode 100644 index 0000000..a59126d --- /dev/null +++ b/.github/workflows/ms-qc.yml @@ -0,0 +1,66 @@ +name: Quality Control +on: + workflow_dispatch: + workflow_call: + +jobs: + check: + name: Checking Code + env: + IN_CI: "true" + runs-on: + - STANDARD-RUNNER + steps: + # this is the bare minimum to get the runner up and running. + - name: Install Git + run: sudo apt update && sudo apt-get install git -y + + - name: Generate a token + id: generate-token + uses: actions/create-github-app-token@v2 + with: + app-id: ${{ secrets.JUNO_CI_APP_ID }} + private-key: ${{ secrets.JUNO_CI_APP_PRIVATE_KEY }} + owner: ${{ github.repository_owner }} + + - name: Clone Source Code + uses: actions/checkout@v4 + with: + submodules: 'true' + token: ${{ steps.generate-token.outputs.token }} + + - name: Install Actions + uses: actions/checkout@v4 + with: + repository: juno-fx/ci + ref: main + path: juno-ci + clean: false + token: ${{ steps.generate-token.outputs.token }} + + - uses: ./juno-ci/actions/runners/tooling + name: Prepare Runner + with: + key: ${{ secrets.AWS_ACCESS }} + secret: ${{ secrets.AWS_SECRET }} + region: ${{ secrets.AWS_REGION }} + + - name: Safety Devbox + run: | + # safety net for new runners who already ship with podman override for docker and kind. + devbox rm docker kind || echo "No docker or kind present. Good to go." + + - name: Check Code + shell: bash + env: + GH_TOKEN: ${{ secrets.GIT_PASS }} + IN_CI: "true" + run: | + if [ -z "$GH_TOKEN" ]; then + echo "Token missing" + exit 1 + else + echo "Token present" + fi + devbox run make install + devbox run make check diff --git a/.github/workflows/ms-test.yml b/.github/workflows/ms-test.yml new file mode 100644 index 0000000..d1a1875 --- /dev/null +++ b/.github/workflows/ms-test.yml @@ -0,0 +1,68 @@ +name: Testing +on: + workflow_dispatch: + workflow_call: + +jobs: + test: + name: Testing + env: + IN_CI: "true" + runs-on: + - STANDARD-RUNNER + steps: + # this is the bare minimum to get the runner up and running. + - name: Install Git + run: sudo apt update && sudo apt-get install git -y + + - name: Generate a token + id: generate-token + uses: actions/create-github-app-token@v2 + with: + app-id: ${{ secrets.JUNO_CI_APP_ID }} + private-key: ${{ secrets.JUNO_CI_APP_PRIVATE_KEY }} + owner: ${{ github.repository_owner }} + + - name: Clone Source Code + uses: actions/checkout@v4 + with: + submodules: 'true' + token: ${{ steps.generate-token.outputs.token }} + + - name: Install Actions + uses: actions/checkout@v4 + with: + repository: juno-fx/ci + ref: main + path: juno-ci + clean: false + token: ${{ steps.generate-token.outputs.token }} + + - uses: ./juno-ci/actions/runners/tooling + name: Prepare Runner + with: + key: ${{ secrets.AWS_ACCESS }} + secret: ${{ secrets.AWS_SECRET }} + region: ${{ secrets.AWS_REGION }} + + - name: Safety Devbox + run: | + # safety net for new runners who already ship with podman override for docker and kind. + devbox rm docker kind || echo "No docker or kind present. Good to go." + + - name: Run pnpm audit + env: + JUNO_LICENSE_TOKEN: ${{ secrets.JUNO_LICENSE_TOKEN }} + GH_TOKEN: ${{ secrets.GIT_PASS }} + IN_CI: "true" + if: contains(fromJSON('["juno-fx/hubble","juno-fx/genesis"]'), github.repository) + run: devbox run make audit + + - name: Run Tests + env: + JUNO_LICENSE_TOKEN: ${{ secrets.JUNO_LICENSE_TOKEN }} + GH_TOKEN: ${{ secrets.GIT_PASS }} + IN_CI: "true" + run: | + devbox run make down + devbox run make test diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml deleted file mode 100644 index 388742c..0000000 --- a/.github/workflows/release.yml +++ /dev/null @@ -1,41 +0,0 @@ -# DO NOT EDIT THIS FILE DIRECTLY! -# This is synced from the juno-fx/ci repository in the .microservice/workflows directory and should be modified there. -name: Microservice Tagged Release -on: - workflow_dispatch: - inputs: - bump: - type: choice - description: What to bump by. - default: patch - options: - - patch - - minor - - major -jobs: - StableReleaseProtection: - runs-on: - - self-hosted - steps: - - name: Fail of not on main - if: github.event_name == 'workflow_dispatch' && github.ref != 'refs/heads/main' - run: | - echo "Not on main branch, exiting..." - exit 1 - QC: - needs: - - StableReleaseProtection - uses: juno-fx/ci/.github/workflows/ms-qc.yml@main - secrets: inherit - Test: - needs: - - QC - uses: juno-fx/ci/.github/workflows/ms-test.yml@main - secrets: inherit - Tag: - needs: - - Test - uses: juno-fx/ci/.github/workflows/bumpversion.yml@main - secrets: inherit - with: - bump: ${{ inputs.bump }} From e8d73b5b424b25fcc3c070762624a6ed78d64ceb Mon Sep 17 00:00:00 2001 From: app/github-actions Date: Tue, 21 Apr 2026 07:18:31 +0000 Subject: [PATCH 2/4] pr commit From 885c7c2ccfe2bc1cce585b3d9db218558db621c0 Mon Sep 17 00:00:00 2001 From: ptownley Date: Tue, 21 Apr 2026 08:26:10 +0100 Subject: [PATCH 3/4] use local files --- .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 d8ff9db..4bc0f72 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -5,10 +5,10 @@ on: jobs: QC: - uses: juno-fx/Orion-Py/.github/workflows/ms-qc.yml@10-enable-ci + uses: ./.github/workflows/ms-qc.yml secrets: inherit Test: needs: - QC - uses: juno-fx/Orion-Py.github/workflows/ms-test.yml@10-enable-ci + uses: ./.github/workflows/ms-test.yml secrets: inherit From 54c6ac0c23b06cc9dd00d45793ff07db328d7592 Mon Sep 17 00:00:00 2001 From: ptownley Date: Tue, 21 Apr 2026 08:56:25 +0100 Subject: [PATCH 4/4] Use a tagged version of rhea --- k8s/testservice/deployment.yaml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/k8s/testservice/deployment.yaml b/k8s/testservice/deployment.yaml index e7ee572..fb352b4 100644 --- a/k8s/testservice/deployment.yaml +++ b/k8s/testservice/deployment.yaml @@ -20,7 +20,10 @@ spec: - containerPort: 3000 name: http - name: rhea - image: junoinnovations/rhea:unstable + image: junoinnovations/rhea:v1.0.0 + env: + - name: LOGLEVEL + value: debug ports: - containerPort: 13000 name: auth