-
Notifications
You must be signed in to change notification settings - Fork 86
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Release 2.1.0
- Loading branch information
Showing
117 changed files
with
4,825 additions
and
1,309 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#!/bin/bash | ||
|
||
set -e | ||
|
||
curl -LO https://raw.githubusercontent.com/FISCO-BCOS/FISCO-BCOS/dev/tools/build_chain.sh && chmod u+x build_chain.sh | ||
bash <(curl -s https://raw.githubusercontent.com/FISCO-BCOS/FISCO-BCOS/dev/tools/ci/download_bin.sh) -b dev -m | ||
echo "127.0.0.1:4 agency1 1,2,3" > ipconf | ||
./build_chain.sh -e bin/fisco-bcos -f ipconf -p 30300,20200,8545 -v 2.0.0 | ||
./nodes/127.0.0.1/start_all.sh | ||
./nodes/127.0.0.1/fisco-bcos -v | ||
cp nodes/127.0.0.1/sdk/* src/integration-test/resources/ | ||
mv src/integration-test/resources/applicationContext-sample.xml src/integration-test/resources/applicationContext.xml | ||
./gradlew verifyGoogleJavaFormat | ||
./gradlew build | ||
./gradlew test | ||
./gradlew integrationTest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
#!/bin/bash | ||
|
||
set -e | ||
|
||
scan_code_script="cobra/cobra.py -f json -o /tmp/report.json -t " | ||
ignore_files=(PerformanceOkDSync.java SM2Algorithm.java SM2KeyGenerator.java test) | ||
|
||
LOG_ERROR() { | ||
content=${1} | ||
echo -e "\033[31m${content}\033[0m" | ||
} | ||
|
||
LOG_INFO() { | ||
content=${1} | ||
echo -e "\033[32m${content}\033[0m" | ||
} | ||
|
||
should_ignore() | ||
{ | ||
local file=${1} | ||
for ignore in ${ignore_files[*]}; do | ||
if echo ${file} | grep ${ignore} &>/dev/null; then | ||
echo "ignore ${file} ${ignore}" | ||
return 0 | ||
fi | ||
done | ||
return 1 | ||
} | ||
|
||
scan_code() | ||
{ | ||
# Redirect output to stderr. | ||
exec 1>&2 | ||
for file in $(git diff-index --name-status HEAD^ | awk '{print $2}'); do | ||
if should_ignore ${file}; then continue; fi | ||
if [ ! -f ${file} ];then continue; fi | ||
LOG_INFO "check file ${file}" | ||
python ${scan_code_script} $file | ||
trigger_rules=$(jq -r '.' /tmp/report.json | grep 'trigger_rules' | awk '{print $2}' | sed 's/,//g') | ||
echo "trigger_rules is ${trigger_rules}" | ||
rm /tmp/report.json | ||
if [ ${trigger_rules} -ne 0 ]; then | ||
echo "######### ERROR: Scan code failed, please adjust them before commit" | ||
exit 1 | ||
fi | ||
done | ||
} | ||
|
||
install_cobra() { | ||
git clone https://github.com/WhaleShark-Team/cobra.git | ||
pip install -r cobra/requirements.txt | ||
cp cobra/config.template cobra/config | ||
} | ||
|
||
install_cobra | ||
scan_code |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Oops, something went wrong.