Fix workflow run in other tests, add logs
This commit is contained in:
parent
2572fbcb1a
commit
f914f627f1
|
|
@ -66,11 +66,14 @@ function main() {
|
|||
|
||||
build_image
|
||||
create_cluster
|
||||
install_arc
|
||||
|
||||
run_squid || failed+=("run_squid")
|
||||
install_scale_set || failed+=("install_scale_set")
|
||||
run_workflow || failed+=("run_workflow")
|
||||
install_arc
|
||||
run_squid
|
||||
install_scale_set
|
||||
|
||||
|
||||
WORKFLOW_FILE="${WORKFLOW_FILE}" SCALE_SET_NAME="${SCALE_SET_NAME}" run_workflow || failed+=("run_workflow")
|
||||
|
||||
INSTALLATION_NAME="${SCALE_SET_NAME}" NAMESPACE="${SCALE_SET_NAMESPACE}" cleanup_scale_set || failed+=("cleanup_scale_set")
|
||||
|
||||
delete_cluster
|
||||
|
|
|
|||
|
|
@ -76,10 +76,11 @@ function main() {
|
|||
build_image
|
||||
create_cluster
|
||||
install_arc
|
||||
run_squid
|
||||
install_scale_set
|
||||
|
||||
WORKFLOW_FILE="${WORKFLOW_FILE}" SCALE_SET_NAME="${SCALE_SET_NAME}" run_workflow || failed+=("run_workflow")
|
||||
|
||||
run_squid || failed+=("run_squid")
|
||||
install_scale_set || failed+=("install_scale_set")
|
||||
run_workflow || failed+=("run_workflow")
|
||||
INSTALLATION_NAME="${SCALE_SET_NAME}" NAMESPACE="${SCALE_SET_NAMESPACE}" cleanup_scale_set || failed+=("cleanup_scale_set")
|
||||
|
||||
delete_cluster
|
||||
|
|
|
|||
|
|
@ -59,9 +59,10 @@ function main() {
|
|||
create_cluster
|
||||
|
||||
install_arc
|
||||
install_scale_set
|
||||
|
||||
install_scale_set || failed+=("install_scale_set")
|
||||
WORKFLOW_FILE="${WORKFLOW_FILE}" SCALE_SET_NAME="${SCALE_SET_NAME}" run_workflow || failed+=("run_workflow")
|
||||
|
||||
INSTALLATION_NAME="${SCALE_SET_NAME}" NAMESPACE="${SCALE_SET_NAMESPACE}" cleanup_scale_set || failed+=("cleanup_scale_set")
|
||||
|
||||
delete_cluster
|
||||
|
|
|
|||
|
|
@ -52,15 +52,16 @@ function install_scale_set() {
|
|||
function main() {
|
||||
local failed=()
|
||||
|
||||
builf_image
|
||||
build_image
|
||||
create_cluster
|
||||
|
||||
NAME="${ARC_NAME}" NAMESPACE="${ARC_NAMESPACE}" install_arc
|
||||
install_arc
|
||||
install_scale_set
|
||||
|
||||
install_scale_set || failed+=("install_scale_set")
|
||||
run_workflow || failed+=("run_workflow")
|
||||
WORKFLOW_FILE="${WORKFLOW_FILE}" SCALE_SET_NAME="${SCALE_SET_NAME}" run_workflow || failed+=("run_workflow")
|
||||
INSTALLATION_NAME="${SCALE_SET_NAME}" NAMESPACE="${SCALE_SET_NAMESPACE}" cleanup_scale_set || failed+=("cleanup_scale_set")
|
||||
|
||||
NAMESPACE="${ARC_NAMESPACE}" arc_logs
|
||||
delete_cluster
|
||||
|
||||
print_results "${failed[@]}"
|
||||
|
|
|
|||
|
|
@ -127,7 +127,7 @@ function print_results() {
|
|||
|
||||
function run_workflow() {
|
||||
echo "Checking if the workflow file exists"
|
||||
gh workflow view -R "${TARGET_ORG}/${TARGET_REPO}" "${WORKFLOW_FILE}" || return 1
|
||||
gh workflow view -R "${TARGET_ORG}/${TARGET_REPO}" "${WORKFLOW_FILE}" &> /dev/null || return 1
|
||||
|
||||
local queue_time="$(date -u +%FT%TZ)"
|
||||
|
||||
|
|
@ -145,7 +145,7 @@ function run_workflow() {
|
|||
run_id=$(gh run list -R "${TARGET_ORG}/${TARGET_REPO}" --workflow "${WORKFLOW_FILE}" --created ">${queue_time}" --json "name,databaseId" --jq ".[] | select(.name | contains(\"${SCALE_SET_NAME}\")) | .databaseId")
|
||||
echo "Run ID: ${run_id}"
|
||||
if [ -n "$run_id" ]; then
|
||||
echo "Run found: $run_id"
|
||||
echo "Run found!"
|
||||
break
|
||||
fi
|
||||
|
||||
|
|
@ -155,7 +155,7 @@ function run_workflow() {
|
|||
done
|
||||
|
||||
echo "Waiting for run to complete"
|
||||
local code=$(gh run watch "${run_id}" -R "${TARGET_ORG}/${TARGET_REPO}" --exit-status)
|
||||
local code=$(gh run watch "${run_id}" -R "${TARGET_ORG}/${TARGET_REPO}" --exit-status &> /dev/null)
|
||||
if [[ "${code}" -ne 0 ]]; then
|
||||
echo "Run failed with exit code ${code}"
|
||||
return 1
|
||||
|
|
|
|||
|
|
@ -59,10 +59,13 @@ function main() {
|
|||
create_cluster
|
||||
install_openebs
|
||||
install_arc
|
||||
install_scale_set || failed+=("install_scale_set")
|
||||
run_workflow || failed+=("run_workflow")
|
||||
install_scale_set
|
||||
|
||||
WORKFLOW_FILE="${WORKFLOW_FILE}" SCALE_SET_NAME="${SCALE_SET_NAME}" run_workflow || failed+=("run_workflow")
|
||||
|
||||
INSTALLATION_NAME="${SCALE_SET_NAME}" NAMESPACE="${SCALE_SET_NAMESPACE}" cleanup_scale_set || failed+=("cleanup_scale_set")
|
||||
|
||||
NAMESPACE="${ARC_NAMESPACE}" arc_logs
|
||||
delete_cluster
|
||||
|
||||
print_results "${failed[@]}"
|
||||
|
|
|
|||
|
|
@ -110,17 +110,23 @@ function run_mitmproxy() {
|
|||
}
|
||||
|
||||
function main() {
|
||||
if [[ ! -x "$(which mitmdump)" ]]; then
|
||||
echo "mitmdump is not installed"
|
||||
return 1
|
||||
fi
|
||||
|
||||
local failed=()
|
||||
|
||||
build_image
|
||||
create_cluster
|
||||
install_arc
|
||||
run_mitmproxy
|
||||
install_scale_set
|
||||
|
||||
run_mitmproxy || failed+=("run_mitmproxy")
|
||||
install_scale_set || failed+=("install_scale_set")
|
||||
run_workflow || failed+=("run_workflow")
|
||||
WORKFLOW_FILE="${WORKFLOW_FILE}" SCALE_SET_NAME="${SCALE_SET_NAME}" run_workflow || failed+=("run_workflow")
|
||||
INSTALLATION_NAME="${SCALE_SET_NAME}" NAMESPACE="${SCALE_SET_NAMESPACE}" cleanup_scale_set || failed+=("cleanup_scale_set")
|
||||
|
||||
NAMESPACE="${ARC_NAMESPACE}" arc_logs
|
||||
delete_cluster
|
||||
|
||||
print_results "${failed[@]}"
|
||||
|
|
|
|||
|
|
@ -58,10 +58,13 @@ function main() {
|
|||
build_image
|
||||
create_cluster
|
||||
install_arc
|
||||
install_scale_set || failed+=("install_scale_set")
|
||||
run_workflow || failed+=("run_workflow")
|
||||
install_scale_set
|
||||
|
||||
WORKFLOW_FILE="${WORKFLOW_FILE}" SCALE_SET_NAME="${SCALE_SET_NAME}" run_workflow || failed+=("run_workflow")
|
||||
|
||||
INSTALLATION_NAME="${SCALE_SET_NAME}" NAMESPACE="${SCALE_SET_NAMESPACE}" cleanup_scale_set || failed+=("cleanup_scale_set")
|
||||
|
||||
NAMESPACE="${ARC_NAMESPACE}" arc_logs
|
||||
delete_cluster
|
||||
|
||||
print_results "${failed[@]}"
|
||||
|
|
|
|||
|
|
@ -125,15 +125,16 @@ function main() {
|
|||
build_image
|
||||
create_cluster
|
||||
install_arc
|
||||
install_scale_set
|
||||
|
||||
install_scale_set || failed+=("install_scale_set")
|
||||
run_workflow || failed+=("run_workflow_1")
|
||||
WORKFLOW_FILE="${WORKFLOW_FILE}" SCALE_SET_NAME="${SCALE_SET_NAME}" run_workflow || failed+=("run_workflow")
|
||||
|
||||
upgrade_scale_set || failed+=("upgrade_scale_set")
|
||||
assert_listener_deleted || failed+=("assert_listener_deleted")
|
||||
assert_listener_recreated || failed+=("assert_listener_recreated")
|
||||
|
||||
INSTALLATION_NAME="${SCALE_SET_NAME}" NAMESPACE="${SCALE_SET_NAMESPACE}" cleanup_scale_set || failed+=("cleanup_scale_set")
|
||||
|
||||
NAMESPACE="${ARC_NAMESPACE}" arc_logs
|
||||
|
||||
delete_cluster
|
||||
|
|
|
|||
Loading…
Reference in New Issue