From 400df12ff916ab8ddedbd99f04e35818f2c61a18 Mon Sep 17 00:00:00 2001 From: "Mark S. Lewis" Date: Sun, 22 Jan 2023 21:38:28 +0000 Subject: [PATCH 1/4] Use shellcheck to check for script errors Signed-off-by: Mark S. Lewis --- .github/workflows/test.yml | 7 ++ Makefile | 6 +- google-protos/google/rpc/status.proto | 47 ------------- .../fixtures/crypto-material/rename_sk.sh | 12 ++-- scenario/fixtures/generate-hsm-user.sh | 66 ++++++++++++------- scenario/fixtures/generate.sh | 2 +- scripts/check_gofmt.sh | 2 +- scripts/shellcheck.sh | 14 ++++ 8 files changed, 78 insertions(+), 78 deletions(-) delete mode 100644 google-protos/google/rpc/status.proto create mode 100755 scripts/shellcheck.sh diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index f2ded5d61..91888295b 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -10,6 +10,13 @@ jobs: verify-versions: uses: ./.github/workflows/verify-versions.yml + shellcheck: + runs-on: ubuntu-latest + name: ShellCheck + steps: + - uses: actions/checkout@v3 + - run: make shellcheck + docs: needs: verify-versions uses: ./.github/workflows/build-docs.yml diff --git a/Makefile b/Makefile index dc49c7d23..bae6369db 100644 --- a/Makefile +++ b/Makefile @@ -4,7 +4,7 @@ # SPDX-License-Identifier: Apache-2.0 # -base_dir := $(PWD) +base_dir := $(patsubst %/,%,$(dir $(realpath $(lastword $(MAKEFILE_LIST))))) go_dir := $(base_dir)/pkg node_dir := $(base_dir)/node @@ -220,3 +220,7 @@ clean-java: .PHONEY: clean-generated clean-generated: find "$(go_dir)" -name '*_mock_test.go' -delete + +.PHONEY: shellcheck +shellcheck: + cd "$(base_dir)" && ./scripts/shellcheck.sh diff --git a/google-protos/google/rpc/status.proto b/google-protos/google/rpc/status.proto deleted file mode 100644 index 5bd51aa2f..000000000 --- a/google-protos/google/rpc/status.proto +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright 2020 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.rpc; - -import "google/protobuf/any.proto"; - -option cc_enable_arenas = true; -option go_package = "google.golang.org/genproto/googleapis/rpc/status;status"; -option java_multiple_files = true; -option java_outer_classname = "StatusProto"; -option java_package = "com.google.rpc"; -option objc_class_prefix = "RPC"; - -// The `Status` type defines a logical error model that is suitable for -// different programming environments, including REST APIs and RPC APIs. It is -// used by [gRPC](https://github.com/grpc). Each `Status` message contains -// three pieces of data: error code, error message, and error details. -// -// You can find out more about this error model and how to work with it in the -// [API Design Guide](https://cloud.google.com/apis/design/errors). -message Status { - // The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code]. - int32 code = 1; - - // A developer-facing error message, which should be in English. Any - // user-facing error message should be localized and sent in the - // [google.rpc.Status.details][google.rpc.Status.details] field, or localized by the client. - string message = 2; - - // A list of messages that carry the error details. There is a common set of - // message types for APIs to use. - repeated google.protobuf.Any details = 3; -} \ No newline at end of file diff --git a/scenario/fixtures/crypto-material/rename_sk.sh b/scenario/fixtures/crypto-material/rename_sk.sh index 25935084c..16ec89b27 100755 --- a/scenario/fixtures/crypto-material/rename_sk.sh +++ b/scenario/fixtures/crypto-material/rename_sk.sh @@ -1,8 +1,10 @@ +#!/usr/bin/env sh + # Rename the key files we use to be key.pem instead of a uuid BASEDIR=$(dirname "$0") -for KEY in $(find ${BASEDIR}/crypto-config -type f -name "*_sk"); do - KEY_DIR=$(dirname ${KEY}) - mv ${KEY} ${KEY_DIR}/key.pem - chmod 644 ${KEY_DIR}/key.pem -done \ No newline at end of file +find "${BASEDIR}/crypto-config" -type f -name '*_sk' -print | while read -r KEY; do + KEY_DIR=$(dirname "${KEY}") + mv "${KEY}" "${KEY_DIR}/key.pem" + chmod 644 "${KEY_DIR}/key.pem" +done diff --git a/scenario/fixtures/generate-hsm-user.sh b/scenario/fixtures/generate-hsm-user.sh index 24a6836d7..a90f6a4dc 100755 --- a/scenario/fixtures/generate-hsm-user.sh +++ b/scenario/fixtures/generate-hsm-user.sh @@ -1,43 +1,63 @@ #!/usr/bin/env bash + set -eo pipefail # Required environment variables : "${SOFTHSM2_CONF:?}" # define the CA setup -CA_HOST=127.0.0.1 -CA_URL=${CA_HOST}:7054 +CA_URL="127.0.0.1:7054" # try to locate the Soft HSM library -POSSIBLE_LIB_LOC=('/usr/lib/softhsm/libsofthsm2.so' \ -'/usr/lib/x86_64-linux-gnu/softhsm/libsofthsm2.so' \ -'/usr/local/lib/softhsm/libsofthsm2.so' \ -'/usr/lib/libacsp-pkcs11.so' +POSSIBLE_LIB_LOC=( + '/usr/lib/softhsm/libsofthsm2.so' + '/usr/lib/x86_64-linux-gnu/softhsm/libsofthsm2.so' + '/usr/local/lib/softhsm/libsofthsm2.so' + '/usr/lib/libacsp-pkcs11.so' ) -for TEST_LIB in "${POSSIBLE_LIB_LOC[@]}" -do - if [ -f $TEST_LIB ]; then - HSM2_LIB=$TEST_LIB - break - fi +for TEST_LIB in "${POSSIBLE_LIB_LOC[@]}"; do + if [ -f "${TEST_LIB}" ]; then + HSM2_LIB="${TEST_LIB}" + break + fi done -[ -z $HSM2_LIB ] && echo No SoftHSM PKCS11 Library found, ensure you have installed softhsm2 && exit 1 +[ -z "${HSM2_LIB}" ] && echo No SoftHSM PKCS11 Library found, ensure you have installed softhsm2 && exit 1 # Update the client config file to point to the softhsm pkcs11 library # which must be in $HOME/softhsm directory CLIENT_CONFIG_TEMPLATE=./ca-client-config/fabric-ca-client-config-template.yaml CLIENT_CONFIG=./ca-client-config/fabric-ca-client-config.yaml -cp $CLIENT_CONFIG_TEMPLATE $CLIENT_CONFIG -sed -i s+REPLACE_ME_HSMLIB+${HSM2_LIB}+g $CLIENT_CONFIG +cp "${CLIENT_CONFIG_TEMPLATE}" "${CLIENT_CONFIG}" +sed -i "s+REPLACE_ME_HSMLIB+${HSM2_LIB}+g" "${CLIENT_CONFIG}" # create the users, remove any existing users -CRYPTO_PATH=$PWD/crypto-material/hsm -[ -d $CRYPTO_PATH ] && rm -fr $CRYPTO_PATH +CRYPTO_PATH="${PWD}/crypto-material/hsm" +[ -d "${CRYPTO_PATH}" ] && rm -fr "${CRYPTO_PATH}" +CA_ADMIN='admin' +CA_ADMIN_PW='adminpw' # user passed in as parameter -CAADMIN=admin -CAADMIN_PW=adminpw -HSMUSER=$1 -fabric-ca-client enroll -c $CLIENT_CONFIG -u http://$CAADMIN:$CAADMIN_PW@$CA_URL --mspdir $CRYPTO_PATH/$CAADMIN --csr.hosts example.com -! fabric-ca-client register -c $CLIENT_CONFIG --mspdir $CRYPTO_PATH/$CAADMIN --id.name $HSMUSER --id.secret $HSMUSER --id.type client --caname ca-org1 --id.maxenrollments 0 -m example.com -u http://$CA_URL && echo user probably already registered, continuing -fabric-ca-client enroll -c $CLIENT_CONFIG -u http://$HSMUSER:$HSMUSER@$CA_URL --mspdir $CRYPTO_PATH/$HSMUSER --csr.hosts example.com +HSM_USER="$1" + +fabric-ca-client enroll \ + -c "${CLIENT_CONFIG}" \ + -u "http://${CA_ADMIN}:${CA_ADMIN_PW}@${CA_URL}" \ + --mspdir "${CRYPTO_PATH}/${CA_ADMIN}" \ + --csr.hosts example.com + +! fabric-ca-client register \ + -c "${CLIENT_CONFIG}" \ + --mspdir "${CRYPTO_PATH}/${CA_ADMIN}" \ + --id.name "${HSM_USER}" \ + --id.secret "${HSM_USER}" \ + --id.type client \ + --caname ca-org1 \ + --id.maxenrollments 0 \ + -m example.com \ + -u "http://${CA_URL}" && echo 'user probably already registered, continuing' + +fabric-ca-client enroll \ + -c "${CLIENT_CONFIG}" \ + -u "http://${HSM_USER}:${HSM_USER}@${CA_URL}" \ + --mspdir "${CRYPTO_PATH}/${HSM_USER}" \ + --csr.hosts example.com diff --git a/scenario/fixtures/generate.sh b/scenario/fixtures/generate.sh index 63508d527..8a859f05f 100755 --- a/scenario/fixtures/generate.sh +++ b/scenario/fixtures/generate.sh @@ -13,5 +13,5 @@ docker exec cli rm -rf /etc/hyperledger/config/channel.tx \ docker exec cli cryptogen generate --config=/etc/hyperledger/config/crypto-config.yaml --output /etc/hyperledger/config/crypto-config docker exec cli configtxgen -profile ThreeOrgsApplicationGenesis -outputBlock /etc/hyperledger/config/mychannel.block -channelID mychannel docker exec cli cp /etc/hyperledger/fabric/core.yaml /etc/hyperledger/config -docker exec cli sh /etc/hyperledger/config/rename_sk.sh +docker exec cli /etc/hyperledger/config/rename_sk.sh docker-compose -f docker-compose-cli.yaml down --volumes diff --git a/scripts/check_gofmt.sh b/scripts/check_gofmt.sh index 6954e6ce4..f260f434f 100755 --- a/scripts/check_gofmt.sh +++ b/scripts/check_gofmt.sh @@ -3,7 +3,7 @@ set -eu GOFMT=$(gofmt -l "$@") -if [ ! -z "${GOFMT}" ]; then +if [ -n "${GOFMT}" ]; then echo 'Go formatting errors:' echo "${GOFMT}" exit 1 diff --git a/scripts/shellcheck.sh b/scripts/shellcheck.sh new file mode 100755 index 000000000..8d5074d6e --- /dev/null +++ b/scripts/shellcheck.sh @@ -0,0 +1,14 @@ +#!/usr/bin/env bash + +fileCount=0 +failCount=0 + +while read -r scriptFile; do + if [ -n "${scriptFile}" ]; then + ((fileCount++)) + shellcheck "${scriptFile}" || ((failCount++)) + fi +done <<< "$(find . -type d \( -name vendor -o -name node_modules \) -prune -o -type f -name '*.sh' -print)" + +echo "Checked ${fileCount} files with ${failCount} failing." +exit "${failCount}" From 04e84eb298c79eddc0c51607dc930255be834b7c Mon Sep 17 00:00:00 2001 From: "Mark S. Lewis" Date: Mon, 23 Jan 2023 12:13:51 +0000 Subject: [PATCH 2/4] Publish Java release versions to Maven Central Signed-off-by: Mark S. Lewis --- .github/scripts/maven_publish_release.sh | 2 +- .github/scripts/maven_publish_snapshot.sh | 2 +- .github/workflows/push.yml | 15 ++++++- java/pom.xml | 55 +++++++++++++---------- 4 files changed, 47 insertions(+), 27 deletions(-) diff --git a/.github/scripts/maven_publish_release.sh b/.github/scripts/maven_publish_release.sh index d43353b2f..465a957a9 100755 --- a/.github/scripts/maven_publish_release.sh +++ b/.github/scripts/maven_publish_release.sh @@ -6,4 +6,4 @@ POM_VERSION=$(mvn org.apache.maven.plugins:maven-help-plugin:evaluate -Dexpressi PUBLISH_VERSION="${POM_VERSION%%-*}" mvn --batch-mode versions:set -DnewVersion="${PUBLISH_VERSION}" -mvn --batch-mode -DskipTests deploy +mvn --batch-mode --activate-profiles release -DskipTests deploy diff --git a/.github/scripts/maven_publish_snapshot.sh b/.github/scripts/maven_publish_snapshot.sh index f01c5d73d..e9702f8d8 100755 --- a/.github/scripts/maven_publish_snapshot.sh +++ b/.github/scripts/maven_publish_snapshot.sh @@ -7,4 +7,4 @@ GATEWAY_VERSION="${POM_VERSION%%-*}" PUBLISH_VERSION="${GATEWAY_VERSION}-SNAPSHOT" mvn --batch-mode versions:set -DnewVersion="${PUBLISH_VERSION}" -mvn --batch-mode -DskipTests deploy +mvn --batch-mode --activate-profiles release -DskipTests deploy diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index e19be23ed..851bd11b2 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -14,29 +14,40 @@ jobs: name: Publish API documentation runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - name: Checkout source + uses: actions/checkout@v3 + with: + ref: gh-pages + path: source + - name: Checkout publish + uses: actions/checkout@v3 with: ref: gh-pages + path: publish token: ${{ secrets.REPO_ACCESS_TOKEN }} - name: Remove old API documentation shell: bash run: rm -rf "${GITHUB_REF_NAME}/api" + working-directory: publish - name: Download JavaDoc uses: actions/download-artifact@v3 + working-directory: publish with: name: java-doc path: ${{ github.ref_name }}/api/java - name: Download Node documentation uses: actions/download-artifact@v3 + working-directory: publish with: name: node-doc path: ${{ github.ref_name }}/api/node - name: Publish + working-directory: publish env: USER_NAME: 'Hyperledger Bot' USER_EMAIL: 'hyperledger-bot@hyperledger.org' COMMIT_REF: ${{ github.sha }} - run: ./.github/scripts/git_push_changes.sh + run: ${{ github.workspace }}/source/.github/scripts/git_push_changes.sh publish-node: needs: build diff --git a/java/pom.xml b/java/pom.xml index ccd5a1b79..3333b8424 100644 --- a/java/pom.xml +++ b/java/pom.xml @@ -23,8 +23,9 @@ - Fabric JAVA SDK Developers + fabric-gateway maintainers hyperledger-technical-discuss@lists.hyperledger.org + https://www.hyperledger.org/ @@ -318,6 +319,19 @@ maven-dependency-plugin 3.3.0 + + org.apache.maven.plugins + maven-source-plugin + 3.2.1 + + + attach-sources + + jar + + + + @@ -425,6 +439,17 @@ + + org.sonatype.plugins + nexus-staging-maven-plugin + 1.6.13 + true + + ossrh + https://oss.sonatype.org/ + true + + maven-assembly-plugin 3.4.2 @@ -445,15 +470,6 @@ org.apache.maven.plugins maven-gpg-plugin - - true - - --batch - --pinentry-mode - loopback - - - 3.0.1 sign-artifacts @@ -461,19 +477,12 @@ sign - - - - - org.apache.maven.plugins - maven-source-plugin - 3.2.1 - - - attach-sources - - jar-no-fork - + + + --pinentry-mode + loopback + + From fdfa8bbfc8145c15490e75324af4b74ac88e36f3 Mon Sep 17 00:00:00 2001 From: "Mark S. Lewis" Date: Tue, 24 Jan 2023 14:32:55 +0000 Subject: [PATCH 3/4] Publish Java to bestbeforetoday --- .github/scripts/maven_publish_release.sh | 4 +- .github/scripts/maven_publish_snapshot.sh | 4 +- .github/workflows/build-docs.yml | 1 + .github/workflows/push.yml | 10 +- .github/workflows/release.yml | 1 + .github/workflows/test.yml | 171 +++++++++++----------- .github/workflows/verify-versions.yml | 1 + 7 files changed, 97 insertions(+), 95 deletions(-) diff --git a/.github/scripts/maven_publish_release.sh b/.github/scripts/maven_publish_release.sh index 465a957a9..d7c71a327 100755 --- a/.github/scripts/maven_publish_release.sh +++ b/.github/scripts/maven_publish_release.sh @@ -5,5 +5,5 @@ set -eu -o pipefail POM_VERSION=$(mvn org.apache.maven.plugins:maven-help-plugin:evaluate -Dexpression=project.version -q -DforceStdout) PUBLISH_VERSION="${POM_VERSION%%-*}" -mvn --batch-mode versions:set -DnewVersion="${PUBLISH_VERSION}" -mvn --batch-mode --activate-profiles release -DskipTests deploy +mvn --batch-mode --no-transfer-progress versions:set -DnewVersion="${PUBLISH_VERSION}" +mvn --batch-mode --no-transfer-progress --activate-profiles release -DskipTests deploy diff --git a/.github/scripts/maven_publish_snapshot.sh b/.github/scripts/maven_publish_snapshot.sh index e9702f8d8..7c3ad005a 100755 --- a/.github/scripts/maven_publish_snapshot.sh +++ b/.github/scripts/maven_publish_snapshot.sh @@ -6,5 +6,5 @@ POM_VERSION=$(mvn org.apache.maven.plugins:maven-help-plugin:evaluate -Dexpressi GATEWAY_VERSION="${POM_VERSION%%-*}" PUBLISH_VERSION="${GATEWAY_VERSION}-SNAPSHOT" -mvn --batch-mode versions:set -DnewVersion="${PUBLISH_VERSION}" -mvn --batch-mode --activate-profiles release -DskipTests deploy +mvn --batch-mode --no-transfer-progress versions:set -DnewVersion="${PUBLISH_VERSION}" +mvn --batch-mode --no-transfer-progress --activate-profiles release -DskipTests deploy diff --git a/.github/workflows/build-docs.yml b/.github/workflows/build-docs.yml index 236e4c9ed..dca9cf6b2 100644 --- a/.github/workflows/build-docs.yml +++ b/.github/workflows/build-docs.yml @@ -28,6 +28,7 @@ jobs: with: java-version: 17 distribution: temurin + cache: maven - name: Generate JavaDoc run: make generate-docs-java - name: Upload JavaDoc diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 851bd11b2..4ec472b3c 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -17,7 +17,6 @@ jobs: - name: Checkout source uses: actions/checkout@v3 with: - ref: gh-pages path: source - name: Checkout publish uses: actions/checkout@v3 @@ -27,20 +26,18 @@ jobs: token: ${{ secrets.REPO_ACCESS_TOKEN }} - name: Remove old API documentation shell: bash - run: rm -rf "${GITHUB_REF_NAME}/api" + run: rm -rf "${GITHUB_REF_NAME}/api" working-directory: publish - name: Download JavaDoc uses: actions/download-artifact@v3 - working-directory: publish with: name: java-doc - path: ${{ github.ref_name }}/api/java + path: publish/${{ github.ref_name }}/api/java - name: Download Node documentation uses: actions/download-artifact@v3 - working-directory: publish with: name: node-doc - path: ${{ github.ref_name }}/api/node + path: publish/${{ github.ref_name }}/api/node - name: Publish working-directory: publish env: @@ -80,6 +77,7 @@ jobs: with: java-version: 8 distribution: temurin + cache: maven gpg-private-key: ${{ secrets.OSSRH_GPG_SECRET_KEY }} gpg-passphrase: MAVEN_GPG_PASSPHRASE - name: Publish diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 6b6f2cb30..d7ed57977 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -37,6 +37,7 @@ jobs: with: java-version: 8 distribution: temurin + cache: maven server-id: ossrh server-username: MAVEN_USERNAME server-password: MAVEN_PASSWORD diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 91888295b..a2172d79e 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -21,90 +21,91 @@ jobs: needs: verify-versions uses: ./.github/workflows/build-docs.yml - go: - needs: verify-versions - runs-on: ubuntu-22.04 - name: Test Go - strategy: - fail-fast: false - matrix: - go-version: - - 1.17 - - 1.18 - - 1.19 - env: - SOFTHSM2_CONF: ${{ github.workspace }}/softhsm2.conf - steps: - - uses: actions/checkout@v3 - - uses: actions/setup-go@v3 - with: - go-version: ${{ matrix.go-version }} - - name: Install SoftHSM - run: ./.github/scripts/install_softhsm.sh - env: - TMPDIR: ${{ runner.temp }} - - name: Generate mocks - run: make generate - - name: Run unit tests - run: make unit-test-go-pkcs11 - - name: Pull Fabric Docker images - run: make pull-latest-peer - - name: Run scenario tests - run: make scenario-test-go + # go: + # needs: verify-versions + # runs-on: ubuntu-22.04 + # name: Test Go + # strategy: + # fail-fast: false + # matrix: + # go-version: + # - 1.17 + # - 1.18 + # - 1.19 + # env: + # SOFTHSM2_CONF: ${{ github.workspace }}/softhsm2.conf + # steps: + # - uses: actions/checkout@v3 + # - uses: actions/setup-go@v3 + # with: + # go-version: ${{ matrix.go-version }} + # - name: Install SoftHSM + # run: ./.github/scripts/install_softhsm.sh + # env: + # TMPDIR: ${{ runner.temp }} + # - name: Generate mocks + # run: make generate + # - name: Run unit tests + # run: make unit-test-go-pkcs11 + # - name: Pull Fabric Docker images + # run: make pull-latest-peer + # - name: Run scenario tests + # run: make scenario-test-go - node: - needs: verify-versions - runs-on: ubuntu-22.04 - name: Test Node - strategy: - fail-fast: false - matrix: - node-version: - - 14 - - 16 - - 18 - env: - SOFTHSM2_CONF: ${{ github.workspace }}/softhsm2.conf - steps: - - uses: actions/checkout@v3 - - uses: actions/setup-node@v3 - with: - node-version: ${{ matrix.node-version }} - - uses: actions/setup-go@v3 - with: - go-version: ${{ env.DEFAULT_GO_VERSION }} - - name: Run unit tests - run: make unit-test-node - - name: Install SoftHSM - run: ./.github/scripts/install_softhsm.sh - env: - TMPDIR: ${{ runner.temp }} - - name: Pull Fabric Docker images - run: make pull-latest-peer - - name: Run scenario tests - run: make scenario-test-node + # node: + # needs: verify-versions + # runs-on: ubuntu-22.04 + # name: Test Node + # strategy: + # fail-fast: false + # matrix: + # node-version: + # - 14 + # - 16 + # - 18 + # env: + # SOFTHSM2_CONF: ${{ github.workspace }}/softhsm2.conf + # steps: + # - uses: actions/checkout@v3 + # - uses: actions/setup-node@v3 + # with: + # node-version: ${{ matrix.node-version }} + # - uses: actions/setup-go@v3 + # with: + # go-version: ${{ env.DEFAULT_GO_VERSION }} + # - name: Run unit tests + # run: make unit-test-node + # - name: Install SoftHSM + # run: ./.github/scripts/install_softhsm.sh + # env: + # TMPDIR: ${{ runner.temp }} + # - name: Pull Fabric Docker images + # run: make pull-latest-peer + # - name: Run scenario tests + # run: make scenario-test-node - java: - needs: verify-versions - runs-on: ubuntu-22.04 - name: Test Java - strategy: - fail-fast: false - matrix: - java-version: - - 8 - - 11 - - 17 - steps: - - uses: actions/checkout@v3 - - uses: actions/setup-java@v3 - with: - java-version: ${{ matrix.java-version }} - distribution: temurin - - uses: actions/setup-go@v3 - with: - go-version: ${{ env.DEFAULT_GO_VERSION }} - - name: Pull Fabric Docker images - run: make pull-latest-peer - - name: Run unit and scenario tests - run: make scenario-test-java + # java: + # needs: verify-versions + # runs-on: ubuntu-22.04 + # name: Test Java + # strategy: + # fail-fast: false + # matrix: + # java-version: + # - 8 + # - 11 + # - 17 + # steps: + # - uses: actions/checkout@v3 + # - uses: actions/setup-java@v3 + # with: + # java-version: ${{ matrix.java-version }} + # distribution: temurin + # cache: maven + # - uses: actions/setup-go@v3 + # with: + # go-version: ${{ env.DEFAULT_GO_VERSION }} + # - name: Pull Fabric Docker images + # run: make pull-latest-peer + # - name: Run unit and scenario tests + # run: make scenario-test-java diff --git a/.github/workflows/verify-versions.yml b/.github/workflows/verify-versions.yml index 74874a326..16a3179ab 100644 --- a/.github/workflows/verify-versions.yml +++ b/.github/workflows/verify-versions.yml @@ -48,6 +48,7 @@ jobs: with: java-version: 17 distribution: temurin + cache: maven - name: Check Java artifact version shell: bash working-directory: java From 1d3d75f4e5a71c86936dfc707cb29e9c6feddb44 Mon Sep 17 00:00:00 2001 From: "mend-bolt-for-github[bot]" <42819689+mend-bolt-for-github[bot]@users.noreply.github.com> Date: Tue, 9 May 2023 10:24:38 +0000 Subject: [PATCH 4/4] Add .whitesource configuration file --- .whitesource | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 .whitesource diff --git a/.whitesource b/.whitesource new file mode 100644 index 000000000..9c7ae90b4 --- /dev/null +++ b/.whitesource @@ -0,0 +1,14 @@ +{ + "scanSettings": { + "baseBranches": [] + }, + "checkRunSettings": { + "vulnerableCheckRunConclusionLevel": "failure", + "displayMode": "diff", + "useMendCheckNames": true + }, + "issueSettings": { + "minSeverityLevel": "LOW", + "issueType": "DEPENDENCY" + } +} \ No newline at end of file