From b1f05298cd3fb2a5c727e09696ae769edfe09aa7 Mon Sep 17 00:00:00 2001 From: Michal Bajer Date: Thu, 26 May 2022 13:11:10 +0000 Subject: [PATCH] build: add indy sdk to CI environment Signed-off-by: Michal Bajer --- .dcilintignore | 2 +- .../.dast-nuclei-cmd-api-server.yaml | 19 +++++++++++---- .github/workflows/ci.yml | 24 +++++++++++++++++++ 3 files changed, 40 insertions(+), 5 deletions(-) diff --git a/.dcilintignore b/.dcilintignore index e7cc56ab0fa..a568daa34e4 100644 --- a/.dcilintignore +++ b/.dcilintignore @@ -8,7 +8,7 @@ tools/docker/besu-all-in-one/supervisord.conf docs/source/conf.py # Cannot be edited due to configuration schema of third party software -examples/register-indy-data/req_discounted_cartrade.py +examples/register-indy-data/register-indy-data.py # Cannot be edited due to configuration schema of third party software tools/docker/indy-testnet/Dockerfile diff --git a/.github/workflows/.dast-nuclei-cmd-api-server.yaml b/.github/workflows/.dast-nuclei-cmd-api-server.yaml index b26bab62bd3..cc1eccb2555 100644 --- a/.github/workflows/.dast-nuclei-cmd-api-server.yaml +++ b/.github/workflows/.dast-nuclei-cmd-api-server.yaml @@ -11,6 +11,17 @@ jobs: nuclei-scan: runs-on: ubuntu-20.04 steps: + - name: Install Indy SDK + run: > + sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys CE7709D068DB5E88 \ + && sudo add-apt-repository "deb https://repo.sovrin.org/sdk/deb bionic stable" \ + && sudo apt-get update \ + && sudo apt-get install -y \ + libindy \ + libnullpay \ + libvcx \ + indy-cli + - name: Set up NodeJS v16.9.1 uses: actions/setup-node@v2.1.2 with: @@ -27,7 +38,7 @@ jobs: - uses: actions/setup-go@v3.0.0 with: go-version: 1.17 - + - run: go install -v github.com/projectdiscovery/nuclei/v2/cmd/nuclei@v2.6.3 - run: nuclei --version @@ -72,7 +83,7 @@ jobs: - name: Install Fabric connector into the API server run: echo "$(jq '.plugins += [{"packageName":"@hyperledger/cactus-plugin-ledger-connector-fabric", "type":"org.hyperledger.cactus.plugin_import_type.LOCAL", "action":"org.hyperledger.cactus.plugin_import_action.INSTALL", "options":{"instanceId":"some-unique-fabric-connector-instance-id", "peerBinary":"/fabric-samples/bin/peer", "connectionProfile":"{}", "dockerBinary":"usr/local/bin/docker","cliContainerEnv":{"CORE_PEER_LOCALMSPID":"Org1MSP","CORE_PEER_ADDRESS":"peer0.org1.example.com:7051","CORE_PEER_MSPCONFIGPATH":"/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp","CORE_PEER_TLS_ROOTCERT_FILE":"/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt","ORDERER_TLS_ROOTCERT_FILE":"/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem"},"discoveryOptions":{"enabled":true,"asLocalhost":true}}}] ' .config.json)" > .config.json - + - name: Install Besu connector into the API server run: echo "$(jq '.plugins += [{"packageName":"@hyperledger/cactus-plugin-ledger-connector-besu","type":"org.hyperledger.cactus.plugin_import_type.LOCAL","action":"org.hyperledger.cactus.plugin_import_action.INSTALL","options":{"rpcApiHttpHost":"http://localhost:8545", "rpcApiWsHost":"ws://localhost:8546", "instanceId":"some-unique-besu-connector-instance-id"}}]' .config.json)" > .config.json @@ -91,7 +102,7 @@ jobs: # && echo -e " project-name: \"${GITHUB_REPOSITORY#*/}\"" >> ~/nuclei-github-config.yaml \ # && echo -e " issue-label: \"Nuclei\"" >> ~/nuclei-github-config.yaml \ # && echo "githubconfig=-rc ~/nuclei-github-config.yaml" >> $GITHUB_ENV - + # shell: bash # - run: ls -alt @@ -102,7 +113,7 @@ jobs: # Needed because the wait-on syntax otherwise keeps thinking that # there is a problem due to our self signed certificates on the # test instance of the API server - NODE_TLS_REJECT_UNAUTHORIZED: 0 + NODE_TLS_REJECT_UNAUTHORIZED: 0 with: build: yarn --version start: yarn start:api-server diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 89887970380..c84666d206d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -49,6 +49,18 @@ jobs: with: swap-size-gb: 10 + - name: Install Indy SDK + if: steps.run_result.outputs.run_result != 'success' + run: > + sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys CE7709D068DB5E88 \ + && sudo add-apt-repository "deb https://repo.sovrin.org/sdk/deb bionic stable" \ + && sudo apt-get update \ + && sudo apt-get install -y \ + libindy \ + libnullpay \ + libvcx \ + indy-cli + - name: Use Node.js v14.19.1 if: steps.run_result.outputs.run_result != 'success' uses: actions/setup-node@v2.1.2 @@ -92,6 +104,18 @@ jobs: with: swap-size-gb: 10 + - name: Install Indy SDK + if: steps.run_result.outputs.run_result != 'success' + run: > + sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys CE7709D068DB5E88 \ + && sudo add-apt-repository "deb https://repo.sovrin.org/sdk/deb bionic stable" \ + && sudo apt-get update \ + && sudo apt-get install -y \ + libindy \ + libnullpay \ + libvcx \ + indy-cli + - name: Use Node.js v16.14.2 if: steps.run_result.outputs.run_result != 'success' uses: actions/setup-node@v2.1.2