diff --git a/.github/workflows/build-and-push.yml b/.github/workflows/build-and-push.yml index 2b68e84..5d0b912 100644 --- a/.github/workflows/build-and-push.yml +++ b/.github/workflows/build-and-push.yml @@ -19,6 +19,6 @@ jobs: registry_username: ${{ secrets.QUAY_IMAGE_SCLORG_BUILDER_USERNAME }} registry_token: ${{ secrets.QUAY_IMAGE_SCLORG_BUILDER_TOKEN }} dockerfile: Dockerfile.daily-tests - tag: "0.6.5" + tag: "0.7.0" image_name: "upstream-daily-tests" quay_application_token: ${{ secrets.QUAY_IMAGE_SCLORG_UPDATE_DESC }} diff --git a/Dockerfile.daily-tests b/Dockerfile.daily-tests index ae4606b..d761cdd 100644 --- a/Dockerfile.daily-tests +++ b/Dockerfile.daily-tests @@ -2,7 +2,7 @@ FROM quay.io/fedora/fedora:42 ENV SHARED_DIR="/var/ci-scripts" \ VERSION="42" \ - RELEASE_UPSTREAM="0.6.5" \ + RELEASE_UPSTREAM="0.7.0" \ UPSTREAM_TMT_REPO="https://github.com/sclorg/sclorg-testing-farm" \ UPSTREAM_TMT_DIR="sclorg-testing-farm" \ HOME="/home/nightly" \ diff --git a/Makefile b/Makefile index f089e03..e008018 100644 --- a/Makefile +++ b/Makefile @@ -7,4 +7,4 @@ shellcheck: ./run-shellcheck.sh `git ls-files *.sh` build_images: - podman build -t quay.io/sclorg/upstream-daily-tests:0.6.5 -f Dockerfile.daily-tests . + podman build -t quay.io/sclorg/upstream-daily-tests:0.7.0 -f Dockerfile.daily-tests . diff --git a/daily_tests/daily_scl_tests.sh b/daily_tests/daily_scl_tests.sh index 552d48a..c241614 100755 --- a/daily_tests/daily_scl_tests.sh +++ b/daily_tests/daily_scl_tests.sh @@ -6,16 +6,13 @@ SCL_CONTAINERS_UPSTREAM="\ s2i-nodejs-container " -SCL_S2I_CONTAINERS="\ +SCL_CONTAINERS="\ s2i-base-container s2i-nodejs-container s2i-php-container s2i-perl-container s2i-ruby-container s2i-python-container -" - -SCL_NOS2I_CONTAINTERS="\ varnish-container nginx-container httpd-container @@ -32,9 +29,6 @@ shift [[ -z "$1" ]] && { echo "You have to specify type of the test to run. test, test-openshift, test-openshift-pytest, test-openshift-4" && exit 1 ; } TESTS="$1" shift -if [[ -z "$SET_TEST" ]]; then - SET_TEST="S2I" -fi CUR_WD=$(pwd) echo "Current working directory is: ${CUR_WD}" @@ -75,11 +69,9 @@ function clean_ocp4() { } function iterate_over_all_containers() { - CONTAINTERS_TO_TEST=$SCL_S2I_CONTAINERS + CONTAINTERS_TO_TEST=$SCL_CONTAINERS if [[ "${TESTS}" == "test-upstream" ]]; then CONTAINTERS_TO_TEST=$SCL_CONTAINERS_UPSTREAM - elif [[ "${SET_TEST}" == "NOS2I" ]]; then - CONTAINTERS_TO_TEST=$SCL_NOS2I_CONTAINTERS fi diff --git a/run_in_container.sh b/run_in_container.sh index d004083..1fee716 100755 --- a/run_in_container.sh +++ b/run_in_container.sh @@ -4,12 +4,10 @@ set -x TARGET=$1 TESTS=$2 -TEST_TYPE=$3 podman run --rm -it \ -v /var/tmp/:/var/tmp/:Z \ -e SHARED_DIR=/var/tmp/ \ -e TARGET=$TARGET \ -e TESTS=$TESTS \ - -e TEST_TYPE=$TEST_TYPE \ quay.io/sclorg/daily-tests:latest diff --git a/run_nightly_tests.sh b/run_nightly_tests.sh index 02dd056..9d795bd 100755 --- a/run_nightly_tests.sh +++ b/run_nightly_tests.sh @@ -15,17 +15,6 @@ else exit 1 fi -SET_TEST="" -if [[ "${TESTS}" != "test-upstream" ]]; then - if [[ -n "$TEST_TYPE" ]]; then - echo "Test type is set to $TEST_TYPE" - else - echo "TEST_TYPE variable is not set. Please set it to S2I or NOS2I." - exit 1 - fi - SET_TEST="$TEST_TYPE" -fi - # Local working directories CUR_DATE=$(date +%Y-%m-%d) WORK_DIR="${HOME}/ci-scripts/" @@ -35,13 +24,9 @@ LOCAL_LOGS_DIR="${HOME}/logs/" DAILY_REPORTS_DIR="${SHARED_DIR}/daily_reports_dir/${CUR_DATE}" TFT_PLAN="nightly/nightly-$TARGET" DAILY_REPORTS_TESTS_DIR="${DAILY_REPORTS_DIR}/${TARGET}-${TESTS}" -DAILY_SCLORG_TESTS_DIR="${SHARED_DIR}/daily_scl_tests/${CUR_DATE}/${TARGET}-${TESTS}-${SET_TEST}" +DAILY_SCLORG_TESTS_DIR="${SHARED_DIR}/daily_scl_tests/${CUR_DATE}/${TARGET}-${TESTS}" -DIR="${WORK_DIR}/${CUR_DATE}/${TARGET}-${TESTS}-${SET_TEST}" -if [[ "$TESTS" == "test-upstream" ]]; then - DIR="${WORK_DIR}/${CUR_DATE}/${TARGET}-${TESTS}" - DAILY_SCLORG_TESTS_DIR="${SHARED_DIR}/daily_scl_tests/${CUR_DATE}/${TARGET}-${TESTS}" -fi +DIR="${WORK_DIR}/${CUR_DATE}/${TARGET}-${TESTS}" LOG_FILE="${LOCAL_LOGS_DIR}/${TARGET}-${TESTS}.log" @@ -95,12 +80,8 @@ function get_compose() { } function run_tests() { - ENV_VARIABLES="-e DEBUG=yes -e OS=$TARGET -e TEST=$TESTS" - if [[ "$TESTS" != "test-upstream" ]]; then - ENV_VARIABLES="$ENV_VARIABLES -e SET_TEST=$SET_TEST" - else - ENV_VARIABLES="$ENV_VARIABLES -e CI=true" - fi + # -e CI=true is set for NodeJS Upstream tests + ENV_VARIABLES="-e DEBUG=yes -e OS=$TARGET -e TEST=$TESTS -e CI=true" TMT_COMMAND="tmt run -v -v -d -d --all ${ENV_VARIABLES} --id ${DIR} plan --name $TFT_PLAN provision -v -v --how minute --auto-select-network --image ${COMPOSE}" echo "TMT command is: $TMT_COMMAND" | tee -a "${LOG_FILE}" touch "${DAILY_SCLORG_TESTS_DIR}/tmt_running" diff --git a/show_logs.py b/show_logs.py index ffbe527..3158a34 100755 --- a/show_logs.py +++ b/show_logs.py @@ -34,21 +34,23 @@ def iter_results_in_directory(self): print("Show status of all TMT/FMF plans:") if self.scl_tests_dir.is_dir(): for item in self.scl_tests_dir.iterdir(): - if item.is_dir(): - if (item / "tmt_running").exists(): - running_tmt_plans.append(item.name) + if not item.is_dir(): + continue + if (self.scl_tests_dir / item.name / "tmt_running").exists(): + running_tmt_plans.append(item.name) if self.reports_dir.is_dir(): for item in self.reports_dir.iterdir(): - if item.is_dir(): - if (item / "tmt_success").exists(): - success_tmt_plans.append(item.name) - else: - failed_tmt_plans.append(item.name) - for item in self.reports_dir.iterdir(): - if item.is_dir(): - failed_container_tests.extend( - self.return_failed_tests(self.reports_dir, item) - ) + item_dir = self.reports_dir / item.name + print(f"Going throw {item_dir}") + if not item_dir.is_dir(): + continue + if (item_dir / "tmt_success").exists(): + success_tmt_plans.append(item.name) + else: + failed_tmt_plans.append(item.name) + failed_container_tests.extend( + self.return_failed_tests(self.item_dir, item) + ) if running_tmt_plans: print("Running TMT plans that are not finished yet:") print("\n".join(running_tmt_plans)) @@ -71,13 +73,15 @@ def iter_over_executed_tests(self): """View all executed tests in the given directory.""" for item in self.scl_tests_dir.iterdir(): print(f"Inspecting item in '{self.scl_tests_dir}' directory: {item}") - if not item.is_dir(): + item_dir = self.scl_tests_dir / item.name + if not item_dir.is_dir(): continue - failed_container_tests = self.return_failed_tests(self.scl_tests_dir, item) + failed_container_tests = self.return_failed_tests(item_dir, item) if not failed_container_tests: print(f"No container test failures found in {item}.") continue - print(f"!!!!Failed container tests are: {failed_container_tests}!!!!") + print(f"!!!!Failed container tests for {item.name}!!!!\n") + print({"\n".join(failed_container_tests)}) def show_all_available_tests(self): print("All previous available tests are:")