update workflow inputs, k8s namespace

- remove RUNNER_IMAGE because the cs-dist-tests image is dumb -- it clones the cs-dist-tests repo, checkouts the branch in BRANCH and then runs the release tests. So instead, always use the :latest image (which is built when there are commits to master)
- add the BRANCH workflow input so you can test cs-dist-test changes in the runner if needed
- remove COMMAND arg, it's always going to be 'dotnet test Tests/CodexReleaseTests'
- remove NAMESPACE env variable and just use 'default'. The cluster is ephermal and so all resources deployed are for the release tests, no namespaces needed.
This commit is contained in:
E M 2026-04-09 21:35:15 +10:00
parent 271d2aec51
commit 90d96a1a01
No known key found for this signature in database
2 changed files with 11 additions and 16 deletions

View File

@ -2,7 +2,7 @@ apiVersion: batch/v1
kind: Job
metadata:
name: ${NAMEPREFIX}
namespace: ${NAMESPACE}
namespace: default
labels:
name: ${NAMEPREFIX}
runid: ${RUNID}
@ -22,7 +22,7 @@ spec:
workload-type: "tests-runners-ci"
containers:
- name: runner
image: ${RUNNER_IMAGE}
image: logosstorage/cs-codex-dist-tests:latest
imagePullPolicy: Always
resources:
requests:
@ -32,8 +32,6 @@ spec:
value: "/opt/kubeconfig.yaml"
- name: LOGPATH
value: "/var/log/codex-${TEST_TYPE}"
- name: NAMESPACE
value: "${NAMESPACE}"
- name: BRANCH
value: "${BRANCH}"
- name: SOURCE
@ -52,7 +50,7 @@ spec:
subPath: kubeconfig.yaml
- name: logs
mountPath: /var/log/codex-${TEST_TYPE}
args: ${COMMAND}
args: ["dotnet", "test", "Tests/CodexReleaseTests"]
restartPolicy: Never
volumes:
- name: kubeconfig

View File

@ -8,10 +8,10 @@ on:
- master
workflow_dispatch:
inputs:
runner_image:
description: 'cs-dist-tests runner image (default: logosstorage/cs-codex-dist-tests:latest)'
branch:
description: 'cs-dist-tests branch to run tests from'
required: false
default: 'logosstorage/cs-codex-dist-tests:latest'
default: 'master'
type: string
env:
@ -211,10 +211,8 @@ jobs:
AWS_ACCESS_KEY_ID: ${{ secrets.SPACES_ACCESS_KEY }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.SPACES_SECRET_KEY }}
CODEXDOCKERIMAGE: ${{ needs.build-docker-dist-tests.outputs.logos_storage_image }}
RUNNER_IMAGE: ${{ inputs.runner_image || 'logosstorage/cs-codex-dist-tests:latest' }}
NAMESPACE: default
TEST_TYPE: release-tests
BRANCH: master
BRANCH: ${{ inputs.branch || 'master' }}
SOURCE: https://github.com/logos-storage/logos-storage-nim-cs-dist-tests
TF_DIR: .github/release/clusters/codex-dist-tests-do-ams3
steps:
@ -249,7 +247,7 @@ jobs:
run: |
kubectl create secret generic codex-dist-tests-app-kubeconfig \
--from-file=kubeconfig.yaml=$HOME/.kube/config \
-n ${{ env.NAMESPACE }}
-n default
- name: Set run variables
run: |
@ -257,22 +255,21 @@ jobs:
echo "RUNID=${RUNID}" >> $GITHUB_ENV
echo "NAMEPREFIX=r-tests-${RUNID}" >> $GITHUB_ENV
echo "TESTID=$(git rev-parse --short HEAD)" >> $GITHUB_ENV
echo "COMMAND=$(jq -c 'split(" ")' <<< '"dotnet test Tests/CodexReleaseTests"')" >> $GITHUB_ENV
- name: Deploy test job
run: envsubst < .github/release/job-release-tests.yaml | kubectl apply -f -
- name: Stream test logs
run: |
kubectl logs -l job-name=${{ env.NAMEPREFIX }} \
-n ${{ env.NAMESPACE }} \
kubectl logs -l job-name=$NAMEPREFIX \
-n default \
--follow \
--pod-running-timeout=300s
- name: Check job status
run: |
sleep 5
job_status=$(kubectl get jobs ${{ env.NAMEPREFIX }} -n ${{ env.NAMESPACE }} \
job_status=$(kubectl get jobs $NAMEPREFIX -n default \
-o jsonpath='{.status.conditions[0].type}')
echo "Job status: $job_status"
[[ "$job_status" == "Complete" ]] || exit 1