Skip to content

Commit

Permalink
Add job number
Browse files Browse the repository at this point in the history
  • Loading branch information
feloy committed Jun 15, 2023
1 parent d78bfca commit c722245
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .ibm/pipelines/functions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -78,12 +78,14 @@ save_results() {
JUNIT="$1"
LOGFILE="$2"
NAME="$3"
JOB="$4"
BASE_URL="https://s3.${IBM_REGION}.cloud-object-storage.appdomain.cloud/${IBM_BUCKET}"

GOOGLE_APPLICATION_CREDENTIALS=$PWD/sa.json go run main.go \
--sheetId "${RESULTS_SHEET_ID}" \
--junit "${JUNIT}" \
--pr "${GIT_PR_NUMBER}" \
--job "${JOB}" \
--test "${NAME}" \
--logfile "${BASE_URL}/${LOGFILE}.txt"
)
Expand Down
2 changes: 1 addition & 1 deletion .ibm/pipelines/kubernetes-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,5 @@ export SKIP_USER_LOGIN_TESTS=true
RESULT=${PIPESTATUS[0]}

save_logs "${LOGFILE}" "${TEST_NAME}" ${RESULT}
save_results "${PWD}/test-integration.xml" "${LOGFILE}" "${TEST_NAME}"
save_results "${PWD}/test-integration.xml" "${LOGFILE}" "${TEST_NAME}" "${BUILD_NUMBER}"
exit ${RESULT}
7 changes: 7 additions & 0 deletions .ibm/tools/tests-results/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ func main() {
fSheetId = flag.String("sheetId", "", "spreadsheetId")
fJunitFile = flag.String("junit", "", "junit file")
fPrNumber = flag.String("pr", "", "PR number")
fJobNumber = flag.String("job", "", "Job number")
fTestTile = flag.String("test", "", "Test title")
fLogFile = flag.String("logfile", "", "Log file including base")
)
Expand All @@ -49,6 +50,11 @@ func main() {
}
prNumber := *fPrNumber

if *fJobNumber == "" {
usage("--job is missing")
}
jobNumber := *fJobNumber

if *fTestTile == "" {
usage("--test is missing")
}
Expand Down Expand Up @@ -84,6 +90,7 @@ func main() {
prNumber,
testTitle,
logFile,
jobNumber,
}
err = db.SaveToSheet(ctx, spreadsheetId, data)
if err != nil {
Expand Down

0 comments on commit c722245

Please sign in to comment.