Skip to content

Commit

Permalink
HDDS-11456. Require successful dependency/licence checks for acceptan…
Browse files Browse the repository at this point in the history
…ce/compile/kubernetes (apache#7209)
  • Loading branch information
adoroszlai authored Oct 14, 2024
1 parent c579d06 commit ce07a3c
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 16 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,8 @@ jobs:
- build-info
- build
- basic
- dependency
- license
timeout-minutes: 45
if: needs.build-info.outputs.needs-compile == 'true'
strategy:
Expand Down Expand Up @@ -410,6 +412,8 @@ jobs:
- build-info
- build
- basic
- dependency
- license
runs-on: ubuntu-20.04
timeout-minutes: 150
if: needs.build-info.outputs.needs-compose-tests == 'true'
Expand Down Expand Up @@ -457,6 +461,8 @@ jobs:
- build-info
- build
- basic
- dependency
- license
runs-on: ubuntu-20.04
timeout-minutes: 60
if: needs.build-info.outputs.needs-kubernetes-tests == 'true'
Expand Down
30 changes: 15 additions & 15 deletions dev-support/ci/selective_ci_checks.bats
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ load bats-assert/load.bash
assert_output -p needs-build=true
assert_output -p needs-compile=false
assert_output -p needs-compose-tests=true
assert_output -p needs-dependency-check=false
assert_output -p needs-dependency-check=true
assert_output -p needs-integration-tests=false
assert_output -p needs-kubernetes-tests=false
}
Expand All @@ -76,7 +76,7 @@ load bats-assert/load.bash
assert_output -p needs-build=true
assert_output -p needs-compile=false
assert_output -p needs-compose-tests=true
assert_output -p needs-dependency-check=false
assert_output -p needs-dependency-check=true
assert_output -p needs-integration-tests=false
assert_output -p needs-kubernetes-tests=true
}
Expand All @@ -100,7 +100,7 @@ load bats-assert/load.bash
assert_output -p needs-build=true
assert_output -p needs-compile=false
assert_output -p needs-compose-tests=true
assert_output -p needs-dependency-check=false
assert_output -p needs-dependency-check=true
assert_output -p needs-integration-tests=false
assert_output -p needs-kubernetes-tests=true
}
Expand All @@ -112,7 +112,7 @@ load bats-assert/load.bash
assert_output -p needs-build=true
assert_output -p needs-compile=true
assert_output -p needs-compose-tests=false
assert_output -p needs-dependency-check=false
assert_output -p needs-dependency-check=true
assert_output -p needs-integration-tests=true
assert_output -p needs-kubernetes-tests=false
}
Expand All @@ -136,7 +136,7 @@ load bats-assert/load.bash
assert_output -p needs-build=true
assert_output -p needs-compile=true
assert_output -p needs-compose-tests=false
assert_output -p needs-dependency-check=false
assert_output -p needs-dependency-check=true
assert_output -p needs-integration-tests=true
assert_output -p needs-kubernetes-tests=false
}
Expand All @@ -148,7 +148,7 @@ load bats-assert/load.bash
assert_output -p needs-build=true
assert_output -p needs-compile=true
assert_output -p needs-compose-tests=false
assert_output -p needs-dependency-check=false
assert_output -p needs-dependency-check=true
assert_output -p needs-integration-tests=true
assert_output -p needs-kubernetes-tests=false
}
Expand All @@ -160,7 +160,7 @@ load bats-assert/load.bash
assert_output -p needs-build=true
assert_output -p needs-compile=true
assert_output -p needs-compose-tests=false
assert_output -p needs-dependency-check=false
assert_output -p needs-dependency-check=true
assert_output -p needs-integration-tests=true
assert_output -p needs-kubernetes-tests=false
}
Expand All @@ -172,7 +172,7 @@ load bats-assert/load.bash
assert_output -p needs-build=true
assert_output -p needs-compile=true
assert_output -p needs-compose-tests=false
assert_output -p needs-dependency-check=false
assert_output -p needs-dependency-check=true
assert_output -p needs-integration-tests=true
assert_output -p needs-kubernetes-tests=false
}
Expand All @@ -184,7 +184,7 @@ load bats-assert/load.bash
assert_output -p needs-build=true
assert_output -p needs-compile=true
assert_output -p needs-compose-tests=false
assert_output -p needs-dependency-check=false
assert_output -p needs-dependency-check=true
assert_output -p needs-integration-tests=false
assert_output -p needs-kubernetes-tests=false
}
Expand All @@ -196,7 +196,7 @@ load bats-assert/load.bash
assert_output -p needs-build=true
assert_output -p needs-compile=true
assert_output -p needs-compose-tests=false
assert_output -p needs-dependency-check=false
assert_output -p needs-dependency-check=true
assert_output -p needs-integration-tests=false
assert_output -p needs-kubernetes-tests=false
}
Expand All @@ -208,7 +208,7 @@ load bats-assert/load.bash
assert_output -p needs-build=true
assert_output -p needs-compile=false
assert_output -p needs-compose-tests=false
assert_output -p needs-dependency-check=false
assert_output -p needs-dependency-check=true
assert_output -p needs-integration-tests=false
assert_output -p needs-kubernetes-tests=true
}
Expand All @@ -232,7 +232,7 @@ load bats-assert/load.bash
assert_output -p needs-build=true
assert_output -p needs-compile=true
assert_output -p needs-compose-tests=true
assert_output -p needs-dependency-check=false
assert_output -p needs-dependency-check=true
assert_output -p needs-integration-tests=true
assert_output -p needs-kubernetes-tests=true
}
Expand All @@ -244,7 +244,7 @@ load bats-assert/load.bash
assert_output -p needs-build=true
assert_output -p needs-compile=true
assert_output -p needs-compose-tests=true
assert_output -p needs-dependency-check=false
assert_output -p needs-dependency-check=true
assert_output -p needs-integration-tests=true
assert_output -p needs-kubernetes-tests=true
}
Expand All @@ -256,7 +256,7 @@ load bats-assert/load.bash
assert_output -p needs-build=true
assert_output -p needs-compile=true
assert_output -p needs-compose-tests=true
assert_output -p needs-dependency-check=false
assert_output -p needs-dependency-check=true
assert_output -p needs-integration-tests=true
assert_output -p needs-kubernetes-tests=true
}
Expand All @@ -268,7 +268,7 @@ load bats-assert/load.bash
assert_output -p needs-build=true
assert_output -p needs-compile=true
assert_output -p needs-compose-tests=true
assert_output -p needs-dependency-check=false
assert_output -p needs-dependency-check=true
assert_output -p needs-integration-tests=true
assert_output -p needs-kubernetes-tests=true
}
Expand Down
6 changes: 5 additions & 1 deletion dev-support/ci/selective_ci_checks.sh
Original file line number Diff line number Diff line change
Expand Up @@ -330,6 +330,7 @@ function check_needs_compile() {

if [[ ${match_count} != "0" ]]; then
compile_needed=true
dependency_check_needed=true
fi

start_end::group_end
Expand Down Expand Up @@ -520,19 +521,22 @@ function calculate_test_types_to_run() {
echo "Looks like ${COUNT_CORE_OTHER_CHANGED_FILES} core files changed, running all tests."
echo
compose_tests_needed=true
dependency_check_needed=true
integration_tests_needed=true
kubernetes_tests_needed=true
else
echo "All ${COUNT_ALL_CHANGED_FILES} changed files are known to be handled by specific checks."
echo
if [[ ${COUNT_COMPOSE_CHANGED_FILES} != "0" ]] || [[ ${COUNT_ROBOT_CHANGED_FILES} != "0" ]]; then
compose_tests_needed="true"
dependency_check_needed=true
fi
if [[ ${COUNT_INTEGRATION_CHANGED_FILES} != "0" ]]; then
integration_tests_needed="true"
fi
if [[ ${COUNT_KUBERNETES_CHANGED_FILES} != "0" ]] || [[ ${COUNT_ROBOT_CHANGED_FILES} != "0" ]]; then
kubernetes_tests_needed="true"
dependency_check_needed=true
fi
fi
start_end::group_end
Expand Down Expand Up @@ -590,14 +594,14 @@ get_count_robot_files
get_count_misc_files

check_needs_build
check_needs_dependency
check_needs_compile

# calculate basic checks to run
BASIC_CHECKS="rat"
check_needs_author
check_needs_bats
check_needs_checkstyle
check_needs_dependency
check_needs_docs
check_needs_findbugs
check_needs_native
Expand Down

0 comments on commit ce07a3c

Please sign in to comment.