From 3f57aab300b97540b95b9edaf661c633744e1a5d Mon Sep 17 00:00:00 2001 From: "Doroszlai, Attila" Date: Mon, 10 Jan 2022 16:35:38 +0100 Subject: [PATCH] HDDS-6169. Selective checks: skip junit tests on ozone-runner image update --- dev-support/ci/selective_ci_checks.bats | 11 +++++++++++ dev-support/ci/selective_ci_checks.sh | 19 +++++++++++++++++-- 2 files changed, 28 insertions(+), 2 deletions(-) diff --git a/dev-support/ci/selective_ci_checks.bats b/dev-support/ci/selective_ci_checks.bats index 7e2dff321ef6..be0f70499d07 100644 --- a/dev-support/ci/selective_ci_checks.bats +++ b/dev-support/ci/selective_ci_checks.bats @@ -66,6 +66,17 @@ load bats-assert/load.bash assert_output -p needs-kubernetes-tests=true } +@test "runner image update" { + run dev-support/ci/selective_ci_checks.sh b95eeba82a + + assert_output -p 'basic-checks=["rat"]' + assert_output -p needs-build=true + assert_output -p needs-compose-tests=true + assert_output -p needs-dependency-check=true + assert_output -p needs-integration-tests=false + assert_output -p needs-kubernetes-tests=true +} + @test "check script" { run dev-support/ci/selective_ci_checks.sh 316899152 diff --git a/dev-support/ci/selective_ci_checks.sh b/dev-support/ci/selective_ci_checks.sh index 4a490cd56a49..25e7082023ca 100755 --- a/dev-support/ci/selective_ci_checks.sh +++ b/dev-support/ci/selective_ci_checks.sh @@ -219,7 +219,10 @@ function get_count_compose_files() { start_end::group_start "Count compose files" local pattern_array=( "^hadoop-ozone/dev-support/checks/acceptance.sh" - "^hadoop-ozone/dist/src/main/compose" + "^hadoop-ozone/dist" + ) + local ignore_array=( + "^hadoop-ozone/dist/src/main/k8s" ) filter_changed_files true COUNT_COMPOSE_CHANGED_FILES=${match_count} @@ -258,7 +261,10 @@ function get_count_kubernetes_files() { start_end::group_start "Count kubernetes files" local pattern_array=( "^hadoop-ozone/dev-support/checks/kubernetes.sh" - "^hadoop-ozone/dist/src/main/k8s" + "^hadoop-ozone/dist" + ) + local ignore_array=( + "^hadoop-ozone/dist/src/main/compose" ) filter_changed_files true COUNT_KUBERNETES_CHANGED_FILES=${match_count} @@ -332,6 +338,9 @@ function check_needs_checkstyle() { "pom.xml" "src/..../java" ) + local ignore_array=( + "^hadoop-ozone/dist" + ) filter_changed_files if [[ ${match_count} != "0" ]]; then @@ -373,6 +382,9 @@ function check_needs_findbugs() { "pom.xml" "src/..../java" ) + local ignore_array=( + "^hadoop-ozone/dist" + ) filter_changed_files if [[ ${match_count} != "0" ]]; then @@ -391,6 +403,9 @@ function check_needs_unit_test() { "src/..../java" "src/..../resources" ) + local ignore_array=( + "^hadoop-ozone/dist" + ) filter_changed_files if [[ ${match_count} != "0" ]]; then