Skip to content

Commit

Permalink
build: add indy sdk to CI environment
Browse files Browse the repository at this point in the history
Signed-off-by: Michal Bajer <[email protected]>
  • Loading branch information
outSH committed May 26, 2022
1 parent e7b4d3c commit b1f0529
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .dcilintignore
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
19 changes: 15 additions & 4 deletions .github/workflows/.dast-nuclei-cmd-api-server.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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/[email protected]
with:
Expand All @@ -27,7 +38,7 @@ jobs:
- uses: actions/[email protected]
with:
go-version: 1.17

- run: go install -v github.com/projectdiscovery/nuclei/v2/cmd/[email protected]

- run: nuclei --version
Expand Down Expand Up @@ -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/[email protected]/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

Expand All @@ -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
Expand All @@ -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
Expand Down
24 changes: 24 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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/[email protected]
Expand Down Expand Up @@ -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/[email protected]
Expand Down

0 comments on commit b1f0529

Please sign in to comment.