2021-02-24 02:34:33 +00:00
|
|
|
#!/bin/bash
|
|
|
|
set -e
|
|
|
|
set -u
|
|
|
|
#set -x
|
|
|
|
|
|
|
|
echo "[${GIT_REPO_ID:-}#${GIT_REF_NAME:-}] Started at ${GIT_DEPLOY_TIMESTAMP:-}"
|
|
|
|
sleep ${GIT_DEPLOY_TEST_WAIT:-0.1}
|
|
|
|
echo "[${GIT_REPO_ID:-}#${GIT_REF_NAME:-}] Finished"
|
|
|
|
|
2021-02-26 01:41:35 +00:00
|
|
|
echo "Reporting to '${GIT_DEPLOY_CALLBACK_URL:-}' ..."
|
|
|
|
#curl -fsSL "${GIT_DEPLOY_CALLBACK_URL}" \
|
2021-02-26 02:57:26 +00:00
|
|
|
curl -fsSL "${GIT_DEPLOY_CALLBACK_URL}?format=pytest" \
|
2021-02-24 02:34:33 +00:00
|
|
|
-H 'Content-Type: application/json' \
|
|
|
|
-d '
|
2021-02-26 01:41:35 +00:00
|
|
|
{ "exitcode": 0,
|
|
|
|
"root": "/home/app/srv/status.example.com/e2e-selenium",
|
|
|
|
"tests": [
|
|
|
|
{ "nodeid": "pytest::idthing",
|
|
|
|
"outcome": "passed"
|
2021-02-24 02:34:33 +00:00
|
|
|
}
|
2021-02-26 01:41:35 +00:00
|
|
|
]
|
2021-02-24 02:34:33 +00:00
|
|
|
}
|
|
|
|
'
|
2021-02-26 01:41:35 +00:00
|
|
|
# -d '
|
|
|
|
# { "report":
|
|
|
|
# { "name": "sleep test",
|
|
|
|
# "status": "PASS",
|
|
|
|
# "message": "a top level result group",
|
|
|
|
# "results": [
|
|
|
|
# { "name": "sub test", "status": "PASS", "message": "a sub group", "detail": "logs or smth" }
|
|
|
|
# ]
|
|
|
|
# }
|
|
|
|
# }
|
|
|
|
#'
|
2021-02-24 02:34:33 +00:00
|
|
|
|
|
|
|
echo "[${GIT_REPO_ID:-}#${GIT_REF_NAME:-}] Generated Report"
|