From 1af4484e7e6f65f191e7a71c7c48b188bd560882 Mon Sep 17 00:00:00 2001 From: Kyon <32325790+kyonRay@users.noreply.github.com> Date: Wed, 21 Feb 2024 12:26:15 +0800 Subject: [PATCH] (script,ci): relax check restriction of openssl version 3.x, version to 1.4.0, update ci to check in jdk 8.0.382. (#600) * (script,ci): relax check restriction of openssl version 3.x, version to 1.4.0, update ci to check in jdk 8.0.382. * (CI): add CI rare string test. --- .ci/check_rare_string.sh | 54 +++++++++++++++ .ci/ci_cross_all_check.sh | 15 +++++ .ci/ci_cross_bcos3_demo_check.sh | 15 +++++ .ci/ci_cross_fabric2_demo_check.sh | 15 ++++- .ci/ci_cross_gm_demo_check.sh | 13 ++++ .ci/ci_demo_check.sh | 12 ++++ .ci/gen_rare_string.sh | 67 +++++++++++++++++++ .github/workflows/ci_check_bcos3.yml | 10 ++- .github/workflows/ci_check_bcos_fabric.yml | 9 ++- .github/workflows/ci_check_bcos_fabric2.yml | 9 ++- .github/workflows/ci_check_cross_all.yml | 9 ++- .github/workflows/ci_check_group_group.yml | 9 ++- .../workflows/ci_check_group_group_mac.yml | 7 +- .github/workflows/ci_check_normal_gm.yml | 10 ++- .github/workflows/ci_check_normal_gm_mac.yml | 7 +- .github/workflows/ci_check_unittest.yml | 9 +-- .github/workflows/publish_binary.yml | 2 +- build.gradle | 2 +- demo/profile_version.sh | 16 ++--- release_note.txt | 2 +- scripts/build_wecross.sh | 2 +- scripts/create_cert.sh | 2 +- scripts/download_account_manager.sh | 2 +- scripts/download_console.sh | 6 +- scripts/download_demo.sh | 2 +- scripts/download_pages.sh | 2 +- scripts/download_plugin.sh | 8 +-- scripts/download_wecross.sh | 2 +- .../webank/wecross/common/WeCrossDefault.java | 2 +- 29 files changed, 274 insertions(+), 46 deletions(-) create mode 100644 .ci/check_rare_string.sh create mode 100644 .ci/gen_rare_string.sh diff --git a/.ci/check_rare_string.sh b/.ci/check_rare_string.sh new file mode 100644 index 000000000..fa2555b20 --- /dev/null +++ b/.ci/check_rare_string.sh @@ -0,0 +1,54 @@ +#!/bin/bash + + + +function LOG_ERROR() +{ + local content=${1} + echo -e "\033[31m"${content}"\033[0m" +} + +function LOG_INFO() +{ + local content=${1} + echo -e "\033[32m"${content}"\033[0m" +} + +get_md5sum_cmd() { + local md5sum_cmd="md5sum" + if [ "$(uname)" == "Darwin" ]; then + md5sum_cmd="md5" + fi + echo "$md5sum_cmd" +} + +function checkConcatenatedRareString() { + + concatenatedString=${1} + log_file=${2} + md5sum_cmd=$(get_md5sum_cmd) + + md5_concatenatedString=$(echo -n "$concatenatedString" | $md5sum_cmd | awk '{print $1}') + + # compare rare string and stringFromGet + get_output=$(cat ${log_file}| grep "result=" | awk -F '[][]' '{print $4}' | awk NF | tail -n 1) + md5_stringFromGet=$(echo -n "$get_output" | $md5sum_cmd | awk '{print $1}') + if [ "$md5_concatenatedString" != "$md5_stringFromGet" ]; then + LOG_ERROR "error: check failed, the md5 values of rareString and stringFromGet are not equal, fail concatenatedString: ${concatenatedString}, get_output: ${get_output}" + exit 1 + else + LOG_INFO "check success, concatenatedString: ${concatenatedString}" + fi +} + +main() { + concatenatedString=${1} + log_file=${2} + LOG_INFO "check rare string start, concatenatedString: ${concatenatedString}" + + checkConcatenatedRareString ${concatenatedString} ${log_file} + LOG_INFO "check rare string finished!" +} + +main "$@" + diff --git a/.ci/ci_cross_all_check.sh b/.ci/ci_cross_all_check.sh index 937bdc7c9..1a8390345 100644 --- a/.ci/ci_cross_all_check.sh +++ b/.ci/ci_cross_all_check.sh @@ -2,7 +2,9 @@ set -e ROOT=$(pwd)/demo/ +CI_PWD=$(pwd) PLUGIN_BRANCH=master +final_rare_input="" LOG_INFO() { local content=${1} @@ -14,6 +16,14 @@ LOG_ERROR() { echo -e "\033[31m[ERROR] ${content}\033[0m" } +prepare_rare_string() { + final_rare_input=$(bash ${CI_PWD}/.ci/gen_rare_string.sh) +} + +check_rare_string() { + bash ${CI_PWD}/.ci/check_rare_string.sh ${final_rare_input} ${ROOT}/WeCross-Console/logs/debug.log +} + check_log() { cd ${ROOT} error_log=routers-payment/127.0.0.1-8250-25500/logs/error.log @@ -62,6 +72,8 @@ demo_test() { ensure_bcos_nodes_running + prepare_rare_string + cd WeCross-Console/ bash start.sh < : certain tag or branch to download e.g - bash $0 v1.3.1 + bash $0 v1.4.0 EOF exit 0 } diff --git a/scripts/download_plugin.sh b/scripts/download_plugin.sh index 75c0f2b39..e8d0319f0 100644 --- a/scripts/download_plugin.sh +++ b/scripts/download_plugin.sh @@ -50,10 +50,10 @@ Usage: : certain tag or branch to download e.g - bash $0 BCOS2 v1.3.1 - bash $0 BCOS3 v1.3.1 - bash $0 Fabric1 v1.3.1 - bash $0 Fabric2 v1.3.1 + bash $0 BCOS2 v1.4.0 + bash $0 BCOS3 v1.4.0 + bash $0 Fabric1 v1.4.0 + bash $0 Fabric2 v1.4.0 EOF exit 0 } diff --git a/scripts/download_wecross.sh b/scripts/download_wecross.sh index e91169c31..ffe1ac226 100755 --- a/scripts/download_wecross.sh +++ b/scripts/download_wecross.sh @@ -6,7 +6,7 @@ LANG=en_US.UTF-8 enable_build_from_resource=0 compatibility_version= -default_compatibility_version=v1.3.1 # update this every release +default_compatibility_version=v1.4.0 # update this every release deps_dir=$(pwd)'/WeCross/plugin/' pages_dir=$(pwd)'/WeCross/pages/' src_dir=$(pwd)'/src/' diff --git a/src/main/java/com/webank/wecross/common/WeCrossDefault.java b/src/main/java/com/webank/wecross/common/WeCrossDefault.java index d826fd5fb..ef69b6e0a 100644 --- a/src/main/java/com/webank/wecross/common/WeCrossDefault.java +++ b/src/main/java/com/webank/wecross/common/WeCrossDefault.java @@ -4,7 +4,7 @@ import java.util.List; public class WeCrossDefault { - public static final String VERSION = "v1.3.1"; + public static final String VERSION = "v1.4.0"; public static final String TEMPLATE_URL = "http://127.0.0.1:8080/";