diff --git a/.github/workflows/docker-release.yml b/.github/workflows/docker-release.yml index 78322acf38..5320ad5094 100644 --- a/.github/workflows/docker-release.yml +++ b/.github/workflows/docker-release.yml @@ -28,7 +28,7 @@ jobs: - name: Build TarGz run: | - ./gradlew --build-cache releaseTarGz + ./gradlew --build-cache --refresh-dependencies clean releaseTarGz # docker image release - name: Cp TarGz to Docker Path diff --git a/.github/workflows/github-release.yml b/.github/workflows/github-release.yml index 2601efb92f..6ae10e14eb 100644 --- a/.github/workflows/github-release.yml +++ b/.github/workflows/github-release.yml @@ -28,7 +28,7 @@ jobs: - name: Build TarGz run: | - ./gradlew --build-cache releaseTarGz + ./gradlew --build-cache --refresh-dependencies clean releaseTarGz - name: GitHub Release uses: softprops/action-gh-release@v1 diff --git a/.github/workflows/nightly-e2e.yml b/.github/workflows/nightly-e2e.yml index 8ec1a1b62c..d637ccaebe 100644 --- a/.github/workflows/nightly-e2e.yml +++ b/.github/workflows/nightly-e2e.yml @@ -11,6 +11,7 @@ jobs: env: TC_GENERAL_MIRROR_URL: "mirrors.ustc.edu.cn" ESK_TEST_YML: "tests/kos_test_suite.yml" + DUCKER_TEST_OPTIONS: "-f" # fail fast # _DUCKTAPE_OPTIONS: "--exit-first" steps: diff --git a/tests/README.md b/tests/README.md index b5e4401c1a..530efb44b7 100644 --- a/tests/README.md +++ b/tests/README.md @@ -92,6 +92,11 @@ ESK_TEST_YML="tests/esk_test_suite.yml" bash tests/docker/run_tests.sh ``` All included or excluded E2E tests can be found in `tests/esk_test_suite.yml` file. +* Force update dependencies and run AutoMQ for Apache Kafka E2E tests: +``` +ESK_TEST_YML="tests/esk_test_suite.yml" DUCKER_TEST_OPTIONS="-f" bash tests/docker/run_tests.sh +``` + * Notes - The scripts to run tests creates and destroys docker network named *knw*. This network can't be used for any other purpose. diff --git a/tests/docker/ducker-ak b/tests/docker/ducker-ak index 4fc5711887..b4541daad9 100755 --- a/tests/docker/ducker-ak +++ b/tests/docker/ducker-ak @@ -485,9 +485,11 @@ ducker_test() { die "ducker_test: the ducker01 instance appears to be down. Did you run 'ducker up'?" declare -a test_name_args=() local debug=0 + local force_update_snapshot=0 while [[ $# -ge 1 ]]; do case "${1}" in -d|--debug) debug=1; shift;; + -f|--force-update-snapshot) force_update_snapshot=1; shift;; --) shift; break;; *) test_name_args+=("${1}"); shift;; esac @@ -509,7 +511,11 @@ ducker_test() { done must_pushd "${kafka_dir}" - (test -f ./gradlew || gradle) && ./gradlew systemTestLibs + if [[ "${force_update_snapshot}" -eq 1 ]]; then + (test -f ./gradlew || gradle) && ./gradlew --refresh-dependencies clean systemTestLibs + else + (test -f ./gradlew || gradle) && ./gradlew systemTestLibs + fi must_popd if [[ "${debug}" -eq 1 ]]; then local ducktape_cmd="python3 -m debugpy --listen 0.0.0.0:${debugpy_port} --wait-for-client /usr/local/bin/ducktape" diff --git a/tests/docker/run_tests.sh b/tests/docker/run_tests.sh index 86734bc3b0..be7bd271d0 100755 --- a/tests/docker/run_tests.sh +++ b/tests/docker/run_tests.sh @@ -21,6 +21,7 @@ TC_PATHS=${TC_PATHS:-${ESK_TEST_YML:-./kafkatest/}} TC_GENERAL_MIRROR_URL=${TC_GENERAL_MIRROR_URL:-""} TC_BASE_IMAGE=${TC_BASE_IMAGE:-"automqinc/kos_e2e_base:3.4.0"} REBUILD=${REBUILD:f} +DUCKER_TEST_OPTIONS=${DUCKER_TEST_OPTIONS:-""} die() { echo $@ @@ -41,4 +42,8 @@ fi [[ -n ${_DUCKTAPE_OPTIONS} ]] && _DUCKTAPE_OPTIONS="-- ${_DUCKTAPE_OPTIONS}" -${SCRIPT_DIR}/ducker-ak test ${TC_PATHS} ${_DUCKTAPE_OPTIONS} || die "ducker-ak test failed" +if [ -n "${DUCKER_TEST_OPTIONS}" ]; then + ${SCRIPT_DIR}/ducker-ak test "${DUCKER_TEST_OPTIONS}" ${TC_PATHS} ${_DUCKTAPE_OPTIONS} || die "ducker-ak test failed" +else + ${SCRIPT_DIR}/ducker-ak test ${TC_PATHS} ${_DUCKTAPE_OPTIONS} || die "ducker-ak test failed" +fi