Skip to content

Commit

Permalink
Merge pull request #315 from WeBankBlockchain/release/1.8.4
Browse files Browse the repository at this point in the history
Release/1.8.4
  • Loading branch information
junqizhang-dev authored Feb 18, 2022
2 parents f2264e6 + 277e558 commit 02442f8
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 34 deletions.
26 changes: 13 additions & 13 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,17 +42,17 @@ jobs:
- name: Prepare gradle
uses: eskatos/gradle-command-action@v1
with:
gradle-version: 5.4.1
gradle-version: 5.6
- name: source-code deployment
run: |
export NODE_IP=127.0.0.1:20200
export NODE2_IP=127.0.0.1:20201
export PATH=/home/runner/gradle-provision-tmpdir/installs/gradle-5.4.1/bin:$PATH
export PATH=/home/runner/gradle-installations/installs/gradle-5.6/bin:$PATH
chmod u+x .ci/script/build-ci.sh
.ci/script/build-ci.sh 127.0.0.1:3306 cidb root root 127.0.0.1:6379 123456 redis
- name: Run CI
run: |
export PATH=/home/runner/gradle-provision-tmpdir/installs/gradle-5.4.1/bin:$PATH
export PATH=/home/runner/gradle-installations/installs/gradle-5.6/bin:$PATH
gradle check -i
gradle jacocoTestReport
bash <(curl -s https://codecov.io/bash)
Expand Down Expand Up @@ -88,12 +88,12 @@ jobs:
- name: Prepare gradle
uses: eskatos/gradle-command-action@v1
with:
gradle-version: 5.4.1
gradle-version: 5.6
- name: source-code deployment
run: |
export NODE_IP=127.0.0.1:20200
export NODE2_IP=127.0.0.1:20201
export PATH=/home/runner/gradle-provision-tmpdir/installs/gradle-5.4.1/bin:$PATH
export PATH=/home/runner/gradle-installations/installs/gradle-5.6/bin:$PATH
chmod u+x .ci/script/build-ci.sh
.ci/script/build-ci.sh 127.0.0.1:3306 cidb root root 127.0.0.1:6379 123456 redis
- name: Checkout and prepare
Expand All @@ -116,7 +116,7 @@ jobs:
run: |
cd weid-sample
chmod u+x *.sh
export PATH=/home/runner/gradle-provision-tmpdir/installs/gradle-5.4.1/bin:$PATH
export PATH=/home/runner/gradle-installations/installs/gradle-5.6/bin:$PATH
export NODE_IP=127.0.0.1:20200
export NODE2_IP=127.0.0.1:20201
./build.sh
Expand Down Expand Up @@ -152,12 +152,12 @@ jobs:
- name: Prepare gradle
uses: eskatos/gradle-command-action@v1
with:
gradle-version: 5.4.1
gradle-version: 5.6
- name: source-code deployment
run: |
export NODE_IP=127.0.0.1:20200
export NODE2_IP=127.0.0.1:20201
export PATH=/home/runner/gradle-provision-tmpdir/installs/gradle-5.4.1/bin:$PATH
export PATH=/home/runner/gradle-installations/installs/gradle-5.6/bin:$PATH
chmod u+x .ci/script/build-ci.sh
.ci/script/build-ci.sh 127.0.0.1:3306 cidb root root
- name: Checkout and prepare
Expand All @@ -180,7 +180,7 @@ jobs:
- name: Run CI
run: |
cd weid-http-service/
export PATH=/home/runner/gradle-provision-tmpdir/installs/gradle-5.6.1/bin:$PATH
export PATH=/home/runner/gradle-installations/installs/gradle-5.6.1/bin:$PATH
ls -ll libs
gradle clean build -i -x test
- name: Download failed log (if any)
Expand Down Expand Up @@ -215,12 +215,12 @@ jobs:
- name: Prepare gradle
uses: eskatos/gradle-command-action@v1
with:
gradle-version: 5.4.1
gradle-version: 5.6
- name: source-code deployment
run: |
export NODE_IP=127.0.0.1:20200
export NODE2_IP=127.0.0.1:20201
export PATH=/home/runner/gradle-provision-tmpdir/installs/gradle-5.4.1/bin:$PATH
export PATH=/home/runner/gradle-installations/installs/gradle-5.6/bin:$PATH
chmod u+x .ci/script/build-ci.sh
.ci/script/build-ci.sh 127.0.0.1:3306 cidb root root
- name: Checkout and prepare
Expand All @@ -237,7 +237,7 @@ jobs:
- name: Run CI
run: |
cd weid-build-tools/
export PATH=/home/runner/gradle-provision-tmpdir/installs/gradle-5.4.1/bin:$PATH
export PATH=/home/runner/gradle-installations/installs/gradle-5.6/bin:$PATH
sed -i -e '$a\org_id=test' run.config
sed -i -e '$a\amop_id=test' run.config
sed -i -e '$a\blockchain_address=127.0.0.1:20200' run.config
Expand All @@ -257,4 +257,4 @@ jobs:
uses: actions/upload-artifact@v1
with:
name: build-tools-log
path: /home/runner/work/WeIdentity/WeIdentity/weid-build-tools/build/reports/
path: /home/runner/work/WeIdentity/WeIdentity/weid-build-tools/build/reports/
6 changes: 4 additions & 2 deletions build-tools/bin/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -67,13 +67,14 @@ function modify_config()

export ORG_ID=${ORG_ID}
export AMOP_ID=${AMOP_ID}
export PERSISTENCE_TYPE=${persistence_type}
export MYSQL_ADDRESS=${MYSQL_ADDRESS}
export MYSQL_DATABASE=${MYSQL_DATABASE}
export MYSQL_USERNAME=${MYSQL_USERNAME}
export MYSQL_PASSWORD=${MYSQL_PASSWORD}
export BLOCKCHIAN_NODE_INFO=${BLOCKCHIAN_NODE_INFO}

NODEVAR='${ORG_ID}:${AMOP_ID}:${MYSQL_ADDRESS}:${MYSQL_DATABASE}:${MYSQL_USERNAME}:${MYSQL_PASSWORD}:${BLOCKCHIAN_NODE_INFO}'
NODEVAR='${ORG_ID}:${AMOP_ID}:${PERSISTENCE_TYPE}:${MYSQL_ADDRESS}:${MYSQL_DATABASE}:${MYSQL_USERNAME}:${MYSQL_PASSWORD}:${BLOCKCHIAN_NODE_INFO}'
envsubst ${NODEVAR} < ${weid_config_tpl} >${weid_config}
cp ${weid_config} ${app_xml_config_dir}
echo "modify sdk config finished..."
Expand Down Expand Up @@ -136,11 +137,12 @@ function gradle_build_sdk()

export ORG_ID=${org_id}
export AMOP_ID=${amop_id}
export PERSISTENCE_TYPE=${persistence_type}
export MYSQL_ADDRESS=${mysql_address}
export MYSQL_DATABASE=${mysql_database}
export MYSQL_USERNAME=${mysql_username}
export MYSQL_PASSWORD=${mysql_password}
NODEVAR='${ORG_ID}:${AMOP_ID}:${MYSQL_ADDRESS}:${MYSQL_DATABASE}:${MYSQL_USERNAME}:${MYSQL_PASSWORD}:${BLOCKCHIAN_NODE_INFO}'
NODEVAR='${ORG_ID}:${AMOP_ID}:${PERSISTENCE_TYPE}:${MYSQL_ADDRESS}:${MYSQL_DATABASE}:${MYSQL_USERNAME}:${MYSQL_PASSWORD}:${BLOCKCHIAN_NODE_INFO}'
envsubst ${NODEVAR} < ${weid_config_tpl} >${weid_config}

cd ${java_source_code_dir}/
Expand Down
35 changes: 17 additions & 18 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,4 +1,16 @@
// Due to a bug of spotbugs, the following lines have to be defined on top as well
buildscript {
dependencies {
classpath "org.springframework.boot:spring-boot-gradle-plugin:2.4.3"
}
}
plugins {
id 'com.github.spotbugs' version '4.7.0'
}
import com.github.spotbugs.snom.SpotBugsTask

def gradleVer = "4"
println "gradleVersion:" + gradle.gradleVersion
if (gradle.gradleVersion.startsWith("6")
|| gradle.gradleVersion.startsWith("5")
|| gradle.gradleVersion.startsWith("4.10")
Expand All @@ -11,26 +23,14 @@ if (gradle.gradleVersion.startsWith("6")
println "Gradle with version < 4.7 detected"
}

// Due to a bug of spotbugs, the following lines have to be defined on top as well
buildscript {
repositories {
maven {
url "https://plugins.gradle.org/m2/"
}
}
dependencies {
classpath "gradle.plugin.com.github.spotbugs:spotbugs-gradle-plugin:1.6.5"
}
}

apply plugin: 'maven'
apply plugin: 'java'
apply plugin: 'eclipse'
apply plugin: 'idea'
apply plugin: 'io.spring.dependency-management'
if (!gradle.startParameter.isOffline()) {
apply plugin: 'checkstyle'
apply plugin: 'jacoco'
apply plugin: "com.github.spotbugs"
apply plugin: 'signing'
}

Expand Down Expand Up @@ -60,7 +60,6 @@ repositories {
println "use default repo"
mavenCentral()
}
maven { url "https://dl.bintray.com/ethereum/maven/" }
maven { url "https://oss.sonatype.org/content/repositories/snapshots" }
maven { url "https://oss.sonatype.org/content/groups/public/" }
maven { url 'http://maven.aliyun.com/nexus/content/groups/public/' }
Expand Down Expand Up @@ -301,13 +300,13 @@ if (!gradle.startParameter.isOffline()) {
spotbugs {
ignoreFailures = true
showProgress = true
toolVersion = "3.1.8"
toolVersion = "4.2.2"
effort = "max"
reportLevel = "low"
excludeFilter = file("${project.rootDir}/config/spotbugs/spotbugs_filter.xml")
}

tasks.withType(com.github.spotbugs.SpotBugsTask) {
tasks.withType(SpotBugsTask) {
reports {
xml.enabled false
html.enabled true
Expand All @@ -318,7 +317,7 @@ if (!gradle.startParameter.isOffline()) {
uploadArchives {
repositories {
mavenDeployer {
beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) }
// beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) }

repository(url: "https://oss.sonatype.org/service/local/staging/deploy/maven2/") {
authentication(userName: sonatypeUsername, password: sonatypePassword)
Expand Down Expand Up @@ -373,4 +372,4 @@ gradle.taskGraph.whenReady { taskGraph ->
task.enabled = false
}
}
}
}
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-5.6-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-6.5.1-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists

0 comments on commit 02442f8

Please sign in to comment.