diff --git a/test/prow/Dockerfile b/test/prow/Dockerfile index eaab1a6..1a4e569 100644 --- a/test/prow/Dockerfile +++ b/test/prow/Dockerfile @@ -2,7 +2,7 @@ FROM registry.access.redhat.com/ubi9/python-311:latest USER 0 RUN yum install -y jq patch vim -RUN pip install yq +RUN pip install yq google-cloud-aiplatform RUN pip install git+https://github.com/lightspeed-core/lightspeed-evaluation.git#subdirectory=lsc_agent_eval RUN mkdir -p /opt/app-root/src WORKDIR /opt/app-root/src diff --git a/test/prow/entrypoint.sh b/test/prow/entrypoint.sh index 1d8befe..1b423f5 100644 --- a/test/prow/entrypoint.sh +++ b/test/prow/entrypoint.sh @@ -19,10 +19,12 @@ TEMP_DIR=$(mktemp -d) cd $TEMP_DIR echo "$OCM_TOKEN" > ocm_token.txt -echo "GEMINI_API_KEY=${GEMINI_API_KEY}" > .env + +echo "GEMINI_API_KEY=dummy" > .env +echo "GOOGLE_APPLICATION_CREDENTIALS=${GOOGLE_APPLICATION_CREDENTIALS}" >> .env cp $TEST_DIR/eval_data.yaml $TEMP_DIR/eval_data.yaml sed -i "s/uniq-cluster-name/${UNIQUE_ID}/g" $TEMP_DIR/eval_data.yaml sed -i "s|: ../scripts|: ${WORK_DIR}/test/scripts|g" $TEMP_DIR/eval_data.yaml -python $TEST_DIR/eval.py --agent_endpoint "${AGENT_URL}:${AGENT_PORT}" --agent_auth_token_file $TEMP_DIR/ocm_token.txt --eval_data_yaml $TEMP_DIR/eval_data.yaml +python $TEST_DIR/eval.py --agent_endpoint "${AGENT_URL}:${AGENT_PORT}" --agent_auth_token_file $TEMP_DIR/ocm_token.txt --eval_data_yaml $TEMP_DIR/eval_data.yaml --judge_provider="vertex" diff --git a/test/prow/template.yaml b/test/prow/template.yaml index bc3805f..ed57714 100644 --- a/test/prow/template.yaml +++ b/test/prow/template.yaml @@ -37,6 +37,8 @@ objects: secretKeyRef: key: ${GEMINI_API_SECRET_KEY_NAME} name: ${GEMINI_API_SECRET_NAME} + - name: GOOGLE_APPLICATION_CREDENTIALS + value: /opt/app-root/google-vertex-service-account.json - name: AGENT_URL value: ${AGENT_URL} - name: AGENT_PORT @@ -45,6 +47,14 @@ objects: value: ${JOB_ID} - name: OCM_BASE_URL value: ${OCM_BASE_URL} + volumeMounts: + - name: google-vertex-service-account + mountPath: /opt/app-root/google-vertex-service-account.json + subPath: ${VERTEX_API_SECRET_KEY_NAME} + volumes: + - name: google-vertex-service-account + secret: + secretName: ${VERTEX_API_SECRET_NAME} parameters: - name: JOB_ID @@ -66,5 +76,9 @@ parameters: value: gemini - name: GEMINI_API_SECRET_KEY_NAME value: api_key +- name: VERTEX_API_SECRET_NAME + value: vertex-service-account +- name: VERTEX_API_SECRET_KEY_NAME + value: service_account - name: OCM_BASE_URL - value: https://api.stage.openshift.com \ No newline at end of file + value: https://api.stage.openshift.com