Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions dev-support/ci/selective_ci_checks.bats
Original file line number Diff line number Diff line change
Expand Up @@ -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"]'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it correct to say that without these changes the basic-checks array would have looked like this?:

     basic-checks=["rat","checkstyle","findbugs","unit"]

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Correct. The removed ones are all java-specific.

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

Expand Down
19 changes: 17 additions & 2 deletions dev-support/ci/selective_ci_checks.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down Expand Up @@ -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}
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down