diff --git a/.github/workflows/.dast-nuclei-cmd-api-server.yaml b/.github/workflows/.dast-nuclei-cmd-api-server.yaml deleted file mode 100644 index 6f1f0d3ff6..0000000000 --- a/.github/workflows/.dast-nuclei-cmd-api-server.yaml +++ /dev/null @@ -1,145 +0,0 @@ -name: DAST_Scan_Nuclei - -env: - NODEJS_VERSION: v18.18.2 - -on: - push: - branches: [main, dev] - - pull_request: - branches: [main, dev] - -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 \ - && sudo rm -f /etc/apt/sources.list.d/sovrin.list* - - - name: Set up NodeJS ${{ env.NODEJS_VERSION }} - uses: actions/setup-node@v3.6.0 - with: - node-version: ${{ env.NODEJS_VERSION }} - - - name: Install jq - run: sudo apt update && sudo apt install -y jq - - - name: Verify jq - run: jq --version - - - uses: actions/checkout@v3.5.2 - - - uses: actions/setup-go@v4.0.0 - with: - go-version: 1.17 - - - run: go install -v github.com/projectdiscovery/nuclei/v2/cmd/nuclei@v2.7.3 - - - run: nuclei --version - - - run: npm run configure - - - name: Create URLs file for Nuclei - run: | - echo https://localhost:4000/ > urls.txt - echo https://localhost:4000/api/v1/api-server/healthcheck >> urls.txt - echo https://localhost:4000/api/v1/plugins/@hyperledger/cactus-plugin-consortium-manual/node/jws >> urls.txt - echo https://localhost:4000/api/v1/plugins/@hyperledger/cactus-plugin-consortium-manual/consortium/jws >> urls.txt - echo https://localhost:4000/api/v1/plugins/@hyperledger/cactus-plugin-consortium-manual/get-prometheus-exporter-metrics >> urls.txt - echo https://localhost:4000/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-fabric/run-transaction >> urls.txt - echo https://localhost:4000/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-fabric/get-transaction-receipt-by-txid >> urls.txt - echo https://localhost:4000/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-fabric/deploy-contract-go-source >> urls.txt - echo https://localhost:4000/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-fabric/deploy-contract >> urls.txt - echo https://localhost:4000/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-fabric/get-prometheus-exporter-metrics >> urls.txt - echo https://localhost:4000/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-besu/deploy-contract-solidity-bytecode >> urls.txt - echo https://localhost:4000/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-besu/get-balance >> urls.txt - echo https://localhost:4000/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-besu/get-block >> urls.txt - echo https://localhost:4000/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-besu/run-transaction >> urls.txt - echo https://localhost:4000/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-besu/get-transaction >> urls.txt - echo https://localhost:4000/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-besu/get-past-logs >> urls.txt - echo https://localhost:4000/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-besu/invoke-contract >> urls.txt - echo https://localhost:4000/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-besu/sign-transaction >> urls.txt - echo https://localhost:4000/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-besu/get-prometheus-exporter-metrics >> urls.txt - echo https://localhost:4000/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-besu/get-besu-record >> urls.txt - - - name: Show file content - run: | - pwd - ls -la - cat urls.txt - - # TODO: Clean up comments - # TODO: Remove --debug flag - - - run: yarn generate-api-server-config - - - run: echo "$(jq '.authorizationProtocol = "NONE"' .config.json)" > .config.json - - - name: Install Fabric connector into the API server - #Uncomment line 87 when the fix for the cactus-plugin-ledger-connector-fabric has been published to npm and remove live 89 - # 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 - #Line 89 is a workaround for the cactus-plugin-connector-fabric issue - 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":{ "packageSrc":"/home/runner/work/cacti/cacti/packages/cactus-plugin-ledger-connector-fabric/", "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 - - - name: Run Besu all-in-one image - run: | - docker run -d -p 0.0.0.0:8545:8545/tcp -p 0.0.0.0:8546:8546/tcp -p 0.0.0.0:8888:8888/tcp -p 0.0.0.0:9001:9001/tcp -p 0.0.0.0:9545:9545/tcp ghcr.io/hyperledger/cactus-besu-all-in-one:2022-04-14-dda3f00 - until curl --fail -X POST --data '{"jsonrpc":"2.0","method":"eth_chainId","params":[],"id":1}' localhost:8545; do sleep 5; done - - # - run: | - # touch ~/nuclei-github-config.yaml \ - # && echo -e "severity: critical,high" >> ~/nuclei-github-config.yaml \ - # && echo -e "github:" >> ~/nuclei-github-config.yaml \ - # && echo -e " username: \"$GITHUB_ACTOR\"" >> ~/nuclei-github-config.yaml \ - # && echo -e " owner: \"${GITHUB_REPOSITORY%%/*}\"" >> ~/nuclei-github-config.yaml \ - # && echo -e " token: \"${{ inputs.github-token }}\"" >> ~/nuclei-github-config.yaml \ - # && 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 - - - name: Start API Server & Run DAST - uses: BerniWittmann/background-server-action@v1.1.0 - env: - # 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 - with: - build: yarn --version - start: yarn start:api-server - command: "nuclei -update-templates --config=.nuclei-config.yaml --list=urls.txt --sarif-export ~/nuclei.sarif --output nuclei.log" - wait-on: "https://localhost:4000/api/v1/api-server/healthcheck" - # wait for 10 minutes for the server to respond - wait-on-timeout: 120 - - - run: pwd - - - run: ls -alt - - - name: GitHub Workflow artifacts - uses: actions/upload-artifact@v3.0.0 - with: - name: nuclei.log - path: nuclei.log - - # - name: GitHub Security Dashboard Alerts update - # uses: github/codeql-action/upload-sarif@v1 - # with: - # sarif_file: ~/nuclei.sarif diff --git a/.github/workflows/actionlint.yaml b/.github/workflows/actionlint.yaml deleted file mode 100644 index 31c06b1e19..0000000000 --- a/.github/workflows/actionlint.yaml +++ /dev/null @@ -1,16 +0,0 @@ -name: Lint GitHub Actions workflows -on: - workflow_call: - -jobs: - actionlint: - runs-on: ubuntu-22.04 - steps: - - uses: actions/checkout@v3.5.3 - - name: Download actionlint - id: get_actionlint - run: bash <(curl https://raw.githubusercontent.com/rhysd/actionlint/v1.6.25/scripts/download-actionlint.bash) - shell: bash - - name: Check workflow files - run: ${{ steps.get_actionlint.outputs.executable }} -color - shell: bash diff --git a/.github/workflows/all-nodejs-packages-publish.yaml b/.github/workflows/all-nodejs-packages-publish.yaml deleted file mode 100644 index 3624acf3d9..0000000000 --- a/.github/workflows/all-nodejs-packages-publish.yaml +++ /dev/null @@ -1,43 +0,0 @@ -name: all-nodejs-packages-publish - -env: - NODEJS_VERSION: v18.18.2 - -on: - push: - - # Publish `v1.2.3` tags as releases. - tags: - - v* - -concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} - cancel-in-progress: true - -jobs: - - build-and-publish-packages: - runs-on: ubuntu-20.04 - steps: - - uses: actions/checkout@v3.5.2 - - run: git fetch --unshallow --prune - - uses: actions/setup-node@v3.6.0 - with: - always-auth: true - node-version: ${{ env.NODEJS_VERSION }} - registry-url: 'https://registry.npmjs.org' - - name: ./tools/ci.sh - run: ./tools/ci.sh - env: - DEV_BUILD_DISABLED: false - FULL_BUILD_DISABLED: false - JEST_TEST_RUNNER_DISABLED: true - TAPE_TEST_RUNNER_DISABLED: true - - name: lerna-publish - env: - NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} - run: | - git config --global user.email "npm-ci@hyperledger.org" - git config --global user.name "hyperledger-ghci" - npm whoami - yarn lerna publish from-git --yes --loglevel=debug diff --git a/.github/workflows/besu-all-in-one-publish.yaml b/.github/workflows/besu-all-in-one-publish.yaml deleted file mode 100644 index b497478cc2..0000000000 --- a/.github/workflows/besu-all-in-one-publish.yaml +++ /dev/null @@ -1,60 +0,0 @@ -name: besu-all-in-one-publish - -on: - push: - # Publish `main` as Docker `latest` image. - branches: - - main - - # Publish `v1.2.3` tags as releases. - tags: - - v* - -concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} - cancel-in-progress: true - -env: - IMAGE_NAME: cactus-besu-all-in-one - -jobs: - # Push image to GitHub Packages. - # See also https://docs.docker.com/docker-hub/builds/ - build-tag-push-container: - runs-on: ubuntu-20.04 - env: - DOCKER_BUILDKIT: 1 - DOCKERFILE_PATH: ./tools/docker/besu-all-in-one/Dockerfile - DOCKER_BUILD_DIR: ./tools/docker/besu-all-in-one/ - permissions: - packages: write - contents: read - - steps: - - uses: actions/checkout@v3.5.2 - - - name: Build image - run: docker build $DOCKER_BUILD_DIR --file $DOCKERFILE_PATH --tag $IMAGE_NAME --label "runnumber=${GITHUB_RUN_ID}" - - - name: Log in to registry - # This is where you will update the PAT to GITHUB_TOKEN - run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin - - - name: Push image - run: | - SHORTHASH=$(git rev-parse --short "$GITHUB_SHA") - TODAYS_DATE="$(date +%F)" - DOCKER_TAG="$TODAYS_DATE-$SHORTHASH" - IMAGE_ID=ghcr.io/${{ github.repository_owner }}/$IMAGE_NAME - # Change all uppercase to lowercase - IMAGE_ID=$(echo $IMAGE_ID | tr '[A-Z]' '[a-z]') - # Strip git ref prefix from version - VERSION=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,') - # Strip "v" prefix from tag name - [[ "${{ github.ref }}" == "refs/tags/"* ]] && VERSION=$(echo $VERSION | sed -e 's/^v//') - # Do not use the `latest` tag at all, tag with date + git short hash if there is no git tag - [ "$VERSION" == "main" ] && VERSION=$DOCKER_TAG - echo IMAGE_ID=$IMAGE_ID - echo VERSION=$VERSION - docker tag $IMAGE_NAME $IMAGE_ID:$VERSION - docker push $IMAGE_ID:$VERSION diff --git a/.github/workflows/cacti-dev-container-vscode-publish.yaml b/.github/workflows/cacti-dev-container-vscode-publish.yaml deleted file mode 100644 index 521f520e2b..0000000000 --- a/.github/workflows/cacti-dev-container-vscode-publish.yaml +++ /dev/null @@ -1,67 +0,0 @@ -name: connector-fabric-publish - -env: - NODEJS_VERSION: v20.3.0 - -on: - push: - # Publish `v1.2.3` tags as releases. - tags: - - v* - -concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} - cancel-in-progress: true - -env: - IMAGE_NAME: cacti-dev-container-vscode - -jobs: - # Push image to GitHub Packages. - # See also https://docs.docker.com/docker-hub/builds/ - build-tag-push-container: - runs-on: ubuntu-20.04 - env: - DOCKER_BUILDKIT: 1 - DOCKERFILE_PATH: ./packages/cactus-plugin-ledger-connector-fabric/Dockerfile - DOCKER_BUILD_DIR: ./packages/cactus-plugin-ledger-connector-fabric/ - permissions: - packages: write - contents: read - - steps: - - name: Use Node.js ${{ env.NODEJS_VERSION }} - uses: actions/setup-node@v3.6.0 - with: - node-version: ${{ env.NODEJS_VERSION }} - - - uses: actions/checkout@v3.5.2 - - - name: npm_install_@devcontainers/cli@0.44.0 - run: npm install -g @devcontainers/cli@0.44.0 - - - name: npx_yes_devcontainers_cli_build - run: npx --yes @devcontainers/cli@0.44.0 build --workspace-folder=./ --log-level=trace --push=false --config=./.devcontainer/devcontainer.json --image-name=$IMAGE_NAME - - - name: Log in to registry - # This is where you will update the PAT to GITHUB_TOKEN - run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin - - - name: Push image - run: | - SHORTHASH=$(git rev-parse --short "$GITHUB_SHA") - TODAYS_DATE="$(date +%F)" - DOCKER_TAG="$TODAYS_DATE-$SHORTHASH" - IMAGE_ID=ghcr.io/${{ github.repository_owner }}/$IMAGE_NAME - # Change all uppercase to lowercase - IMAGE_ID=$(echo $IMAGE_ID | tr '[A-Z]' '[a-z]') - # Strip git ref prefix from version - VERSION=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,') - # Strip "v" prefix from tag name - [[ "${{ github.ref }}" == "refs/tags/"* ]] && VERSION=$(echo $VERSION | sed -e 's/^v//') - # Do not use the `latest` tag at all, tag with date + git short hash if there is no git tag - [ "$VERSION" == "main" ] && VERSION=$DOCKER_TAG - echo IMAGE_ID=$IMAGE_ID - echo VERSION=$VERSION - docker tag $IMAGE_NAME $IMAGE_ID:$VERSION - docker push $IMAGE_ID:$VERSION diff --git a/.github/workflows/cactus-whitepaper-publish.yaml b/.github/workflows/cactus-whitepaper-publish.yaml deleted file mode 100644 index c4e7701098..0000000000 --- a/.github/workflows/cactus-whitepaper-publish.yaml +++ /dev/null @@ -1,60 +0,0 @@ -name: whitepaper-publish - -on: - push: - # Publish `main` as Docker `latest` image. - branches: - - main - - # Publish `v1.2.3` tags as releases. - tags: - - v* - -concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} - cancel-in-progress: true - -env: - IMAGE_NAME: cactus-whitepaper - -jobs: - # Push image to GitHub Packages. - # See also https://docs.docker.com/docker-hub/builds/ - build-tag-push-container: - runs-on: ubuntu-20.04 - env: - DOCKER_BUILDKIT: 1 - DOCKERFILE_PATH: ./whitepaper/Dockerfile - DOCKER_BUILD_DIR: ./whitepaper/ - permissions: - packages: write - contents: read - - steps: - - uses: actions/checkout@v3.5.2 - - - name: Build image - run: docker build $DOCKER_BUILD_DIR --file $DOCKERFILE_PATH --tag $IMAGE_NAME --label "runnumber=${GITHUB_RUN_ID}" - - - name: Log in to registry - # This is where you will update the PAT to GITHUB_TOKEN - run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin - - - name: Push image - run: | - SHORTHASH=$(git rev-parse --short "$GITHUB_SHA") - TODAYS_DATE="$(date +%F)" - DOCKER_TAG="$TODAYS_DATE-$SHORTHASH" - IMAGE_ID=ghcr.io/${{ github.repository_owner }}/$IMAGE_NAME - # Change all uppercase to lowercase - IMAGE_ID=$(echo $IMAGE_ID | tr '[A-Z]' '[a-z]') - # Strip git ref prefix from version - VERSION=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,') - # Strip "v" prefix from tag name - [[ "${{ github.ref }}" == "refs/tags/"* ]] && VERSION=$(echo $VERSION | sed -e 's/^v//') - # Do not use the `latest` tag at all, tag with date + git short hash if there is no git tag - [ "$VERSION" == "main" ] && VERSION=$DOCKER_TAG - echo IMAGE_ID=$IMAGE_ID - echo VERSION=$VERSION - docker tag $IMAGE_NAME $IMAGE_ID:$VERSION - docker push $IMAGE_ID:$VERSION diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml deleted file mode 100644 index 6ec30b551c..0000000000 --- a/.github/workflows/ci.yaml +++ /dev/null @@ -1,2099 +0,0 @@ ---- -env: - NODEJS_VERSION: v18.18.2 -jobs: - ActionLint: - uses: ./.github/workflows/actionlint.yaml - DCI-Lint: - name: DCI-Lint - runs-on: ubuntu-20.04 - steps: - - id: lint-git-repo - name: Lint Git Repo - uses: petermetz/gh-action-dci-lint@v0.6.1 - with: - lint-git-repo-request: '{"cloneUrl": "${{ github.server_url }}/${{ github.repository }}.git", "fetchArgs": ["--update-head-ok", "--no-tags", "--prune", "--progress", "--no-recurse-submodules", "--depth=1", "origin" ,"+${{ github.sha }}:${{ github.ref }}"], "checkoutArgs": [ "${{ github.ref }}"], "targetPhrasePatterns": [], "configDefaultsUrl": "https://inclusivenaming.org/json/dci-lint-config-recommended-v1.json" }' - - name: Get the output response - run: echo "${{ steps.lint-git-repo.outputs.lint-git-repo-response }}" - build-dev: - continue-on-error: false - env: - DEV_BUILD_DISABLED: false - FULL_BUILD_DISABLED: true - JEST_TEST_RUNNER_DISABLED: true - TAPE_TEST_RUNNER_DISABLED: true - TOOLS_VALIDATE_BUNDLE_NAMES_DISABLED: true - CUSTOM_CHECKS_DISABLED: true - CONFIGURE_DISABLED: false - CHECK_WORK_TREE_STATUS_DISABLED: true - runs-on: ubuntu-20.04 - steps: - - name: Use Node.js ${{ env.NODEJS_VERSION }} - uses: actions/setup-node@v3.6.0 - with: - node-version: ${{ env.NODEJS_VERSION }} - - uses: actions/checkout@v3.5.2 - - - id: yarn-cache - name: Initialize Yarn Cache - uses: actions/cache@v3.3.1 - with: - key: ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} - path: ./.yarn/ - restore-keys: | - ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} - - - if : ${{ (steps.yarn-cache.outputs.cache-hit != 'true') }} - name: tools_ci_sh - run: ./tools/ci.sh - - yarn_lint: - continue-on-error: false - env: - DEV_BUILD_DISABLED: false - FULL_BUILD_DISABLED: true - JEST_TEST_RUNNER_DISABLED: true - TAPE_TEST_RUNNER_DISABLED: true - TOOLS_VALIDATE_BUNDLE_NAMES_DISABLED: true - CUSTOM_CHECKS_DISABLED: true - needs: build-dev - runs-on: ubuntu-20.04 - steps: - - name: Use Node.js ${{ env.NODEJS_VERSION }} - uses: actions/setup-node@v3.6.0 - with: - node-version: ${{ env.NODEJS_VERSION }} - - uses: actions/checkout@v3.5.2 - - id: yarn-cache - name: Restore Yarn Cache - uses: actions/cache@v3.3.1 - with: - key: ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} - path: ./.yarn/ - restore-keys: | - ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} - - run: ./tools/ci.sh - - run: yarn lint - yarn_codegen: - continue-on-error: false - env: - DEV_BUILD_DISABLED: true - FULL_BUILD_DISABLED: true - JEST_TEST_RUNNER_DISABLED: true - TAPE_TEST_RUNNER_DISABLED: true - TOOLS_VALIDATE_BUNDLE_NAMES_DISABLED: true - CUSTOM_CHECKS_DISABLED: true - CONFIGURE_DISABLED: false - needs: build-dev - runs-on: ubuntu-20.04 - steps: - - name: Use Node.js ${{ env.NODEJS_VERSION }} - uses: actions/setup-node@v3.6.0 - with: - node-version: ${{ env.NODEJS_VERSION }} - - uses: actions/checkout@v3.5.2 - - - id: yarn-cache - name: Restore Yarn Cache - uses: actions/cache@v3.3.1 - with: - key: ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} - path: ./.yarn/ - restore-keys: | - ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} - - run: ./tools/ci.sh - - run: git status --porcelain - - run: git status --porcelain | wc -l - - run: yarn codegen - - run: git status --porcelain - - run: git status --porcelain | wc -l - - - name: Set env.GIT_INDEX_FILE_COUNT - id: set_env_git_index_file_count - run: | - echo "GIT_INDEX_FILE_COUNT=$(git status --porcelain | wc -l)" >> $GITHUB_ENV - - - name: Print env.GIT_INDEX_FILE_COUNT - id: print_env_git_index_file_count - run: | - echo "${{ env.GIT_INDEX_FILE_COUNT }}" - - - uses: actions/github-script@v6.4.1 - id: set-result-git_index_file_count - with: - script: | - const { GIT_INDEX_FILE_COUNT } = process.env; - console.log(`env.GIT_INDEX_FILE_COUNT ${GIT_INDEX_FILE_COUNT}`); - return parseInt(GIT_INDEX_FILE_COUNT, 10); - result-encoding: string - - - name: Get result Git Index File Count - id: get_result_git_index_file_count - run: echo "${{steps.set-result-git_index_file_count.outputs.result}}" - - - name: Check CodeGen Side-effects - if: ${{ steps.set-result-git_index_file_count.outputs.result != 0 }} - uses: actions/github-script@v6.4.1 - with: - script: | - const failMsg = "yarn codegen script produced version control " + - "side-effects: source files have been changed by it that are " + - "otherwise are under version control. " + - "This means (99% of the time) that you need to run the " + - "yarn codegen script locally and then include the changes it " + - "makes in your own commit when submitting your pull request."; - core.setFailed(failMsg) - - yarn_custom_checks: - continue-on-error: false - env: - DEV_BUILD_DISABLED: false - FULL_BUILD_DISABLED: true - JEST_TEST_RUNNER_DISABLED: true - TAPE_TEST_RUNNER_DISABLED: true - TOOLS_VALIDATE_BUNDLE_NAMES_DISABLED: true - CUSTOM_CHECKS_DISABLED: false - CONFIGURE_DISABLED: false - CACTI_CUSTOM_CHECKS_REQUIRED_OPENAPI_SPEC_VERSION: 3.0.3 - needs: build-dev - runs-on: ubuntu-20.04 - steps: - - name: Use Node.js ${{ env.NODEJS_VERSION }} - uses: actions/setup-node@v3.6.0 - with: - node-version: ${{ env.NODEJS_VERSION }} - - uses: actions/checkout@v3.5.2 - - id: yarn-cache - name: Restore Yarn Cache - uses: actions/cache@v3.3.1 - with: - key: ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} - path: ./.yarn/ - restore-keys: | - ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} - - run: ./tools/ci.sh - yarn_tools_validate_bundle_names: - continue-on-error: false - env: - DEV_BUILD_DISABLED: false - FULL_BUILD_DISABLED: true - JEST_TEST_RUNNER_DISABLED: true - TAPE_TEST_RUNNER_DISABLED: true - TOOLS_VALIDATE_BUNDLE_NAMES_DISABLED: false - CUSTOM_CHECKS_DISABLED: true - CONFIGURE_DISABLED: false - needs: build-dev - runs-on: ubuntu-20.04 - steps: - - name: Use Node.js ${{ env.NODEJS_VERSION }} - uses: actions/setup-node@v3.6.0 - with: - node-version: ${{ env.NODEJS_VERSION }} - - uses: actions/checkout@v3.5.2 - - id: yarn-cache - name: Restore Yarn Cache - uses: actions/cache@v3.3.1 - with: - key: ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} - path: ./.yarn/ - restore-keys: | - ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} - - run: ./tools/ci.sh - cactus-api-client: - continue-on-error: false - env: - DEV_BUILD_DISABLED: false - FULL_BUILD_DISABLED: true - JEST_TEST_PATTERN: packages/cactus-api-client/src/test/typescript/(unit|integration|benchmark)/.*/*.test.ts - JEST_TEST_RUNNER_DISABLED: false - TAPE_TEST_PATTERN: ./packages/cactus-api-client/src/test/typescript/integration/default-consortium-provider.test.ts - TAPE_TEST_RUNNER_DISABLED: false - needs: build-dev - runs-on: ubuntu-20.04 - steps: - - name: Use Node.js ${{ env.NODEJS_VERSION }} - uses: actions/setup-node@v3.6.0 - with: - node-version: ${{ env.NODEJS_VERSION }} - - uses: actions/checkout@v3.5.2 - - - id: yarn-cache - name: Restore Yarn Cache - uses: actions/cache@v3.3.1 - with: - key: ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} - path: ./.yarn/ - restore-keys: | - ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} - - - run: ./tools/ci.sh - cactus-cmd-api-server: - continue-on-error: false - env: - DEV_BUILD_DISABLED: false - FULL_BUILD_DISABLED: true - JEST_TEST_PATTERN: packages/cactus-cmd-api-server/src/test/typescript/(unit|integration|benchmark)/.*/*.test.ts - JEST_TEST_RUNNER_DISABLED: false - TAPE_TEST_PATTERN: >- - --files={./packages/cactus-cmd-api-server/src/test/typescript/integration/plugin-import-from-github.test.ts,./packages/cactus-cmd-api-server/src/test/typescript/integration/plugin-import-without-install.test.ts,./packages/cactus-cmd-api-server/src/test/typescript/integration/remote-plugin-imports.test.ts,./packages/cactus-cmd-api-server/src/test/typescript/unit/config/self-signed-certificate-generator/certificates-work-for-mutual-tls.test.ts,./packages/cactus-cmd-api-server/src/test/typescript/unit/config/self-signed-certificate-generator/generates-working-certificates.test.ts,./packages/cactus-cmd-api-server/src/test/typescript/unit/grpc-js-proto-loader-client-healthcheck.test.ts,./packages/cactus-cmd-api-server/src/test/typescript/unit/grpc-proto-gen-ts-client-healthcheck.test.ts,./packages/cactus-cmd-api-server/src/test/typescript/unit/grpc-proto-gen-ts-client-m-tls-enabled.test.ts,./packages/cactus-cmd-api-server/src/test/typescript/unit/plugins/install-basic-plugin-consortium-manual.test.ts,./packages/cactus-cmd-api-server/src/test/typescript/unit/plugins/install-basic-plugin-keychain-memory.test.ts,./packages/cactus-cmd-api-server/src/test/typescript/unit/plugins/install-basic-plugin-ledger-connector-fabric-0-7-0.test.ts,./packages/cactus-cmd-api-server/src/test/typescript/unit/plugins/install-basic-plugin-ledger-connector-quorum-0-7-0.test.ts} - TAPE_TEST_RUNNER_DISABLED: false - needs: build-dev - runs-on: ubuntu-20.04 - steps: - - name: Use Node.js ${{ env.NODEJS_VERSION }} - uses: actions/setup-node@v3.6.0 - with: - node-version: ${{ env.NODEJS_VERSION }} - - uses: actions/checkout@v3.5.2 - - - id: yarn-cache - name: Restore Yarn Cache - uses: actions/cache@v3.3.1 - with: - key: ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} - path: ./.yarn/ - restore-keys: | - ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} - - - run: ./tools/ci.sh - cactus-cmd-socketio-server: - continue-on-error: false - env: - FULL_BUILD_DISABLED: true - JEST_TEST_PATTERN: packages/cactus-cmd-socketio-server/src/test/typescript/(unit|integration|benchmark)/.*/*.test.ts - JEST_TEST_RUNNER_DISABLED: false - TAPE_TEST_RUNNER_DISABLED: true - needs: build-dev - runs-on: ubuntu-20.04 - steps: - - name: Use Node.js ${{ env.NODEJS_VERSION }} - uses: actions/setup-node@v3.6.0 - with: - node-version: ${{ env.NODEJS_VERSION }} - - uses: actions/checkout@v3.5.2 - - - id: yarn-cache - name: Restore Yarn Cache - uses: actions/cache@v3.3.1 - with: - key: ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} - path: ./.yarn/ - restore-keys: | - ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} - - - run: ./tools/ci.sh - - cactus-common: - continue-on-error: false - env: - DEV_BUILD_DISABLED: false - FULL_BUILD_DISABLED: true - JEST_TEST_PATTERN: packages/cactus-common/src/test/typescript/(unit|integration|benchmark)/.*/*.test.ts - JEST_TEST_RUNNER_DISABLED: false - TAPE_TEST_PATTERN: '--files={./packages/cactus-common/src/test/typescript/unit/key-converter.test.ts,./packages/cactus-common/src/test/typescript/unit/logging/logger.test.ts}' - TAPE_TEST_RUNNER_DISABLED: false - needs: build-dev - runs-on: ubuntu-20.04 - steps: - - name: Use Node.js ${{ env.NODEJS_VERSION }} - uses: actions/setup-node@v3.6.0 - with: - node-version: ${{ env.NODEJS_VERSION }} - - uses: actions/checkout@v3.5.2 - - - id: yarn-cache - name: Restore Yarn Cache - uses: actions/cache@v3.3.1 - with: - key: ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} - path: ./.yarn/ - restore-keys: | - ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} - - - run: ./tools/ci.sh - cactus-core: - continue-on-error: false - env: - FULL_BUILD_DISABLED: true - JEST_TEST_PATTERN: packages/cactus-core/src/test/typescript/(unit|integration|benchmark)/.*/*.test.ts - JEST_TEST_RUNNER_DISABLED: false - TAPE_TEST_RUNNER_DISABLED: true - needs: build-dev - runs-on: ubuntu-20.04 - steps: - - name: Use Node.js ${{ env.NODEJS_VERSION }} - uses: actions/setup-node@v3.6.0 - with: - node-version: ${{ env.NODEJS_VERSION }} - - uses: actions/checkout@v3.5.2 - - - id: yarn-cache - name: Restore Yarn Cache - uses: actions/cache@v3.3.1 - with: - key: ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} - path: ./.yarn/ - restore-keys: | - ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} - - run: ./tools/ci.sh - cactus-core-api: - continue-on-error: false - env: - FULL_BUILD_DISABLED: true - JEST_TEST_PATTERN: packages/cactus-core-api/src/test/typescript/(unit|integration|benchmark)/.*/*.test.ts - JEST_TEST_RUNNER_DISABLED: false - TAPE_TEST_RUNNER_DISABLED: true - needs: build-dev - runs-on: ubuntu-20.04 - steps: - - name: Use Node.js ${{ env.NODEJS_VERSION }} - uses: actions/setup-node@v3.6.0 - with: - node-version: ${{ env.NODEJS_VERSION }} - - uses: actions/checkout@v3.5.2 - - - id: yarn-cache - name: Restore Yarn Cache - uses: actions/cache@v3.3.1 - with: - key: ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} - path: ./.yarn/ - restore-keys: | - ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} - - run: ./tools/ci.sh - cactus-example-carbon-accounting-backend: - continue-on-error: false - env: - FULL_BUILD_DISABLED: true - JEST_TEST_PATTERN: examples/cactus-example-carbon-accounting-backend/src/test/typescript/(unit|integration|benchmark)/.*/*.test.ts - JEST_TEST_RUNNER_DISABLED: false - TAPE_TEST_PATTERN: ./examples/cactus-example-carbon-accounting-backend/src/test/typescript/integration/admin-enroll-v1-endpoint.test.ts - TAPE_TEST_RUNNER_DISABLED: false - needs: build-dev - runs-on: ubuntu-20.04 - steps: - - name: Use Node.js ${{ env.NODEJS_VERSION }} - uses: actions/setup-node@v3.6.0 - with: - node-version: ${{ env.NODEJS_VERSION }} - - uses: actions/checkout@v3.5.2 - - - id: yarn-cache - name: Restore Yarn Cache - uses: actions/cache@v3.3.1 - with: - key: ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} - path: ./.yarn/ - restore-keys: | - ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} - - run: ./tools/ci.sh - cactus-example-carbon-accounting-business-logic-plugin: - continue-on-error: false - env: - FULL_BUILD_DISABLED: true - JEST_TEST_PATTERN: examples/cactus-example-carbon-accounting-business-logic-plugin/src/test/typescript/(unit|integration|benchmark)/.*/*.test.ts - JEST_TEST_RUNNER_DISABLED: false - TAPE_TEST_RUNNER_DISABLED: true - needs: build-dev - runs-on: ubuntu-20.04 - steps: - - name: Use Node.js ${{ env.NODEJS_VERSION }} - uses: actions/setup-node@v3.6.0 - with: - node-version: ${{ env.NODEJS_VERSION }} - - uses: actions/checkout@v3.5.2 - - - id: yarn-cache - name: Restore Yarn Cache - uses: actions/cache@v3.3.1 - with: - key: ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} - path: ./.yarn/ - restore-keys: | - ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} - - run: ./tools/ci.sh - cactus-example-carbon-accounting-frontend: - continue-on-error: false - env: - DEV_BUILD_DISABLED: false - FULL_BUILD_DISABLED: true - JEST_TEST_PATTERN: examples/cactus-example-carbon-accounting-frontend/src/test/typescript/(unit|integration|benchmark)/.*/*.test.ts - JEST_TEST_RUNNER_DISABLED: true - TAPE_TEST_RUNNER_DISABLED: true - needs: build-dev - runs-on: ubuntu-20.04 - steps: - - name: Use Node.js ${{ env.NODEJS_VERSION }} - uses: actions/setup-node@v3.6.0 - with: - node-version: ${{ env.NODEJS_VERSION }} - - uses: actions/checkout@v3.5.2 - - - id: yarn-cache - name: Restore Yarn Cache - uses: actions/cache@v3.3.1 - with: - key: ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} - path: ./.yarn/ - restore-keys: | - ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} - - run: ./tools/ci.sh - cactus-example-supply-chain-backend: - continue-on-error: false - env: - FULL_BUILD_DISABLED: true - JEST_TEST_PATTERN: examples/cactus-example-supply-chain-backend/src/test/typescript/(unit|integration|benchmark)/.*/*.test.ts - JEST_TEST_RUNNER_DISABLED: false - TAPE_TEST_PATTERN: '--files={./examples/cactus-example-supply-chain-backend/src/test/typescript/integration/supply-chain-backend-api-calls.test.ts,./examples/cactus-example-supply-chain-backend/src/test/typescript/integration/supply-chain-cli-via-npm-script.test.ts}' - TAPE_TEST_RUNNER_DISABLED: false - needs: build-dev - runs-on: ubuntu-20.04 - steps: - - name: Use Node.js ${{ env.NODEJS_VERSION }} - uses: actions/setup-node@v3.6.0 - with: - node-version: ${{ env.NODEJS_VERSION }} - - uses: actions/checkout@v3.5.2 - - - id: yarn-cache - name: Restore Yarn Cache - uses: actions/cache@v3.3.1 - with: - key: ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} - path: ./.yarn/ - restore-keys: | - ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} - - run: ./tools/ci.sh - cactus-example-supply-chain-business-logic-plugin: - continue-on-error: false - env: - FULL_BUILD_DISABLED: true - JEST_TEST_PATTERN: examples/cactus-example-supply-chain-business-logic-plugin/src/test/typescript/(unit|integration|benchmark)/.*/*.test.ts - JEST_TEST_RUNNER_DISABLED: false - TAPE_TEST_RUNNER_DISABLED: true - needs: build-dev - runs-on: ubuntu-20.04 - steps: - - name: Use Node.js ${{ env.NODEJS_VERSION }} - uses: actions/setup-node@v3.6.0 - with: - node-version: ${{ env.NODEJS_VERSION }} - - uses: actions/checkout@v3.5.2 - - - id: yarn-cache - name: Restore Yarn Cache - uses: actions/cache@v3.3.1 - with: - key: ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} - path: ./.yarn/ - restore-keys: | - ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} - - run: ./tools/ci.sh - cactus-example-supply-chain-frontend: - continue-on-error: false - env: - DEV_BUILD_DISABLED: false - FULL_BUILD_DISABLED: true - JEST_TEST_PATTERN: examples/cactus-example-supply-chain-frontend/src/test/typescript/(unit|integration|benchmark)/.*/*.test.ts - JEST_TEST_RUNNER_DISABLED: true - TAPE_TEST_RUNNER_DISABLED: true - needs: build-dev - runs-on: ubuntu-20.04 - steps: - - name: Use Node.js ${{ env.NODEJS_VERSION }} - uses: actions/setup-node@v3.6.0 - with: - node-version: ${{ env.NODEJS_VERSION }} - - uses: actions/checkout@v3.5.2 - - - id: yarn-cache - name: Restore Yarn Cache - uses: actions/cache@v3.3.1 - with: - key: ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} - path: ./.yarn/ - restore-keys: | - ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} - - run: ./tools/ci.sh - cactus-plugin-consortium-manual: - continue-on-error: false - env: - FULL_BUILD_DISABLED: true - JEST_TEST_PATTERN: packages/cactus-plugin-consortium-manual/src/test/typescript/(unit|integration|benchmark)/.*/*.test.ts - JEST_TEST_RUNNER_DISABLED: false - TAPE_TEST_RUNNER_DISABLED: true - needs: build-dev - runs-on: ubuntu-20.04 - steps: - - name: Use Node.js ${{ env.NODEJS_VERSION }} - uses: actions/setup-node@v3.6.0 - with: - node-version: ${{ env.NODEJS_VERSION }} - - uses: actions/checkout@v3.5.2 - - - id: yarn-cache - name: Restore Yarn Cache - uses: actions/cache@v3.3.1 - with: - key: ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} - path: ./.yarn/ - restore-keys: | - ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} - - run: ./tools/ci.sh - cactus-plugin-htlc-coordinator-besu: - continue-on-error: false - env: - FULL_BUILD_DISABLED: true - JEST_TEST_PATTERN: extensions/cactus-plugin-htlc-coordinator-besu/src/test/typescript/(unit|integration|benchmark)/.*/*.test.ts - JEST_TEST_RUNNER_DISABLED: false - TAPE_TEST_PATTERN: >- - --files={./extensions/cactus-plugin-htlc-coordinator-besu/src/test/typescript/integration/plugin-htlc-coordinator/counterparty-htlc-endpoint.test.ts,./extensions/cactus-plugin-htlc-coordinator-besu/src/test/typescript/integration/plugin-htlc-coordinator/own-htlc-endpoint.test.ts,./extensions/cactus-plugin-htlc-coordinator-besu/src/test/typescript/integration/plugin-htlc-coordinator/refund.test.ts,./extensions/cactus-plugin-htlc-coordinator-besu/src/test/typescript/integration/plugin-htlc-coordinator/withdraw-counterparty-endpoint.test.ts} - TAPE_TEST_RUNNER_DISABLED: false - needs: build-dev - runs-on: ubuntu-20.04 - steps: - - name: Use Node.js ${{ env.NODEJS_VERSION }} - uses: actions/setup-node@v3.6.0 - with: - node-version: ${{ env.NODEJS_VERSION }} - - uses: actions/checkout@v3.5.2 - - - id: yarn-cache - name: Restore Yarn Cache - uses: actions/cache@v3.3.1 - with: - key: ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} - path: ./.yarn/ - restore-keys: | - ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} - - run: ./tools/ci.sh - cactus-plugin-htlc-eth-besu: - continue-on-error: false - env: - FULL_BUILD_DISABLED: true - JEST_TEST_PATTERN: packages/cactus-plugin-htlc-eth-besu/src/test/typescript/(unit|integration|benchmark)/.*/*.test.ts - JEST_TEST_RUNNER_DISABLED: false - TAPE_TEST_RUNNER_DISABLED: true - needs: build-dev - runs-on: ubuntu-20.04 - steps: - - name: Use Node.js ${{ env.NODEJS_VERSION }} - uses: actions/setup-node@v3.6.0 - with: - node-version: ${{ env.NODEJS_VERSION }} - - uses: actions/checkout@v3.5.2 - - - id: yarn-cache - name: Restore Yarn Cache - uses: actions/cache@v3.3.1 - with: - key: ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} - path: ./.yarn/ - restore-keys: | - ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} - - run: ./tools/ci.sh - cactus-plugin-htlc-eth-besu-erc20: - continue-on-error: false - env: - FULL_BUILD_DISABLED: true - JEST_TEST_PATTERN: packages/cactus-plugin-htlc-eth-besu-erc20/src/test/typescript/(unit|integration|benchmark)/.*/*.test.ts - JEST_TEST_RUNNER_DISABLED: false - TAPE_TEST_RUNNER_DISABLED: true - needs: build-dev - runs-on: ubuntu-20.04 - steps: - - name: Use Node.js ${{ env.NODEJS_VERSION }} - uses: actions/setup-node@v3.6.0 - with: - node-version: ${{ env.NODEJS_VERSION }} - - uses: actions/checkout@v3.5.2 - - - id: yarn-cache - name: Restore Yarn Cache - uses: actions/cache@v3.3.1 - with: - key: ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} - path: ./.yarn/ - restore-keys: | - ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} - - run: ./tools/ci.sh - cactus-plugin-keychain-aws-sm: - continue-on-error: false - env: - FULL_BUILD_DISABLED: true - JEST_TEST_PATTERN: packages/cactus-plugin-keychain-aws-sm/src/test/typescript/(unit|integration|benchmark)/.*/*.test.ts - JEST_TEST_RUNNER_DISABLED: true - TAPE_TEST_PATTERN: '--files={./packages/cactus-plugin-keychain-aws-sm/src/test/typescript/integration/openapi/openapi-validation.test.ts,./packages/cactus-plugin-keychain-aws-sm/src/test/typescript/integration/plugin-factory-keychain.test.ts,./packages/cactus-plugin-keychain-aws-sm/src/test/typescript/integration/plugin-factory-keychain.test.ts,./packages/cactus-plugin-keychain-aws-sm/src/test/typescript/integration/plugin-keychain-aws-sm.test.ts}' - TAPE_TEST_RUNNER_DISABLED: false - needs: build-dev - runs-on: ubuntu-20.04 - steps: - - name: Use Node.js ${{ env.NODEJS_VERSION }} - uses: actions/setup-node@v3.6.0 - with: - node-version: ${{ env.NODEJS_VERSION }} - - uses: actions/checkout@v3.5.2 - - - id: yarn-cache - name: Restore Yarn Cache - uses: actions/cache@v3.3.1 - with: - key: ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} - path: ./.yarn/ - restore-keys: | - ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} - - run: ./tools/ci.sh - cactus-plugin-keychain-azure-kv: - continue-on-error: false - env: - FULL_BUILD_DISABLED: true - JEST_TEST_PATTERN: packages/cactus-plugin-keychain-azure-kv/src/test/typescript/(unit|integration|benchmark)/.*/*.test.ts - JEST_TEST_RUNNER_DISABLED: false - TAPE_TEST_PATTERN: ./packages/cactus-plugin-keychain-azure-kv/src/test/typescript/integration/plugin-keychain-azure-kv.test.ts - TAPE_TEST_RUNNER_DISABLED: false - needs: build-dev - runs-on: ubuntu-20.04 - steps: - - name: Use Node.js ${{ env.NODEJS_VERSION }} - uses: actions/setup-node@v3.6.0 - with: - node-version: ${{ env.NODEJS_VERSION }} - - uses: actions/checkout@v3.5.2 - - - id: yarn-cache - name: Restore Yarn Cache - uses: actions/cache@v3.3.1 - with: - key: ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} - path: ./.yarn/ - restore-keys: | - ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} - - run: ./tools/ci.sh - cactus-plugin-keychain-google-sm: - continue-on-error: false - env: - FULL_BUILD_DISABLED: true - JEST_TEST_PATTERN: packages/cactus-plugin-keychain-google-sm/src/test/typescript/(unit|integration|benchmark)/.*/*.test.ts - JEST_TEST_RUNNER_DISABLED: false - TAPE_TEST_PATTERN: '--files={./packages/cactus-plugin-keychain-google-sm/src/test/typescript/integration/openapi/openapi-validation.test.ts,./packages/cactus-plugin-keychain-google-sm/src/test/typescript/integration/plugin-factory-keychain.test.ts,./packages/cactus-plugin-keychain-google-sm/src/test/typescript/integration/plugin-keychain-google-sm.test.ts}' - TAPE_TEST_RUNNER_DISABLED: false - needs: build-dev - runs-on: ubuntu-20.04 - steps: - - name: Use Node.js ${{ env.NODEJS_VERSION }} - uses: actions/setup-node@v3.6.0 - with: - node-version: ${{ env.NODEJS_VERSION }} - - uses: actions/checkout@v3.5.2 - - - id: yarn-cache - name: Restore Yarn Cache - uses: actions/cache@v3.3.1 - with: - key: ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} - path: ./.yarn/ - restore-keys: | - ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} - - run: ./tools/ci.sh - cactus-plugin-keychain-memory: - continue-on-error: false - env: - FULL_BUILD_DISABLED: true - JEST_TEST_PATTERN: packages/cactus-plugin-keychain-memory/src/test/typescript/(unit|integration|benchmark)/.*/*.test.ts - JEST_TEST_RUNNER_DISABLED: false - TAPE_TEST_RUNNER_DISABLED: true - needs: build-dev - runs-on: ubuntu-20.04 - steps: - - name: Use Node.js ${{ env.NODEJS_VERSION }} - uses: actions/setup-node@v3.6.0 - with: - node-version: ${{ env.NODEJS_VERSION }} - - uses: actions/checkout@v3.5.2 - - - id: yarn-cache - name: Restore Yarn Cache - uses: actions/cache@v3.3.1 - with: - key: ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} - path: ./.yarn/ - restore-keys: | - ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} - - run: ./tools/ci.sh - cactus-plugin-keychain-memory-wasm: - continue-on-error: false - env: - FULL_BUILD_DISABLED: true - JEST_TEST_PATTERN: packages/cactus-plugin-keychain-memory-wasm/src/test/typescript/(unit|integration|benchmark)/.*/*.test.ts - JEST_TEST_RUNNER_DISABLED: false - TAPE_TEST_PATTERN: ./packages/cactus-plugin-keychain-memory-wasm/src/test/typescript/unit/plugin-keychain-memory-wasm.test.ts - TAPE_TEST_RUNNER_DISABLED: false - needs: build-dev - runs-on: ubuntu-20.04 - steps: - - name: Use Node.js ${{ env.NODEJS_VERSION }} - uses: actions/setup-node@v3.6.0 - with: - node-version: ${{ env.NODEJS_VERSION }} - - uses: actions/checkout@v3.5.2 - - - id: yarn-cache - name: Restore Yarn Cache - uses: actions/cache@v3.3.1 - with: - key: ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} - path: ./.yarn/ - restore-keys: | - ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} - - run: ./tools/ci.sh - cactus-plugin-keychain-vault: - continue-on-error: false - env: - FULL_BUILD_DISABLED: true - JEST_TEST_PATTERN: packages/cactus-plugin-keychain-vault/src/test/typescript/(unit|integration|benchmark)/.*/*.test.ts - JEST_TEST_RUNNER_DISABLED: false - TAPE_TEST_PATTERN: '--files={./packages/cactus-plugin-keychain-vault/src/test/typescript/integration/cactus-keychain-vault-server.test.ts,./packages/cactus-plugin-keychain-vault/src/test/typescript/integration/openapi/openapi-validation.test.ts,./packages/cactus-plugin-keychain-vault/src/test/typescript/integration/plugin-keychain-vault.test.ts}' - TAPE_TEST_RUNNER_DISABLED: false - needs: build-dev - runs-on: ubuntu-20.04 - steps: - - name: Use Node.js ${{ env.NODEJS_VERSION }} - uses: actions/setup-node@v3.6.0 - with: - node-version: ${{ env.NODEJS_VERSION }} - - uses: actions/checkout@v3.5.2 - - - id: yarn-cache - name: Restore Yarn Cache - uses: actions/cache@v3.3.1 - with: - key: ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} - path: ./.yarn/ - restore-keys: | - ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} - - run: ./tools/ci.sh - cactus-plugin-ledger-connector-besu: - continue-on-error: false - env: - FULL_BUILD_DISABLED: true - JEST_TEST_PATTERN: packages/cactus-plugin-ledger-connector-besu/src/test/typescript/(unit|integration|benchmark)/.*/*.test.ts - JEST_TEST_RUNNER_DISABLED: false - TAPE_TEST_PATTERN: >- - --files={./packages/cactus-plugin-ledger-connector-besu/src/test/typescript/integration/plugin-ledger-connector-besu/deploy-contract/deploy-contract-from-json.test.ts,./packages/cactus-plugin-ledger-connector-besu/src/test/typescript/integration/plugin-ledger-connector-besu/deploy-contract/get-block.test.ts,./packages/cactus-plugin-ledger-connector-besu/src/test/typescript/integration/plugin-ledger-connector-besu/deploy-contract/get-past-logs.test.ts,./packages/cactus-plugin-ledger-connector-besu/src/test/typescript/integration/plugin-ledger-connector-besu/deploy-contract/get-record-locator.test.ts,./packages/cactus-plugin-ledger-connector-besu/src/test/typescript/integration/plugin-ledger-connector-besu/deploy-contract/private-deploy-contract-from-json-cactus.test.ts,./packages/cactus-plugin-ledger-connector-besu/src/test/typescript/integration/plugin-ledger-connector-besu/deploy-contract/private-deploy-contract-from-json-web3-eea.test.ts,./packages/cactus-plugin-ledger-connector-besu/src/test/typescript/integration/plugin-ledger-connector-besu/deploy-contract/v21-deploy-contract-from-json.test.ts,./packages/cactus-plugin-ledger-connector-besu/src/test/typescript/integration/plugin-ledger-connector-besu/deploy-contract/v21-get-balance.test.ts,./packages/cactus-plugin-ledger-connector-besu/src/test/typescript/integration/plugin-ledger-connector-besu/deploy-contract/v21-get-block.test.ts,./packages/cactus-plugin-ledger-connector-besu/src/test/typescript/integration/plugin-ledger-connector-besu/deploy-contract/v21-get-past-logs.test.ts,./packages/cactus-plugin-ledger-connector-besu/src/test/typescript/integration/plugin-ledger-connector-besu/deploy-contract/v21-get-record-locator.test.ts,./packages/cactus-plugin-ledger-connector-besu/src/test/typescript/integration/plugin-ledger-connector-besu/openapi/openapi-validation.test.ts,./packages/cactus-plugin-ledger-connector-besu/src/test/typescript/integration/plugin-ledger-connector-besu/v21-besu-get-transaction.test.ts} - TAPE_TEST_RUNNER_DISABLED: false - needs: build-dev - runs-on: ubuntu-20.04 - steps: - - name: Use Node.js ${{ env.NODEJS_VERSION }} - uses: actions/setup-node@v3.6.0 - with: - node-version: ${{ env.NODEJS_VERSION }} - - uses: actions/checkout@v3.5.2 - - - id: yarn-cache - name: Restore Yarn Cache - uses: actions/cache@v3.3.1 - with: - key: ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} - path: ./.yarn/ - restore-keys: | - ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} - - run: ./tools/ci.sh - cactus-plugin-ledger-connector-corda: - continue-on-error: false - env: - FULL_BUILD_DISABLED: true - JEST_TEST_PATTERN: packages/cactus-plugin-ledger-connector-corda/src/test/typescript/(unit|integration|benchmark)/.*/*.test.ts - JEST_TEST_RUNNER_DISABLED: false - TAPE_TEST_PATTERN: >- - --files={./packages/cactus-plugin-ledger-connector-corda/src/test/typescript/integration/deploy-cordapp-jars-to-nodes-v4.7.test.ts,./packages/cactus-plugin-ledger-connector-corda/src/test/typescript/integration/deploy-cordapp-jars-to-nodes-v4.8-express.test.ts,./packages/cactus-plugin-ledger-connector-corda/src/test/typescript/integration/deploy-cordapp-jars-to-nodes-v4.8.test.ts,./packages/cactus-plugin-ledger-connector-corda/src/test/typescript/integration/deploy-cordapp-jars-to-nodes.test.ts,./packages/cactus-plugin-ledger-connector-corda/src/test/typescript/integration/flow-database-access-v4.8.test.ts,./packages/cactus-plugin-ledger-connector-corda/src/test/typescript/integration/jvm-kotlin-spring-server-v4.7.test.ts,./packages/cactus-plugin-ledger-connector-corda/src/test/typescript/integration/jvm-kotlin-spring-server-v4.8.test.ts,./packages/cactus-plugin-ledger-connector-corda/src/test/typescript/integration/openapi/openapi-validation.test.ts} - TAPE_TEST_RUNNER_DISABLED: false - needs: build-dev - runs-on: ubuntu-20.04 - steps: - - name: Use Node.js ${{ env.NODEJS_VERSION }} - uses: actions/setup-node@v3.6.0 - with: - node-version: ${{ env.NODEJS_VERSION }} - - uses: actions/checkout@v3.5.2 - - - id: yarn-cache - name: Restore Yarn Cache - uses: actions/cache@v3.3.1 - with: - key: ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} - path: ./.yarn/ - restore-keys: | - ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} - - run: ./tools/ci.sh - - plugin-ledger-connector-fabric-0: - continue-on-error: false - env: - CACTI_NPM_PACKAGE_NAME: "@hyperledger/cactus-plugin-ledger-connector-fabric" - HFC_LOGGING: '{"debug":"console","info":"console","warn": "console","error":"console"}' - FULL_BUILD_DISABLED: true - FREE_UP_GITHUB_RUNNER_DISK_SPACE_DISABLED: false - JEST_TEST_PATTERN: packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/(unit|integration|benchmark)/.*/*.test.ts - JEST_TEST_RUNNER_DISABLED: false - TAPE_TEST_PATTERN: "" - TAPE_TEST_RUNNER_DISABLED: true - needs: build-dev - runs-on: ubuntu-20.04 - steps: - - name: Use Node.js ${{ env.NODEJS_VERSION }} - uses: actions/setup-node@v3.6.0 - with: - node-version: ${{ env.NODEJS_VERSION }} - - uses: actions/checkout@v3.5.2 - - - id: yarn-cache - name: Restore Yarn Cache - uses: actions/cache@v3.3.1 - with: - key: ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} - path: ./.yarn/ - restore-keys: | - ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} - - run: ./tools/ci.sh - - plugin-ledger-connector-fabric-1: - continue-on-error: false - env: - CACTI_NPM_PACKAGE_NAME: "@hyperledger/cactus-plugin-ledger-connector-fabric" - HFC_LOGGING: '{"debug":"console","info":"console","warn": "console","error":"console"}' - FULL_BUILD_DISABLED: true - JEST_TEST_PATTERN: packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/(unit|integration|benchmark)/.*/*.test.ts - JEST_TEST_RUNNER_DISABLED: true - TAPE_TEST_PATTERN: "" - TAPE_TEST_RUNNER_DISABLED: true - needs: build-dev - runs-on: ubuntu-20.04 - steps: - - name: Use Node.js ${{ env.NODEJS_VERSION }} - uses: actions/setup-node@v3.6.0 - with: - node-version: ${{ env.NODEJS_VERSION }} - - uses: actions/checkout@v3.5.2 - - - id: yarn-cache - name: Restore Yarn Cache - uses: actions/cache@v3.3.1 - with: - key: ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} - path: ./.yarn/ - restore-keys: | - ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} - - run: npm run configure - - run: yarn ts-node ./packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/integration/fabric-v2-2-x/deploy-cc-from-javascript-source.test.ts - - plugin-ledger-connector-fabric-2: - continue-on-error: false - env: - CACTI_NPM_PACKAGE_NAME: "@hyperledger/cactus-plugin-ledger-connector-fabric" - HFC_LOGGING: '{"debug":"console","info":"console","warn": "console","error":"console"}' - FULL_BUILD_DISABLED: true - JEST_TEST_PATTERN: packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/(unit|integration|benchmark)/.*/*.test.ts - JEST_TEST_RUNNER_DISABLED: true - TAPE_TEST_PATTERN: "" - TAPE_TEST_RUNNER_DISABLED: true - needs: build-dev - runs-on: ubuntu-20.04 - steps: - - name: Use Node.js ${{ env.NODEJS_VERSION }} - uses: actions/setup-node@v3.6.0 - with: - node-version: ${{ env.NODEJS_VERSION }} - - uses: actions/checkout@v3.5.2 - - - id: yarn-cache - name: Restore Yarn Cache - uses: actions/cache@v3.3.1 - with: - key: ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} - path: ./.yarn/ - restore-keys: | - ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} - - run: npm run configure - - run: yarn ts-node ./packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/integration/fabric-v2-2-x/deploy-cc-from-typescript-source.test.ts - - plugin-ledger-connector-fabric-3: - continue-on-error: false - env: - CACTI_NPM_PACKAGE_NAME: "@hyperledger/cactus-plugin-ledger-connector-fabric" - HFC_LOGGING: '{"debug":"console","info":"console","warn": "console","error":"console"}' - FULL_BUILD_DISABLED: true - JEST_TEST_PATTERN: packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/(unit|integration|benchmark)/.*/*.test.ts - JEST_TEST_RUNNER_DISABLED: true - TAPE_TEST_PATTERN: "" - TAPE_TEST_RUNNER_DISABLED: true - needs: build-dev - runs-on: ubuntu-20.04 - steps: - - name: Use Node.js ${{ env.NODEJS_VERSION }} - uses: actions/setup-node@v3.6.0 - with: - node-version: ${{ env.NODEJS_VERSION }} - - uses: actions/checkout@v3.5.2 - - - id: yarn-cache - name: Restore Yarn Cache - uses: actions/cache@v3.3.1 - with: - key: ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} - path: ./.yarn/ - restore-keys: | - ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} - - run: npm run configure - - run: yarn ts-node ./packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/integration/fabric-v2-2-x/deploy-lock-asset.test.ts - - plugin-ledger-connector-fabric-4: - continue-on-error: false - env: - CACTI_NPM_PACKAGE_NAME: "@hyperledger/cactus-plugin-ledger-connector-fabric" - HFC_LOGGING: '{"debug":"console","info":"console","warn": "console","error":"console"}' - FULL_BUILD_DISABLED: true - JEST_TEST_PATTERN: packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/(unit|integration|benchmark)/.*/*.test.ts - JEST_TEST_RUNNER_DISABLED: true - TAPE_TEST_PATTERN: "" - TAPE_TEST_RUNNER_DISABLED: true - needs: build-dev - runs-on: ubuntu-20.04 - steps: - - name: Use Node.js ${{ env.NODEJS_VERSION }} - uses: actions/setup-node@v3.6.0 - with: - node-version: ${{ env.NODEJS_VERSION }} - - uses: actions/checkout@v3.5.2 - - - id: yarn-cache - name: Restore Yarn Cache - uses: actions/cache@v3.3.1 - with: - key: ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} - path: ./.yarn/ - restore-keys: | - ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} - - run: npm run configure - - run: yarn ts-node ./packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/integration/openapi/openapi-validation.test.ts - - plugin-ledger-connector-fabric-5: - continue-on-error: false - env: - CACTI_NPM_PACKAGE_NAME: "@hyperledger/cactus-plugin-ledger-connector-fabric" - HFC_LOGGING: '{"debug":"console","info":"console","warn": "console","error":"console"}' - FULL_BUILD_DISABLED: true - JEST_TEST_PATTERN: packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/(unit|integration|benchmark)/.*/*.test.ts - JEST_TEST_RUNNER_DISABLED: true - TAPE_TEST_PATTERN: "" - TAPE_TEST_RUNNER_DISABLED: true - needs: build-dev - runs-on: ubuntu-20.04 - steps: - - name: Use Node.js ${{ env.NODEJS_VERSION }} - uses: actions/setup-node@v3.6.0 - with: - node-version: ${{ env.NODEJS_VERSION }} - - uses: actions/checkout@v3.5.2 - - - id: yarn-cache - name: Restore Yarn Cache - uses: actions/cache@v3.3.1 - with: - key: ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} - path: ./.yarn/ - restore-keys: | - ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} - - run: npm run configure - - run: yarn ts-node ./packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/integration/openapi/openapi-validation-go.test.ts - - plugin-ledger-connector-fabric-6: - continue-on-error: false - env: - CACTI_NPM_PACKAGE_NAME: "@hyperledger/cactus-plugin-ledger-connector-fabric" - HFC_LOGGING: '{"debug":"console","info":"console","warn": "console","error":"console"}' - FULL_BUILD_DISABLED: true - JEST_TEST_PATTERN: packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/(unit|integration|benchmark)/.*/*.test.ts - JEST_TEST_RUNNER_DISABLED: true - TAPE_TEST_PATTERN: "" - TAPE_TEST_RUNNER_DISABLED: true - needs: build-dev - runs-on: ubuntu-20.04 - steps: - - name: Use Node.js ${{ env.NODEJS_VERSION }} - uses: actions/setup-node@v3.6.0 - with: - node-version: ${{ env.NODEJS_VERSION }} - - uses: actions/checkout@v3.5.2 - - - id: yarn-cache - name: Restore Yarn Cache - uses: actions/cache@v3.3.1 - with: - key: ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} - path: ./.yarn/ - restore-keys: | - ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} - - run: npm run configure - - run: yarn ts-node ./packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/unit/identity-internal-crypto-utils.test.ts - - plugin-ledger-connector-fabric-7: - continue-on-error: false - env: - CACTI_NPM_PACKAGE_NAME: "@hyperledger/cactus-plugin-ledger-connector-fabric" - HFC_LOGGING: '{"debug":"console","info":"console","warn": "console","error":"console"}' - FULL_BUILD_DISABLED: true - JEST_TEST_PATTERN: packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/(unit|integration|benchmark)/.*/*.test.ts - JEST_TEST_RUNNER_DISABLED: true - TAPE_TEST_PATTERN: "" - TAPE_TEST_RUNNER_DISABLED: true - needs: build-dev - runs-on: ubuntu-20.04 - steps: - - name: Use Node.js ${{ env.NODEJS_VERSION }} - uses: actions/setup-node@v3.6.0 - with: - node-version: ${{ env.NODEJS_VERSION }} - - uses: actions/checkout@v3.5.2 - - - id: yarn-cache - name: Restore Yarn Cache - uses: actions/cache@v3.3.1 - with: - key: ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} - path: ./.yarn/ - restore-keys: | - ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} - - run: npm run configure - - run: yarn ts-node ./packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/integration/identity-client.test.ts - - plugin-ledger-connector-fabric-8: - continue-on-error: false - env: - CACTI_NPM_PACKAGE_NAME: "@hyperledger/cactus-plugin-ledger-connector-fabric" - HFC_LOGGING: '{"debug":"console","info":"console","warn": "console","error":"console"}' - FULL_BUILD_DISABLED: true - JEST_TEST_PATTERN: packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/(unit|integration|benchmark)/.*/*.test.ts - JEST_TEST_RUNNER_DISABLED: true - TAPE_TEST_PATTERN: "" - TAPE_TEST_RUNNER_DISABLED: true - needs: build-dev - runs-on: ubuntu-20.04 - steps: - - name: Use Node.js ${{ env.NODEJS_VERSION }} - uses: actions/setup-node@v3.6.0 - with: - node-version: ${{ env.NODEJS_VERSION }} - - uses: actions/checkout@v3.5.2 - - - id: yarn-cache - name: Restore Yarn Cache - uses: actions/cache@v3.3.1 - with: - key: ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} - path: ./.yarn/ - restore-keys: | - ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} - - run: npm run configure - - run: yarn ts-node ./packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/integration/fabric-v2-2-x/run-transaction-with-identities.test.ts - - plugin-ledger-connector-fabric-9: - continue-on-error: false - env: - CACTI_NPM_PACKAGE_NAME: "@hyperledger/cactus-plugin-ledger-connector-fabric" - HFC_LOGGING: '{"debug":"console","info":"console","warn": "console","error":"console"}' - FULL_BUILD_DISABLED: true - JEST_TEST_PATTERN: packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/(unit|integration|benchmark)/.*/*.test.ts - JEST_TEST_RUNNER_DISABLED: true - TAPE_TEST_PATTERN: "" - TAPE_TEST_RUNNER_DISABLED: true - needs: build-dev - runs-on: ubuntu-20.04 - steps: - - name: Use Node.js ${{ env.NODEJS_VERSION }} - uses: actions/setup-node@v3.6.0 - with: - node-version: ${{ env.NODEJS_VERSION }} - - uses: actions/checkout@v3.5.2 - - - id: yarn-cache - name: Restore Yarn Cache - uses: actions/cache@v3.3.1 - with: - key: ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} - path: ./.yarn/ - restore-keys: | - ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} - - run: npm run configure - - run: yarn ts-node ./packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/integration/fabric-v2-2-x/obtain-profiles.test.ts - - plugin-ledger-connector-fabric-10: - continue-on-error: false - env: - CACTI_NPM_PACKAGE_NAME: "@hyperledger/cactus-plugin-ledger-connector-fabric" - HFC_LOGGING: '{"debug":"console","info":"console","warn": "console","error":"console"}' - FULL_BUILD_DISABLED: true - JEST_TEST_PATTERN: packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/(unit|integration|benchmark)/.*/*.test.ts - JEST_TEST_RUNNER_DISABLED: true - TAPE_TEST_PATTERN: "" - TAPE_TEST_RUNNER_DISABLED: true - needs: build-dev - runs-on: ubuntu-20.04 - steps: - - name: Use Node.js ${{ env.NODEJS_VERSION }} - uses: actions/setup-node@v3.6.0 - with: - node-version: ${{ env.NODEJS_VERSION }} - - uses: actions/checkout@v3.5.2 - - - id: yarn-cache - name: Restore Yarn Cache - uses: actions/cache@v3.3.1 - with: - key: ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} - path: ./.yarn/ - restore-keys: | - ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} - - run: npm run configure - - run: yarn ts-node ./packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/integration/fabric-v2-2-x/deploy-cc-from-golang-source.test.ts - - plugin-ledger-connector-fabric-11: - continue-on-error: false - env: - CACTI_NPM_PACKAGE_NAME: "@hyperledger/cactus-plugin-ledger-connector-fabric" - HFC_LOGGING: '{"debug":"console","info":"console","warn": "console","error":"console"}' - FULL_BUILD_DISABLED: true - JEST_TEST_PATTERN: packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/(unit|integration|benchmark)/.*/*.test.ts - JEST_TEST_RUNNER_DISABLED: true - TAPE_TEST_PATTERN: "" - TAPE_TEST_RUNNER_DISABLED: true - needs: build-dev - runs-on: ubuntu-20.04 - steps: - - name: Use Node.js ${{ env.NODEJS_VERSION }} - uses: actions/setup-node@v3.6.0 - with: - node-version: ${{ env.NODEJS_VERSION }} - - uses: actions/checkout@v3.5.2 - - - id: yarn-cache - name: Restore Yarn Cache - uses: actions/cache@v3.3.1 - with: - key: ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} - path: ./.yarn/ - restore-keys: | - ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} - - run: npm run configure - - run: yarn ts-node ./packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/integration/fabric-v2-2-x/add-orgs.test.ts - - plugin-ledger-connector-fabric-12: - continue-on-error: false - env: - CACTI_NPM_PACKAGE_NAME: "@hyperledger/cactus-plugin-ledger-connector-fabric" - HFC_LOGGING: '{"debug":"console","info":"console","warn": "console","error":"console"}' - FULL_BUILD_DISABLED: true - JEST_TEST_PATTERN: packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/(unit|integration|benchmark)/.*/*.test.ts - JEST_TEST_RUNNER_DISABLED: true - TAPE_TEST_PATTERN: "" - TAPE_TEST_RUNNER_DISABLED: true - needs: build-dev - runs-on: ubuntu-20.04 - steps: - - name: Use Node.js ${{ env.NODEJS_VERSION }} - uses: actions/setup-node@v3.6.0 - with: - node-version: ${{ env.NODEJS_VERSION }} - - uses: actions/checkout@v3.5.2 - - - id: yarn-cache - name: Restore Yarn Cache - uses: actions/cache@v3.3.1 - with: - key: ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} - path: ./.yarn/ - restore-keys: | - ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} - - run: npm run configure - - run: yarn ts-node ./packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/integration/fabric-v2-2-x/run-transaction-with-ws-ids.test.ts - - cactus-plugin-ledger-connector-go-ethereum-socketio: - continue-on-error: false - env: - DEV_BUILD_DISABLED: false - FULL_BUILD_DISABLED: true - JEST_TEST_PATTERN: packages/cactus-plugin-ledger-connector-go-ethereum-socketio/src/test/typescript/(unit|integration|benchmark)/.*/*.test.ts - JEST_TEST_RUNNER_DISABLED: true - TAPE_TEST_RUNNER_DISABLED: true - needs: build-dev - runs-on: ubuntu-20.04 - steps: - - name: Use Node.js ${{ env.NODEJS_VERSION }} - uses: actions/setup-node@v3.6.0 - with: - node-version: ${{ env.NODEJS_VERSION }} - - uses: actions/checkout@v3.5.2 - - - id: yarn-cache - name: Restore Yarn Cache - uses: actions/cache@v3.3.1 - with: - key: ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} - path: ./.yarn/ - restore-keys: | - ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} - - run: ./tools/ci.sh - cactus-plugin-ledger-connector-iroha: - continue-on-error: false - env: - FULL_BUILD_DISABLED: true - JEST_TEST_PATTERN: packages/cactus-plugin-ledger-connector-iroha/src/test/typescript/(unit|integration|benchmark)/.*/*.test.ts - JEST_TEST_RUNNER_DISABLED: false - TAPE_TEST_PATTERN: >- - --files={./packages/cactus-plugin-ledger-connector-iroha/src/test/typescript/integration/iroha-iroha-transfer-example.test.ts,./packages/cactus-plugin-ledger-connector-iroha/src/test/typescript/integration/openapi/openapi-validation.test.ts,./packages/cactus-plugin-ledger-connector-iroha/src/test/typescript/integration/run-transaction-endpoint-v1.test.ts,./packages/cactus-plugin-ledger-connector-iroha/src/test/typescript/unit/iroha-test-ledger-parameters.test.ts,./packages/cactus-plugin-ledger-connector-iroha/src/test/typescript/unit/postgres-test-container-parameters.test.ts} - TAPE_TEST_RUNNER_DISABLED: false - needs: build-dev - runs-on: ubuntu-20.04 - steps: - - name: Use Node.js ${{ env.NODEJS_VERSION }} - uses: actions/setup-node@v3.6.0 - with: - node-version: ${{ env.NODEJS_VERSION }} - - uses: actions/checkout@v3.5.2 - - - id: yarn-cache - name: Restore Yarn Cache - uses: actions/cache@v3.3.1 - with: - key: ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} - path: ./.yarn/ - restore-keys: | - ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} - - run: ./tools/ci.sh - cactus-plugin-ledger-connector-iroha2: - continue-on-error: false - env: - FULL_BUILD_DISABLED: true - JEST_TEST_PATTERN: packages/cactus-plugin-ledger-connector-iroha2/src/test/typescript/(unit|integration|benchmark)/.*/*.test.ts - JEST_TEST_RUNNER_DISABLED: false - TAPE_TEST_RUNNER_DISABLED: true - needs: build-dev - runs-on: ubuntu-20.04 - steps: - - name: Use Node.js ${{ env.NODEJS_VERSION }} - uses: actions/setup-node@v3.6.0 - with: - node-version: ${{ env.NODEJS_VERSION }} - - uses: actions/checkout@v3.5.2 - - - id: yarn-cache - name: Restore Yarn Cache - uses: actions/cache@v3.3.1 - with: - key: ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} - path: ./.yarn/ - restore-keys: | - ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} - - run: ./tools/ci.sh - cactus-plugin-ledger-connector-ethereum: - continue-on-error: false - env: - FULL_BUILD_DISABLED: true - JEST_TEST_PATTERN: packages/cactus-plugin-ledger-connector-ethereum/src/test/typescript/(unit|integration|benchmark)/.*/*.test.ts - JEST_TEST_RUNNER_DISABLED: false - TAPE_TEST_RUNNER_DISABLED: true - needs: build-dev - runs-on: ubuntu-20.04 - steps: - - name: Use Node.js ${{ env.NODEJS_VERSION }} - uses: actions/setup-node@v3.6.0 - with: - node-version: ${{ env.NODEJS_VERSION }} - - uses: actions/checkout@v3.5.2 - - id: yarn-cache - name: Restore Yarn Cache - uses: actions/cache@v3.3.1 - with: - key: ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} - path: ./.yarn/ - restore-keys: | - ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} - - run: ./tools/ci.sh - cactus-plugin-ledger-connector-quorum: - continue-on-error: false - env: - FULL_BUILD_DISABLED: true - JEST_TEST_PATTERN: packages/cactus-plugin-ledger-connector-quorum/src/test/typescript/(unit|integration|benchmark)/.*/*.test.ts - JEST_TEST_RUNNER_DISABLED: false - TAPE_TEST_PATTERN: >- - --files={./packages/cactus-plugin-ledger-connector-quorum/src/test/typescript/integration/plugin-ledger-connector-quorum/deploy-contract/openapi/openapi-validation-no-keychain.test.ts,./packages/cactus-plugin-ledger-connector-quorum/src/test/typescript/integration/plugin-ledger-connector-quorum/deploy-contract/openapi/openapi-validation.test.ts,./packages/cactus-plugin-ledger-connector-quorum/src/test/typescript/integration/plugin-ledger-connector-quorum/deploy-contract/v2.3.0-deploy-contract-from-json-json-object-endpoints.test.ts,./packages/cactus-plugin-ledger-connector-quorum/src/test/typescript/integration/plugin-ledger-connector-quorum/deploy-contract/v2.3.0-deploy-contract-from-json-json-object.test.ts,./packages/cactus-plugin-ledger-connector-quorum/src/test/typescript/integration/plugin-ledger-connector-quorum/deploy-contract/v2.3.0-invoke-contract-json-object-endpoints.test.ts,./packages/cactus-plugin-ledger-connector-quorum/src/test/typescript/integration/plugin-ledger-connector-quorum/deploy-contract/v2.3.0-invoke-contract-json-object.test.ts,./packages/cactus-plugin-ledger-connector-quorum/src/test/typescript/integration/plugin-ledger-connector-quorum/deploy-contract/v21.4.1-deploy-contract-from-json-json-object-endpoints.test.ts,./packages/cactus-plugin-ledger-connector-quorum/src/test/typescript/integration/plugin-ledger-connector-quorum/deploy-contract/v21.4.1-deploy-contract-from-json-json-object.test.ts,./packages/cactus-plugin-ledger-connector-quorum/src/test/typescript/integration/plugin-ledger-connector-quorum/deploy-contract/v21.4.1-invoke-contract-json-object-endpoints.test.ts,./packages/cactus-plugin-ledger-connector-quorum/src/test/typescript/integration/plugin-ledger-connector-quorum/deploy-contract/v21.4.1-invoke-contract-json-object.test.ts} - TAPE_TEST_RUNNER_DISABLED: false - needs: build-dev - runs-on: ubuntu-20.04 - steps: - - name: Use Node.js ${{ env.NODEJS_VERSION }} - uses: actions/setup-node@v3.6.0 - with: - node-version: ${{ env.NODEJS_VERSION }} - - uses: actions/checkout@v3.5.2 - - - id: yarn-cache - name: Restore Yarn Cache - uses: actions/cache@v3.3.1 - with: - key: ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} - path: ./.yarn/ - restore-keys: | - ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} - - run: ./tools/ci.sh - cactus-plugin-ledger-connector-sawtooth: - continue-on-error: false - env: - FULL_BUILD_DISABLED: true - JEST_TEST_PATTERN: packages/cactus-plugin-ledger-connector-sawtooth/src/test/typescript/(unit|integration|benchmark)/.*/*.test.ts - JEST_TEST_RUNNER_DISABLED: false - TAPE_TEST_RUNNER_DISABLED: true - needs: build-dev - runs-on: ubuntu-20.04 - steps: - - name: Use Node.js ${{ env.NODEJS_VERSION }} - uses: actions/setup-node@v3.6.0 - with: - node-version: ${{ env.NODEJS_VERSION }} - - uses: actions/checkout@v3.5.2 - - id: yarn-cache - name: Restore Yarn Cache - uses: actions/cache@v3.3.1 - with: - key: ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} - path: ./.yarn/ - restore-keys: | - ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} - - run: ./tools/ci.sh - cactus-plugin-ledger-connector-xdai: - continue-on-error: false - env: - FULL_BUILD_DISABLED: true - JEST_TEST_PATTERN: packages/cactus-plugin-ledger-connector-xdai/src/test/typescript/(unit|integration|benchmark)/.*/*.test.ts - JEST_TEST_RUNNER_DISABLED: false - TAPE_TEST_PATTERN: >- - --files={./packages/cactus-plugin-ledger-connector-xdai/src/test/typescript/integration/deploy-contract-from-json-xdai-json-object.test.ts,./packages/cactus-plugin-ledger-connector-xdai/src/test/typescript/integration/invoke-contract-xdai-json-object.test.ts,./packages/cactus-plugin-ledger-connector-xdai/src/test/typescript/integration/openapi/openapi-validation-no-keychain.test.ts,./packages/cactus-plugin-ledger-connector-xdai/src/test/typescript/integration/openapi/openapi-validation.test.ts} - TAPE_TEST_RUNNER_DISABLED: false - needs: build-dev - runs-on: ubuntu-20.04 - steps: - - name: Use Node.js ${{ env.NODEJS_VERSION }} - uses: actions/setup-node@v3.6.0 - with: - node-version: ${{ env.NODEJS_VERSION }} - - uses: actions/checkout@v3.5.2 - - - id: yarn-cache - name: Restore Yarn Cache - uses: actions/cache@v3.3.1 - with: - key: ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} - path: ./.yarn/ - restore-keys: | - ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} - - run: ./tools/ci.sh - cactus-plugin-persistence-ethereum: - continue-on-error: false - env: - FULL_BUILD_DISABLED: true - JEST_TEST_PATTERN: packages/cactus-plugin-persistence-ethereum/src/test/typescript/(unit|integration|benchmark)/.*/*.test.ts - JEST_TEST_RUNNER_DISABLED: false - TAPE_TEST_RUNNER_DISABLED: true - needs: build-dev - runs-on: ubuntu-20.04 - steps: - - name: Use Node.js ${{ env.NODEJS_VERSION }} - uses: actions/setup-node@v3.6.0 - with: - node-version: ${{ env.NODEJS_VERSION }} - - uses: actions/checkout@v3.5.2 - - - id: yarn-cache - name: Restore Yarn Cache - uses: actions/cache@v3.3.1 - with: - key: ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} - path: ./.yarn/ - restore-keys: | - ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} - - run: ./tools/ci.sh - cactus-plugin-object-store-ipfs: - continue-on-error: false - env: - FULL_BUILD_DISABLED: true - JEST_TEST_PATTERN: extensions/cactus-plugin-object-store-ipfs/src/test/typescript/(unit|integration|benchmark)/.*/*.test.ts - JEST_TEST_RUNNER_DISABLED: false - TAPE_TEST_PATTERN: '--files={./extensions/cactus-plugin-object-store-ipfs/src/test/typescript/integration/plugin-object-store-ipfs.test.ts,./extensions/cactus-plugin-object-store-ipfs/src/test/typescript/unit/plugin-object-store-ipfs.test.ts}' - TAPE_TEST_RUNNER_DISABLED: false - needs: build-dev - runs-on: ubuntu-20.04 - steps: - - name: Use Node.js ${{ env.NODEJS_VERSION }} - uses: actions/setup-node@v3.6.0 - with: - node-version: ${{ env.NODEJS_VERSION }} - - uses: actions/checkout@v3.5.2 - - - id: yarn-cache - name: Restore Yarn Cache - uses: actions/cache@v3.3.1 - with: - key: ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} - path: ./.yarn/ - restore-keys: | - ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} - - run: ./tools/ci.sh - # cactus-plugin-odap-hermes: - # continue-on-error: false - # env: - # FULL_BUILD_DISABLED: true - # JEST_TEST_PATTERN: packages/cactus-plugin-odap-hermes/src/test/typescript/(unit|integration|benchmark)/.*/*.test.ts - # JEST_TEST_RUNNER_DISABLED: false - # TAPE_TEST_RUNNER_DISABLED: true - # needs: build-dev - # runs-on: ubuntu-20.04 - # steps: - # - name: Use Node.js ${{ env.NODEJS_VERSION }} - # uses: actions/setup-node@v3.6.0 - # with: - # node-version: ${{ env.NODEJS_VERSION }} - # - uses: actions/checkout@v3.5.2 - # - id: yarn-cache-dir-path - # name: Get yarn cache directory path - # run: echo "::set-output name=dir::$(yarn cache dir)" - # - id: yarn-cache - # name: Restore Yarn Cache - # uses: actions/cache@v3.3.1 - # with: - # key: ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} - # path: ./.yarn/ - # restore-keys: | - # ${{ runner.os }}-yarn- - # - run: ./tools/ci.sh - cactus-plugin-connector-ubiquity: - continue-on-error: false - env: - FULL_BUILD_DISABLED: true - JEST_TEST_PATTERN: packages/cactus-plugin-ledger-connector-ubiquity/src/test/typescript/(unit|integration|benchmark)/.*/*.test.ts - JEST_TEST_RUNNER_DISABLED: false - TAPE_TEST_RUNNER_DISABLED: true - UBIQUITY_AUTH_TOKEN: ${{ secrets.UBIQUITY_AUTH_TOKEN }} - needs: build-dev - runs-on: ubuntu-20.04 - steps: - - name: Use Node.js ${{ env.NODEJS_VERSION }} - uses: actions/setup-node@v3.6.0 - with: - node-version: ${{ env.NODEJS_VERSION }} - - uses: actions/checkout@v3.5.2 - - - id: yarn-cache - name: Restore Yarn Cache - uses: actions/cache@v3.3.1 - with: - key: ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} - path: ./.yarn/ - restore-keys: | - ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} - - run: ./tools/ci.sh - env: - UBIQUITY_AUTH_TOKEN: ${{ secrets.UBIQUITY_AUTH_TOKEN }} - cactus-test-api-client: - continue-on-error: false - env: - FULL_BUILD_DISABLED: true - JEST_TEST_PATTERN: packages/cactus-test-api-client/src/test/typescript/(unit|integration|benchmark)/.*/*.test.ts - JEST_TEST_RUNNER_DISABLED: false - TAPE_TEST_RUNNER_DISABLED: true - needs: build-dev - runs-on: ubuntu-20.04 - steps: - - name: Use Node.js ${{ env.NODEJS_VERSION }} - uses: actions/setup-node@v3.6.0 - with: - node-version: ${{ env.NODEJS_VERSION }} - - uses: actions/checkout@v3.5.2 - - - id: yarn-cache - name: Restore Yarn Cache - uses: actions/cache@v3.3.1 - with: - key: ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} - path: ./.yarn/ - restore-keys: | - ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} - - run: ./tools/ci.sh - cactus-test-cmd-api-server: - continue-on-error: false - env: - FULL_BUILD_DISABLED: true - JEST_TEST_PATTERN: packages/cactus-test-cmd-api-server/src/test/typescript/(unit|integration|benchmark)/.*/*.test.ts - JEST_TEST_RUNNER_DISABLED: false - TAPE_TEST_PATTERN: ./packages/cactus-test-cmd-api-server/src/test/typescript/integration/plugin-import-with-npm-install-version-selection.test.ts - TAPE_TEST_RUNNER_DISABLED: false - needs: build-dev - runs-on: ubuntu-20.04 - steps: - - name: Use Node.js ${{ env.NODEJS_VERSION }} - uses: actions/setup-node@v3.6.0 - with: - node-version: ${{ env.NODEJS_VERSION }} - - uses: actions/checkout@v3.5.2 - - - id: yarn-cache - name: Restore Yarn Cache - uses: actions/cache@v3.3.1 - with: - key: ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} - path: ./.yarn/ - restore-keys: | - ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} - - run: ./tools/ci.sh - cactus-test-geth-ledger: - continue-on-error: false - env: - FULL_BUILD_DISABLED: true - JEST_TEST_PATTERN: packages/cactus-test-geth-ledger/src/test/typescript/(unit|integration|benchmark)/.*/*.test.ts - JEST_TEST_RUNNER_DISABLED: false - TAPE_TEST_RUNNER_DISABLED: true - needs: build-dev - runs-on: ubuntu-20.04 - steps: - - name: Use Node.js ${{ env.NODEJS_VERSION }} - uses: actions/setup-node@v3.6.0 - with: - node-version: ${{ env.NODEJS_VERSION }} - - uses: actions/checkout@v3.5.2 - - - id: yarn-cache - name: Restore Yarn Cache - uses: actions/cache@v3.3.1 - with: - key: ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} - path: ./.yarn/ - restore-keys: | - ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} - - run: ./tools/ci.sh - cactus-test-plugin-consortium-manual: - continue-on-error: false - env: - FULL_BUILD_DISABLED: true - JEST_TEST_PATTERN: packages/cactus-test-plugin-consortium-manual/src/test/typescript/(unit|integration|benchmark)/.*/*.test.ts - JEST_TEST_RUNNER_DISABLED: false - TAPE_TEST_PATTERN: ./packages/cactus-test-plugin-consortium-manual/src/test/typescript/integration/plugin-consortium-manual/openapi/openapi-validation.test.ts - TAPE_TEST_RUNNER_DISABLED: false - needs: build-dev - runs-on: ubuntu-20.04 - steps: - - name: Use Node.js ${{ env.NODEJS_VERSION }} - uses: actions/setup-node@v3.6.0 - with: - node-version: ${{ env.NODEJS_VERSION }} - - uses: actions/checkout@v3.5.2 - - - id: yarn-cache - name: Restore Yarn Cache - uses: actions/cache@v3.3.1 - with: - key: ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} - path: ./.yarn/ - restore-keys: | - ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} - - run: ./tools/ci.sh - cactus-test-plugin-htlc-eth-besu: - continue-on-error: false - env: - FULL_BUILD_DISABLED: true - JEST_TEST_PATTERN: packages/cactus-test-plugin-htlc-eth-besu/src/test/typescript/(unit|integration|benchmark)/.*/*.test.ts - JEST_TEST_RUNNER_DISABLED: false - TAPE_TEST_PATTERN: '--files={./packages/cactus-test-plugin-htlc-eth-besu/src/test/typescript/integration/plugin-htlc-eth-besu/get-single-status-endpoint.test.ts,./packages/cactus-test-plugin-htlc-eth-besu/src/test/typescript/integration/plugin-htlc-eth-besu/openapi/openapi-validation.test.ts}' - TAPE_TEST_RUNNER_DISABLED: false - needs: build-dev - runs-on: ubuntu-20.04 - steps: - - name: Use Node.js ${{ env.NODEJS_VERSION }} - uses: actions/setup-node@v3.6.0 - with: - node-version: ${{ env.NODEJS_VERSION }} - - uses: actions/checkout@v3.5.2 - - - id: yarn-cache - name: Restore Yarn Cache - uses: actions/cache@v3.3.1 - with: - key: ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} - path: ./.yarn/ - restore-keys: | - ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} - - run: ./tools/ci.sh - - - name: Install Foundry - uses: foundry-rs/foundry-toolchain@v1 - - - name: Run solidity tests - run: cd packages/cactus-plugin-htlc-eth-besu && forge test -vvvvv - - cactus-test-plugin-htlc-eth-besu-erc20: - continue-on-error: false - env: - FULL_BUILD_DISABLED: true - JEST_TEST_PATTERN: packages/cactus-test-plugin-htlc-eth-besu-erc20/src/test/typescript/(unit|integration|benchmark)/.*/*.test.ts - JEST_TEST_RUNNER_DISABLED: false - TAPE_TEST_PATTERN: >- - --files={./packages/cactus-test-plugin-htlc-eth-besu-erc20/src/test/typescript/integration/plugin-htlc-eth-besu-erc20/get-status-endpoint.test.ts,./packages/cactus-test-plugin-htlc-eth-besu-erc20/src/test/typescript/integration/plugin-htlc-eth-besu-erc20/openapi/openapi-validation.test.ts,./packages/cactus-test-plugin-htlc-eth-besu-erc20/src/test/typescript/integration/plugin-htlc-eth-besu-erc20/refund-endpoint.test.ts} - TAPE_TEST_RUNNER_DISABLED: false - needs: build-dev - runs-on: ubuntu-20.04 - steps: - - name: Use Node.js ${{ env.NODEJS_VERSION }} - uses: actions/setup-node@v3.6.0 - with: - node-version: ${{ env.NODEJS_VERSION }} - - uses: actions/checkout@v3.5.2 - - - id: yarn-cache - name: Restore Yarn Cache - uses: actions/cache@v3.3.1 - with: - key: ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} - path: ./.yarn/ - restore-keys: | - ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} - - run: ./tools/ci.sh - cactus-test-plugin-ledger-connector-besu: - continue-on-error: false - env: - FULL_BUILD_DISABLED: true - JEST_TEST_PATTERN: packages/cactus-test-plugin-ledger-connector-besu/src/test/typescript/(unit|integration|benchmark)/.*/*.test.ts - JEST_TEST_RUNNER_DISABLED: false - TAPE_TEST_PATTERN: >- - --files={./packages/cactus-test-plugin-ledger-connector-besu/src/test/typescript/integration/plugin-validator-besu/get-balance-endpoint.test.ts,./packages/cactus-test-plugin-ledger-connector-besu/src/test/typescript/integration/plugin-validator-besu/get-block-endpoint.test.ts,./packages/cactus-test-plugin-ledger-connector-besu/src/test/typescript/integration/plugin-validator-besu/get-past-logs-endpoint.test.ts,./packages/cactus-test-plugin-ledger-connector-besu/src/test/typescript/integration/plugin-validator-besu/get-transaction-endpoint.test.ts,./packages/cactus-test-plugin-ledger-connector-besu/src/test/typescript/integration/plugin-validator-besu/v21-get-balance-endpoint.test.ts,./packages/cactus-test-plugin-ledger-connector-besu/src/test/typescript/integration/plugin-validator-besu/v21-get-block-endpoint.test.ts,./packages/cactus-test-plugin-ledger-connector-besu/src/test/typescript/integration/plugin-validator-besu/v21-get-past-logs-endpoint.test.ts,./packages/cactus-test-plugin-ledger-connector-besu/src/test/typescript/integration/plugin-validator-besu/v21-get-transaction-endpoint.test.ts,./packages/cactus-test-plugin-ledger-connector-besu/src/test/typescript/integration/plugin-validator-besu/v21-sign-transaction-endpoint.test.ts} - TAPE_TEST_RUNNER_DISABLED: false - needs: build-dev - runs-on: ubuntu-20.04 - steps: - - name: Use Node.js ${{ env.NODEJS_VERSION }} - uses: actions/setup-node@v3.6.0 - with: - node-version: ${{ env.NODEJS_VERSION }} - - uses: actions/checkout@v3.5.2 - - - id: yarn-cache - name: Restore Yarn Cache - uses: actions/cache@v3.3.1 - with: - key: ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} - path: ./.yarn/ - restore-keys: | - ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} - - run: ./tools/ci.sh - cactus-test-plugin-ledger-connector-quorum: - continue-on-error: false - env: - FULL_BUILD_DISABLED: true - JEST_TEST_PATTERN: packages/cactus-test-plugin-ledger-connector-quorum/src/test/typescript/(unit|integration|benchmark)/.*/*.test.ts - JEST_TEST_RUNNER_DISABLED: false - TAPE_TEST_RUNNER_DISABLED: true - needs: build-dev - runs-on: ubuntu-20.04 - steps: - - name: Use Node.js ${{ env.NODEJS_VERSION }} - uses: actions/setup-node@v3.6.0 - with: - node-version: ${{ env.NODEJS_VERSION }} - - uses: actions/checkout@v3.5.2 - - - id: yarn-cache - name: Restore Yarn Cache - uses: actions/cache@v3.3.1 - with: - key: ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} - path: ./.yarn/ - restore-keys: | - ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} - - run: ./tools/ci.sh - cactus-test-plugin-ledger-connector-ethereum: - continue-on-error: false - env: - FULL_BUILD_DISABLED: true - JEST_TEST_PATTERN: packages/cactus-test-plugin-ledger-connector-ethereum/src/test/typescript/(unit|integration|benchmark)/.*/*.test.ts - JEST_TEST_RUNNER_DISABLED: false - TAPE_TEST_RUNNER_DISABLED: true - needs: build-dev - runs-on: ubuntu-20.04 - steps: - - name: Use Node.js ${{ env.NODEJS_VERSION }} - uses: actions/setup-node@v3.6.0 - with: - node-version: ${{ env.NODEJS_VERSION }} - - uses: actions/checkout@v3.5.2 - - id: yarn-cache-dir-path - name: Get yarn cache directory path - run: echo "::set-output name=dir::$(yarn cache dir)" - - id: yarn-cache - name: Restore Yarn Cache - uses: actions/cache@v3.0.4 - with: - key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} - path: ${{ steps.yarn-cache-dir-path.outputs.dir }} - restore-keys: | - ${{ runner.os }}-yarn- - - run: ./tools/ci.sh - cactus-test-tooling: - continue-on-error: false - env: - FULL_BUILD_DISABLED: true - JEST_TEST_PATTERN: packages/cactus-test-tooling/src/test/typescript/(unit|integration|benchmark)/.*/*.test.ts - JEST_TEST_RUNNER_DISABLED: false - TAPE_TEST_PATTERN: >- - --files={./packages/cactus-test-tooling/src/test/typescript/integration/besu/besu-test-ledger/constructor-validates-options.test.ts,./packages/cactus-test-tooling/src/test/typescript/integration/fabric/fabric-test-ledger-v1/constructor-validates-options.test.ts,./packages/cactus-test-tooling/src/test/typescript/integration/iroha/iroha-test-ledger/constructor-validates-options.test.ts,./packages/cactus-test-tooling/src/test/typescript/integration/postgres/postgres-test-container/constructor-validates-options.test.ts,./packages/cactus-test-tooling/src/test/typescript/integration/quorum/quorum-test-ledger/constructor-validates-options.test.ts,./packages/cactus-test-tooling/src/test/typescript/integration/rustc-container/rustc-container-target-bundler.test.ts,./packages/cactus-test-tooling/src/test/typescript/integration/substrate/substrate-test-ledger-constructor.test.ts,./packages/cactus-test-tooling/src/test/typescript/integration/substrate/substrate-test-ledger-multiple-concurrent.test.ts} - TAPE_TEST_RUNNER_DISABLED: false - needs: build-dev - runs-on: ubuntu-20.04 - steps: - - name: Use Node.js ${{ env.NODEJS_VERSION }} - uses: actions/setup-node@v3.6.0 - with: - node-version: ${{ env.NODEJS_VERSION }} - - uses: actions/checkout@v3.5.2 - - - id: yarn-cache - name: Restore Yarn Cache - uses: actions/cache@v3.3.1 - with: - key: ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} - path: ./.yarn/ - restore-keys: | - ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} - - run: ./tools/ci.sh - cactus-verifier-client: - continue-on-error: false - env: - FULL_BUILD_DISABLED: true - JEST_TEST_PATTERN: packages/cactus-verifier-client/src/test/typescript/(unit|integration|benchmark)/.*/*.test.ts - JEST_TEST_RUNNER_DISABLED: false - TAPE_TEST_RUNNER_DISABLED: true - needs: build-dev - runs-on: ubuntu-20.04 - steps: - - name: Use Node.js ${{ env.NODEJS_VERSION }} - uses: actions/setup-node@v3.6.0 - with: - node-version: ${{ env.NODEJS_VERSION }} - - uses: actions/checkout@v3.5.2 - - - id: yarn-cache - name: Restore Yarn Cache - uses: actions/cache@v3.3.1 - with: - key: ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} - path: ./.yarn/ - restore-keys: | - ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} - - run: ./tools/ci.sh - ghcr-besu-all-in-one: - runs-on: ubuntu-20.04 - steps: - - uses: actions/checkout@v3.5.2 - - name: ghcr.io/hyperledger/cactus-besu-all-in-one - run: DOCKER_BUILDKIT=1 docker build ./tools/docker/besu-all-in-one/ -f ./tools/docker/besu-all-in-one/Dockerfile -t cactus-besu-all-in-one - - name: Run Trivy vulnerability scan for cactus-besu-all-in-one - uses: aquasecurity/trivy-action@0.11.2 - with: - image-ref: 'cactus-besu-all-in-one' - format: 'table' - exit-code: '1' - ignore-unfixed: true - vuln-type: 'os,library' - severity: 'CRITICAL,HIGH' - ghcr-cmd-api-server: - runs-on: ubuntu-20.04 - steps: - - uses: actions/checkout@v3.5.2 - - name: ghcr.io/hyperledger/cactus-cmd-api-server - run: DOCKER_BUILDKIT=1 docker build . -f ./packages/cactus-cmd-api-server/Dockerfile -t cactus-cmd-api-server - - name: Run Trivy vulnerability scan for cactus-cmd-api-server - uses: aquasecurity/trivy-action@0.11.2 - with: - image-ref: 'cactus-cmd-api-server' - format: 'table' - exit-code: '1' - ignore-unfixed: true - vuln-type: 'os,library' - severity: 'CRITICAL,HIGH' - ghcr-connector-besu: - runs-on: ubuntu-20.04 - steps: - - uses: actions/checkout@v3.5.2 - - name: ghcr.io/hyperledger/cactus-connector-besu - run: DOCKER_BUILDKIT=1 docker build ./packages/cactus-plugin-ledger-connector-besu/ -f ./packages/cactus-plugin-ledger-connector-besu/Dockerfile -t cactus-connector-besu - - name: Run Trivy vulnerability scan for cactus-connector-besu - uses: aquasecurity/trivy-action@0.11.2 - with: - image-ref: 'cactus-connector-besu' - format: 'table' - exit-code: '1' - ignore-unfixed: true - vuln-type: 'os,library' - severity: 'CRITICAL,HIGH' - ghcr-connector-corda-server: - runs-on: ubuntu-20.04 - steps: - - uses: actions/checkout@v3.5.2 - - name: ghcr.io/hyperledger/cactus-connector-corda-server - run: DOCKER_BUILDKIT=1 docker build ./packages/cactus-plugin-ledger-connector-corda/src/main-server/ -f ./packages/cactus-plugin-ledger-connector-corda/src/main-server/Dockerfile -t cactus-connector-corda-server - - name: Run Trivy vulnerability scan for cactus-connector-corda-server - uses: aquasecurity/trivy-action@0.11.2 - with: - image-ref: 'cactus-connector-corda-server' - format: 'table' - exit-code: '1' - ignore-unfixed: true - vuln-type: 'os,library' - severity: 'CRITICAL,HIGH' - ghcr-connector-fabric: - runs-on: ubuntu-20.04 - steps: - - uses: actions/checkout@v3.5.2 - - name: ghcr.io/hyperledger/cactus-connector-fabric - run: DOCKER_BUILDKIT=1 docker build ./packages/cactus-plugin-ledger-connector-fabric/ -f ./packages/cactus-plugin-ledger-connector-fabric/Dockerfile -t cactus-connector-fabric - - name: Run Trivy vulnerability scan for cactus-connector-fabric - uses: aquasecurity/trivy-action@0.11.2 - with: - image-ref: 'cactus-connector-fabric' - format: 'table' - exit-code: '1' - ignore-unfixed: true - vuln-type: 'os,library' - severity: 'CRITICAL,HIGH' - ghcr-corda-all-in-one: - runs-on: ubuntu-20.04 - steps: - - uses: actions/checkout@v3.5.2 - - name: ghcr.io/hyperledger/cactus-corda-all-in-one - run: DOCKER_BUILDKIT=1 docker build ./tools/docker/corda-all-in-one/ -f ./tools/docker/corda-all-in-one/Dockerfile -t cactus-corda-all-in-one - - name: Run Trivy vulnerability scan for cactus-corda-all-in-one - uses: aquasecurity/trivy-action@0.11.2 - with: - image-ref: 'cactus-corda-all-in-one' - format: 'table' - exit-code: '1' - ignore-unfixed: true - vuln-type: 'os,library' - severity: 'CRITICAL,HIGH' - ghcr-corda-all-in-one-flowdb: - runs-on: ubuntu-20.04 - steps: - - uses: actions/checkout@v3.5.2 - - name: ghcr.io/hyperledger/cactus-corda-all-in-one-flowdb - run: DOCKER_BUILDKIT=1 docker build ./tools/docker/corda-all-in-one/corda-v4_8-flowdb/ - ghcr-corda-all-in-one-obligation: - runs-on: ubuntu-20.04 - steps: - - uses: actions/checkout@v3.5.2 - - name: ghcr.io/hyperledger/cactus-corda-all-in-one-obligation - run: DOCKER_BUILDKIT=1 docker build ./tools/docker/corda-all-in-one/ -f ./tools/docker/corda-all-in-one/corda-v4_8/Dockerfile -t cactus-corda-all-in-one-obligation - - name: Run Trivy vulnerability scan for cactus-corda-all-in-one-obligation - uses: aquasecurity/trivy-action@0.11.2 - with: - image-ref: 'cactus-corda-all-in-one-obligation' - format: 'table' - exit-code: '1' - ignore-unfixed: true - vuln-type: 'os,library' - severity: 'CRITICAL,HIGH' - ghcr-dev-container-vscode: - runs-on: ubuntu-20.04 - env: - IMAGE_NAME: cacti-dev-container-vscode - steps: - - name: Use Node.js ${{ env.NODEJS_VERSION }} - uses: actions/setup-node@v3.6.0 - with: - node-version: ${{ env.NODEJS_VERSION }} - - uses: actions/checkout@v3.5.2 - - name: npm_install_@devcontainers/cli@0.44.0 - run: npm install -g @devcontainers/cli@0.44.0 - - name: npx_yes_devcontainers_cli_build - run: npx --yes @devcontainers/cli@0.44.0 build --workspace-folder=./ --log-level=trace --push=false --config=./.devcontainer/devcontainer.json --image-name=$IMAGE_NAME - ghcr-example-carbon-accounting: - runs-on: ubuntu-20.04 - steps: - - uses: actions/checkout@v3.5.2 - - name: ghcr.io/hyperledger/cactus-example-carbon-accounting - run: DOCKER_BUILDKIT=1 docker build . -f ./examples/carbon-accounting/Dockerfile -t cactus-example-carbon-accounting - - name: Run Trivy vulnerability scan for cactus-example-carbon-accounting - uses: aquasecurity/trivy-action@0.11.2 - with: - image-ref: 'cactus-example-carbon-accounting' - format: 'table' - exit-code: '1' - ignore-unfixed: true - vuln-type: 'os,library' - severity: 'CRITICAL,HIGH' - ghcr-example-supply-chain-app: - runs-on: ubuntu-20.04 - steps: - - uses: actions/checkout@v3.5.2 - - name: ghcr.io/hyperledger/cactus-example-supply-chain-app - run: DOCKER_BUILDKIT=1 docker build . -f ./examples/supply-chain-app/Dockerfile -t cactus-example-supply-chain-app - - name: Run Trivy vulnerability scan for cactus-example-supply-chain-app - uses: aquasecurity/trivy-action@0.11.2 - with: - image-ref: 'cactus-example-supply-chain-app' - format: 'table' - exit-code: '1' - ignore-unfixed: true - vuln-type: 'os,library' - severity: 'CRITICAL,HIGH' - ghcr-fabric-all-in-one: - runs-on: ubuntu-20.04 - steps: - - uses: actions/checkout@v3.5.2 - - name: ghcr.io/hyperledger/cactus-fabric-all-in-one - run: DOCKER_BUILDKIT=1 docker build ./tools/docker/fabric-all-in-one/ -f ./tools/docker/fabric-all-in-one/Dockerfile_v1.4.x -t cactus-fabric-all-in-one - - name: Run Trivy vulnerability scan for cactus-fabric-all-in-one - uses: aquasecurity/trivy-action@0.11.2 - with: - image-ref: 'cactus-fabric-all-in-one' - format: 'table' - exit-code: '1' - ignore-unfixed: true - vuln-type: 'os,library' - severity: 'CRITICAL,HIGH' - ghcr-fabric2-all-in-one: - runs-on: ubuntu-20.04 - steps: - - uses: actions/checkout@v3.5.2 - - name: ghcr.io/hyperledger/cactus-fabric2-all-in-one - run: DOCKER_BUILDKIT=1 docker build ./tools/docker/fabric-all-in-one/ -f ./tools/docker/fabric-all-in-one/Dockerfile_v2.x -t cactus-fabric2-all-in-one - - name: Run Trivy vulnerability scan for cactus-fabric2-all-in-one - uses: aquasecurity/trivy-action@0.11.2 - with: - image-ref: 'cactus-fabric2-all-in-one' - format: 'table' - exit-code: '1' - ignore-unfixed: true - vuln-type: 'os,library' - severity: 'CRITICAL,HIGH' - ghcr-iroha-all-in-one: - runs-on: ubuntu-20.04 - steps: - - uses: actions/checkout@v3.5.2 - - name: ghcr.io/hyperledger/cactus-iroha-all-in-one - run: DOCKER_BUILDKIT=1 docker build ./tools/docker/iroha-all-in-one/ -f ./tools/docker/iroha-all-in-one/Dockerfile -t cactus-iroha-all-in-one - - name: Run Trivy vulnerability scan for cactus-iroha-all-in-one - uses: aquasecurity/trivy-action@0.11.2 - with: - image-ref: 'cactus-iroha-all-in-one' - format: 'table' - exit-code: '1' - ignore-unfixed: true - vuln-type: 'os,library' - severity: 'CRITICAL,HIGH' - ghcr-keychain-vault-server: - runs-on: ubuntu-20.04 - steps: - - uses: actions/checkout@v3.5.2 - - name: ghcr.io/hyperledger/cactus-keychain-vault-server - run: DOCKER_BUILDKIT=1 docker build ./packages/cactus-plugin-keychain-vault/src/cactus-keychain-vault-server/ -f ./packages/cactus-plugin-keychain-vault/src/cactus-keychain-vault-server/Dockerfile -t cactus-keychain-vault-server - - name: Run Trivy vulnerability scan for cactus-keychain-vault-server - uses: aquasecurity/trivy-action@0.11.2 - with: - image-ref: 'cactus-keychain-vault-server' - format: 'table' - exit-code: '1' - ignore-unfixed: true - vuln-type: 'os,library' - severity: 'CRITICAL,HIGH' - ghcr-quorum-all-in-one: - runs-on: ubuntu-20.04 - steps: - - uses: actions/checkout@v3.5.2 - - name: ghcr.io/hyperledger/cactus-quorum-all-in-one - run: DOCKER_BUILDKIT=1 docker build ./tools/docker/quorum-all-in-one/ -f ./tools/docker/quorum-all-in-one/Dockerfile -t cactus-quorum-all-in-one - - name: Run Trivy vulnerability scan for cactus-quorum-all-in-one - uses: aquasecurity/trivy-action@0.11.2 - with: - image-ref: 'cactus-quorum-all-in-one' - format: 'table' - exit-code: '1' - ignore-unfixed: true - vuln-type: 'os,library' - severity: 'CRITICAL,HIGH' - ghcr-quorum-multi-party-all-in-one: - runs-on: ubuntu-20.04 - steps: - - uses: actions/checkout@v3.5.2 - - name: ghcr.io/hyperledger/cactus-quorum-multi-party-all-in-one - run: DOCKER_BUILDKIT=1 docker build ./tools/docker/quorum-multi-party-all-in-one/ -f ./tools/docker/quorum-multi-party-all-in-one/Dockerfile -t cactus-quorum-multi-party-all-in-one - - name: Run Trivy vulnerability scan for cactus-quorum-multi-party-all-in-one - uses: aquasecurity/trivy-action@0.11.2 - with: - image-ref: 'cactus-quorum-multi-party-all-in-one' - format: 'table' - exit-code: '1' - ignore-unfixed: true - vuln-type: 'os,library' - severity: 'CRITICAL,HIGH' - ghcr-rust-compiler: - runs-on: ubuntu-20.04 - steps: - - uses: actions/checkout@v3.5.2 - - name: ghcr.io/hyperledger/cactus-rust-compiler - run: DOCKER_BUILDKIT=1 docker build ./tools/docker/rust-compiler/ -f ./tools/docker/rust-compiler/Dockerfile -t cactus-rust-compiler - - name: Run Trivy vulnerability scan for cactus-rust-compiler - uses: aquasecurity/trivy-action@0.11.2 - with: - image-ref: 'cactus-rust-compiler' - format: 'table' - exit-code: '1' - ignore-unfixed: true - vuln-type: 'os,library' - severity: 'CRITICAL,HIGH' - ghcr-test-npm-registry: - runs-on: ubuntu-20.04 - steps: - - uses: actions/checkout@v3.5.2 - - name: ghcr.io/hyperledger/cactus-test-npm-registry - run: DOCKER_BUILDKIT=1 docker build ./tools/docker/test-npm-registry/ -f ./tools/docker/test-npm-registry/Dockerfile -t cactus-test-npm-registry - - name: Run Trivy vulnerability scan for cactus-test-npm-registry - uses: aquasecurity/trivy-action@0.11.2 - with: - image-ref: 'cactus-test-npm-registry' - format: 'table' - exit-code: '1' - ignore-unfixed: true - vuln-type: 'os,library' - severity: 'CRITICAL,HIGH' - ghcr-whitepaper: - runs-on: ubuntu-20.04 - steps: - - uses: actions/checkout@v3.5.2 - - name: ghcr.io/hyperledger/cactus-whitepaper - run: DOCKER_BUILDKIT=1 docker build ./whitepaper/ -f ./whitepaper/Dockerfile -t cactus-whitepaper - - name: Run Trivy vulnerability scan for cactus-whitepaper - uses: aquasecurity/trivy-action@0.11.2 - with: - image-ref: 'cactus-whitepaper' - format: 'table' - exit-code: '1' - ignore-unfixed: true - vuln-type: 'os,library' - severity: 'CRITICAL,HIGH' -name: Cactus_CI -'on': - pull_request: - branches: - - main - - dev - - petermetz/** - push: - branches: - - main - - dev diff --git a/.github/workflows/cmd-api-server-publish.yaml b/.github/workflows/cmd-api-server-publish.yaml deleted file mode 100644 index 82c4420b6d..0000000000 --- a/.github/workflows/cmd-api-server-publish.yaml +++ /dev/null @@ -1,60 +0,0 @@ -name: cmd-api-server-publish - -on: - push: - # Publish `main` as Docker `latest` image. - branches: - - main - - # Publish `v1.2.3` tags as releases. - tags: - - v* - -concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} - cancel-in-progress: true - -env: - IMAGE_NAME: cactus-cmd-api-server - -jobs: - # Push image to GitHub Packages. - # See also https://docs.docker.com/docker-hub/builds/ - build-tag-push-container: - runs-on: ubuntu-20.04 - env: - DOCKER_BUILDKIT: 1 - DOCKERFILE_PATH: ./packages/cactus-cmd-api-server/Dockerfile - DOCKER_BUILD_DIR: ./ - permissions: - packages: write - contents: read - - steps: - - uses: actions/checkout@v3.5.2 - - - name: Build image - run: docker build $DOCKER_BUILD_DIR --file $DOCKERFILE_PATH --tag $IMAGE_NAME --label "runnumber=${GITHUB_RUN_ID}" - - - name: Log in to registry - # This is where you will update the PAT to GITHUB_TOKEN - run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin - - - name: Push image - run: | - SHORTHASH=$(git rev-parse --short "$GITHUB_SHA") - TODAYS_DATE="$(date +%F)" - DOCKER_TAG="$TODAYS_DATE-$SHORTHASH" - IMAGE_ID=ghcr.io/${{ github.repository_owner }}/$IMAGE_NAME - # Change all uppercase to lowercase - IMAGE_ID=$(echo $IMAGE_ID | tr '[A-Z]' '[a-z]') - # Strip git ref prefix from version - VERSION=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,') - # Strip "v" prefix from tag name - [[ "${{ github.ref }}" == "refs/tags/"* ]] && VERSION=$(echo $VERSION | sed -e 's/^v//') - # Do not use the `latest` tag at all, tag with date + git short hash if there is no git tag - [ "$VERSION" == "main" ] && VERSION=$DOCKER_TAG - echo IMAGE_ID=$IMAGE_ID - echo VERSION=$VERSION - docker tag $IMAGE_NAME $IMAGE_ID:$VERSION - docker push $IMAGE_ID:$VERSION diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml deleted file mode 100644 index 43264c3b7d..0000000000 --- a/.github/workflows/codeql-analysis.yml +++ /dev/null @@ -1,70 +0,0 @@ -name: "CodeQL" - -on: - push: - branches: [main] - pull_request: - # The branches below must be a subset of the branches above - branches: [main] - schedule: - - cron: '0 11 * * 1' - -concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} - cancel-in-progress: true - -jobs: - analyze: - name: Analyze - runs-on: ubuntu-20.04 - - strategy: - fail-fast: false - matrix: - # Override automatic language detection by changing the below list - # Supported options are ['csharp', 'cpp', 'go', 'java', 'javascript', 'python'] - language: ['typescript'] - # Learn more... - # https://docs.github.com/en/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#overriding-automatic-language-detection - - steps: - - name: Checkout repository - uses: actions/checkout@v3.5.2 - with: - # We must fetch at least the immediate parents so that if this is - # a pull request then we can checkout the head. - fetch-depth: 2 - - # If this run was triggered by a pull request event, then checkout - # the head of the pull request instead of the merge commit. - - run: git checkout HEAD^2 - if: ${{ github.event_name == 'pull_request' }} - - # Initializes the CodeQL tools for scanning. - - name: Initialize CodeQL - uses: github/codeql-action/init@v2 - with: - languages: ${{ matrix.language }} - # If you wish to specify custom queries, you can do so here or in a config file. - # By default, queries listed here will override any specified in a config file. - # Prefix the list here with "+" to use these queries and those in the config file. - # queries: ./path/to/local/query, your-org/your-repo/queries@main - - # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). - # If this step fails, then you should remove it and run the build manually (see below) - - name: Autobuild - uses: github/codeql-action/autobuild@v2 - - # ℹ️ Command-line programs to run using the OS shell. - # 📚 https://git.io/JvXDl - - # ✏️ If the Autobuild fails above, remove it and uncomment the following three lines - # and modify them (or add more) to build your code if your project - # uses a compiled language - - #- run: | - # make bootstrap - # make release - - - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v2 diff --git a/.github/workflows/commitlint-pull-request.yaml b/.github/workflows/commitlint-pull-request.yaml deleted file mode 100644 index 3d19e2de95..0000000000 --- a/.github/workflows/commitlint-pull-request.yaml +++ /dev/null @@ -1,15 +0,0 @@ -name: "Commit Lint" -on: [pull_request] - -concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} - cancel-in-progress: true - -jobs: - commitlint: - runs-on: ubuntu-20.04 - steps: - - uses: actions/checkout@v3.5.2 - with: - fetch-depth: 0 - - uses: wagoid/commitlint-github-action@v5.4.1 diff --git a/.github/workflows/connector-besu-publish.yaml b/.github/workflows/connector-besu-publish.yaml deleted file mode 100644 index b7dd635e01..0000000000 --- a/.github/workflows/connector-besu-publish.yaml +++ /dev/null @@ -1,60 +0,0 @@ -name: connector-fabric-publish - -on: - push: - # Publish `main` as Docker `latest` image. - branches: - - main - - # Publish `v1.2.3` tags as releases. - tags: - - v* - -concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} - cancel-in-progress: true - -env: - IMAGE_NAME: cactus-connector-fabric - -jobs: - # Push image to GitHub Packages. - # See also https://docs.docker.com/docker-hub/builds/ - build-tag-push-container: - runs-on: ubuntu-20.04 - env: - DOCKER_BUILDKIT: 1 - DOCKERFILE_PATH: ./packages/cactus-plugin-ledger-connector-fabric/Dockerfile - DOCKER_BUILD_DIR: ./packages/cactus-plugin-ledger-connector-fabric/ - permissions: - packages: write - contents: read - - steps: - - uses: actions/checkout@v3.5.2 - - - name: Build image - run: docker build $DOCKER_BUILD_DIR --file $DOCKERFILE_PATH --tag $IMAGE_NAME --label "runnumber=${GITHUB_RUN_ID}" - - - name: Log in to registry - # This is where you will update the PAT to GITHUB_TOKEN - run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin - - - name: Push image - run: | - SHORTHASH=$(git rev-parse --short "$GITHUB_SHA") - TODAYS_DATE="$(date +%F)" - DOCKER_TAG="$TODAYS_DATE-$SHORTHASH" - IMAGE_ID=ghcr.io/${{ github.repository_owner }}/$IMAGE_NAME - # Change all uppercase to lowercase - IMAGE_ID=$(echo $IMAGE_ID | tr '[A-Z]' '[a-z]') - # Strip git ref prefix from version - VERSION=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,') - # Strip "v" prefix from tag name - [[ "${{ github.ref }}" == "refs/tags/"* ]] && VERSION=$(echo $VERSION | sed -e 's/^v//') - # Do not use the `latest` tag at all, tag with date + git short hash if there is no git tag - [ "$VERSION" == "main" ] && VERSION=$DOCKER_TAG - echo IMAGE_ID=$IMAGE_ID - echo VERSION=$VERSION - docker tag $IMAGE_NAME $IMAGE_ID:$VERSION - docker push $IMAGE_ID:$VERSION diff --git a/.github/workflows/connector-corda-server-publish.yaml b/.github/workflows/connector-corda-server-publish.yaml deleted file mode 100644 index 7e67247e11..0000000000 --- a/.github/workflows/connector-corda-server-publish.yaml +++ /dev/null @@ -1,60 +0,0 @@ -name: connector-corda-server-publish - -on: - push: - # Publish `main` as Docker `latest` image. - branches: - - main - - # Publish `v1.2.3` tags as releases. - tags: - - v* - -concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} - cancel-in-progress: true - -env: - IMAGE_NAME: cactus-connector-corda-server - -jobs: - # Push image to GitHub Packages. - # See also https://docs.docker.com/docker-hub/builds/ - build-tag-push-container: - runs-on: ubuntu-20.04 - env: - DOCKER_BUILDKIT: 1 - DOCKERFILE_PATH: ./packages/cactus-plugin-ledger-connector-corda/src/main-server/Dockerfile - DOCKER_BUILD_DIR: ./packages/cactus-plugin-ledger-connector-corda/src/main-server/ - permissions: - packages: write - contents: read - - steps: - - uses: actions/checkout@v3.5.2 - - - name: Build image - run: docker build $DOCKER_BUILD_DIR --file $DOCKERFILE_PATH --tag $IMAGE_NAME --label "runnumber=${GITHUB_RUN_ID}" - - - name: Log in to registry - # This is where you will update the PAT to GITHUB_TOKEN - run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin - - - name: Push image - run: | - SHORTHASH=$(git rev-parse --short "$GITHUB_SHA") - TODAYS_DATE="$(date +%F)" - DOCKER_TAG="$TODAYS_DATE-$SHORTHASH" - IMAGE_ID=ghcr.io/${{ github.repository_owner }}/$IMAGE_NAME - # Change all uppercase to lowercase - IMAGE_ID=$(echo $IMAGE_ID | tr '[A-Z]' '[a-z]') - # Strip git ref prefix from version - VERSION=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,') - # Strip "v" prefix from tag name - [[ "${{ github.ref }}" == "refs/tags/"* ]] && VERSION=$(echo $VERSION | sed -e 's/^v//') - # Do not use the `latest` tag at all, tag with date + git short hash if there is no git tag - [ "$VERSION" == "main" ] && VERSION=$DOCKER_TAG - echo IMAGE_ID=$IMAGE_ID - echo VERSION=$VERSION - docker tag $IMAGE_NAME $IMAGE_ID:$VERSION - docker push $IMAGE_ID:$VERSION diff --git a/.github/workflows/connector-fabric-publish.yaml b/.github/workflows/connector-fabric-publish.yaml deleted file mode 100644 index 1f394c644f..0000000000 --- a/.github/workflows/connector-fabric-publish.yaml +++ /dev/null @@ -1,60 +0,0 @@ -name: connector-besu-publish - -on: - push: - # Publish `main` as Docker `latest` image. - branches: - - main - - # Publish `v1.2.3` tags as releases. - tags: - - v* - -concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} - cancel-in-progress: true - -env: - IMAGE_NAME: cactus-connector-besu - -jobs: - # Push image to GitHub Packages. - # See also https://docs.docker.com/docker-hub/builds/ - build-tag-push-container: - runs-on: ubuntu-20.04 - env: - DOCKER_BUILDKIT: 1 - DOCKERFILE_PATH: ./packages/cactus-plugin-ledger-connector-besu/Dockerfile - DOCKER_BUILD_DIR: ./packages/cactus-plugin-ledger-connector-besu/ - permissions: - packages: write - contents: read - - steps: - - uses: actions/checkout@v3.5.2 - - - name: Build image - run: docker build $DOCKER_BUILD_DIR --file $DOCKERFILE_PATH --tag $IMAGE_NAME --label "runnumber=${GITHUB_RUN_ID}" - - - name: Log in to registry - # This is where you will update the PAT to GITHUB_TOKEN - run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin - - - name: Push image - run: | - SHORTHASH=$(git rev-parse --short "$GITHUB_SHA") - TODAYS_DATE="$(date +%F)" - DOCKER_TAG="$TODAYS_DATE-$SHORTHASH" - IMAGE_ID=ghcr.io/${{ github.repository_owner }}/$IMAGE_NAME - # Change all uppercase to lowercase - IMAGE_ID=$(echo $IMAGE_ID | tr '[A-Z]' '[a-z]') - # Strip git ref prefix from version - VERSION=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,') - # Strip "v" prefix from tag name - [[ "${{ github.ref }}" == "refs/tags/"* ]] && VERSION=$(echo $VERSION | sed -e 's/^v//') - # Do not use the `latest` tag at all, tag with date + git short hash if there is no git tag - [ "$VERSION" == "main" ] && VERSION=$DOCKER_TAG - echo IMAGE_ID=$IMAGE_ID - echo VERSION=$VERSION - docker tag $IMAGE_NAME $IMAGE_ID:$VERSION - docker push $IMAGE_ID:$VERSION diff --git a/.github/workflows/corda-4-6-all-in-one-obligation-publish.yaml b/.github/workflows/corda-4-6-all-in-one-obligation-publish.yaml deleted file mode 100644 index bbda484bbe..0000000000 --- a/.github/workflows/corda-4-6-all-in-one-obligation-publish.yaml +++ /dev/null @@ -1,61 +0,0 @@ -name: corda-4-6-all-in-one-obligation-publish - -on: - push: - # Publish `main` as Docker `latest` image. - branches: - - main - - # Publish `v1.2.3` tags as releases. - tags: - - v* - -concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} - cancel-in-progress: true - -env: - IMAGE_NAME: corda-4-6-all-in-one-obligation - -jobs: - # Push image to GitHub Packages. - # See also https://docs.docker.com/docker-hub/builds/ - build-tag-push-container: - runs-on: ubuntu-20.04 - env: - DOCKER_BUILDKIT: 1 - # FIXME: build arguments are needed to make it version 4.6 (default is 4.7) - DOCKERFILE_PATH: ./tools/docker/corda-all-in-one/Dockerfile - DOCKER_BUILD_DIR: ./tools/docker/corda-all-in-one/ - permissions: - packages: write - contents: read - - steps: - - uses: actions/checkout@v3.5.2 - - - name: Build image - run: docker build $DOCKER_BUILD_DIR --file $DOCKERFILE_PATH --tag $IMAGE_NAME --label "runnumber=${GITHUB_RUN_ID}" - - - name: Log in to registry - # This is where you will update the PAT to GITHUB_TOKEN - run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin - - - name: Push image - run: | - SHORTHASH=$(git rev-parse --short "$GITHUB_SHA") - TODAYS_DATE="$(date +%F)" - DOCKER_TAG="$TODAYS_DATE-$SHORTHASH" - IMAGE_ID=ghcr.io/${{ github.repository_owner }}/$IMAGE_NAME - # Change all uppercase to lowercase - IMAGE_ID=$(echo $IMAGE_ID | tr '[A-Z]' '[a-z]') - # Strip git ref prefix from version - VERSION=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,') - # Strip "v" prefix from tag name - [[ "${{ github.ref }}" == "refs/tags/"* ]] && VERSION=$(echo $VERSION | sed -e 's/^v//') - # Do not use the `latest` tag at all, tag with date + git short hash if there is no git tag - [ "$VERSION" == "main" ] && VERSION=$DOCKER_TAG - echo IMAGE_ID=$IMAGE_ID - echo VERSION=$VERSION - docker tag $IMAGE_NAME $IMAGE_ID:$VERSION - docker push $IMAGE_ID:$VERSION diff --git a/.github/workflows/corda-4-7-all-in-one-obligation-publish.yaml b/.github/workflows/corda-4-7-all-in-one-obligation-publish.yaml deleted file mode 100644 index 216ff44709..0000000000 --- a/.github/workflows/corda-4-7-all-in-one-obligation-publish.yaml +++ /dev/null @@ -1,60 +0,0 @@ -name: corda-4-7-all-in-one-obligation-publish - -on: - push: - # Publish `main` as Docker `latest` image. - branches: - - main - - # Publish `v1.2.3` tags as releases. - tags: - - v* - -concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} - cancel-in-progress: true - -env: - IMAGE_NAME: cactus-corda-4-7-all-in-one-obligation - -jobs: - # Push image to GitHub Packages. - # See also https://docs.docker.com/docker-hub/builds/ - build-tag-push-container: - runs-on: ubuntu-20.04 - env: - DOCKER_BUILDKIT: 1 - DOCKERFILE_PATH: ./tools/docker/corda-all-in-one/Dockerfile - DOCKER_BUILD_DIR: ./tools/docker/corda-all-in-one/ - permissions: - packages: write - contents: read - - steps: - - uses: actions/checkout@v3.5.2 - - - name: Build image - run: docker build $DOCKER_BUILD_DIR --file $DOCKERFILE_PATH --tag $IMAGE_NAME --label "runnumber=${GITHUB_RUN_ID}" - - - name: Log in to registry - # This is where you will update the PAT to GITHUB_TOKEN - run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin - - - name: Push image - run: | - SHORTHASH=$(git rev-parse --short "$GITHUB_SHA") - TODAYS_DATE="$(date +%F)" - DOCKER_TAG="$TODAYS_DATE-$SHORTHASH" - IMAGE_ID=ghcr.io/${{ github.repository_owner }}/$IMAGE_NAME - # Change all uppercase to lowercase - IMAGE_ID=$(echo $IMAGE_ID | tr '[A-Z]' '[a-z]') - # Strip git ref prefix from version - VERSION=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,') - # Strip "v" prefix from tag name - [[ "${{ github.ref }}" == "refs/tags/"* ]] && VERSION=$(echo $VERSION | sed -e 's/^v//') - # Do not use the `latest` tag at all, tag with date + git short hash if there is no git tag - [ "$VERSION" == "main" ] && VERSION=$DOCKER_TAG - echo IMAGE_ID=$IMAGE_ID - echo VERSION=$VERSION - docker tag $IMAGE_NAME $IMAGE_ID:$VERSION - docker push $IMAGE_ID:$VERSION diff --git a/.github/workflows/corda-4-8-all-in-one-obligation-publish.yaml b/.github/workflows/corda-4-8-all-in-one-obligation-publish.yaml deleted file mode 100644 index 4f4b79d130..0000000000 --- a/.github/workflows/corda-4-8-all-in-one-obligation-publish.yaml +++ /dev/null @@ -1,60 +0,0 @@ -name: corda-4-8-all-in-one-obligation-publish - -on: - push: - # Publish `main` as Docker `latest` image. - branches: - - main - - # Publish `v1.2.3` tags as releases. - tags: - - v* - -concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} - cancel-in-progress: true - -env: - IMAGE_NAME: cactus-corda-4-8-all-in-one-obligation - -jobs: - # Push image to GitHub Packages. - # See also https://docs.docker.com/docker-hub/builds/ - build-tag-push-container: - runs-on: ubuntu-20.04 - env: - DOCKER_BUILDKIT: 1 - DOCKERFILE_PATH: ./tools/docker/corda-all-in-one/corda-v4_8/Dockerfile - DOCKER_BUILD_DIR: ./tools/docker/corda-all-in-one/ - permissions: - packages: write - contents: read - - steps: - - uses: actions/checkout@v3.5.2 - - - name: Build image - run: docker build $DOCKER_BUILD_DIR --file $DOCKERFILE_PATH --tag $IMAGE_NAME --label "runnumber=${GITHUB_RUN_ID}" - - - name: Log in to registry - # This is where you will update the PAT to GITHUB_TOKEN - run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin - - - name: Push image - run: | - SHORTHASH=$(git rev-parse --short "$GITHUB_SHA") - TODAYS_DATE="$(date +%F)" - DOCKER_TAG="$TODAYS_DATE-$SHORTHASH" - IMAGE_ID=ghcr.io/${{ github.repository_owner }}/$IMAGE_NAME - # Change all uppercase to lowercase - IMAGE_ID=$(echo $IMAGE_ID | tr '[A-Z]' '[a-z]') - # Strip git ref prefix from version - VERSION=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,') - # Strip "v" prefix from tag name - [[ "${{ github.ref }}" == "refs/tags/"* ]] && VERSION=$(echo $VERSION | sed -e 's/^v//') - # Do not use the `latest` tag at all, tag with date + git short hash if there is no git tag - [ "$VERSION" == "main" ] && VERSION=$DOCKER_TAG - echo IMAGE_ID=$IMAGE_ID - echo VERSION=$VERSION - docker tag $IMAGE_NAME $IMAGE_ID:$VERSION - docker push $IMAGE_ID:$VERSION diff --git a/.github/workflows/dependent-issues.yaml b/.github/workflows/dependent-issues.yaml deleted file mode 100644 index a2abe50ffb..0000000000 --- a/.github/workflows/dependent-issues.yaml +++ /dev/null @@ -1,41 +0,0 @@ -name: Dependent Issues - -on: - issues: - types: - - opened - - edited - - reopened - pull_request_target: - types: - - opened - - edited - - reopened - - synchronize - schedule: - - cron: '0 0 * * *' # schedule daily check - -concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} - cancel-in-progress: true - -jobs: - check: - runs-on: ubuntu-latest - name: Dependent Issues - steps: - - uses: z0al/dependent-issues@v1 - env: - # (Required) The token to use to make API calls to GitHub. - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - # (Optional) The label to use to mark dependent issues - label: dependent - - # (Optional) Enable checking for dependencies in issues. Enable by - # setting the value to "on". Default "off" - check_issues: off - - # (Optional) A comma-separated list of keywords. Default - # "depends on, blocked by" - keywords: depends on, blocked by diff --git a/.github/workflows/deploy_docs.yml b/.github/workflows/deploy_docs.yml deleted file mode 100644 index e9c9c87e27..0000000000 --- a/.github/workflows/deploy_docs.yml +++ /dev/null @@ -1,36 +0,0 @@ -# Copyright IBM Corp. All Rights Reserved. -# -# SPDX-License-Identifier: CC-BY-4.0 - -name: Deploy Docs (Github Pages) - -on: - push: - branches: - - main - paths: - - 'docs/**' - - # Allows you to run this workflow manually from the Actions tab - workflow_dispatch: - -jobs: - deploy-docs: - runs-on: ubuntu-latest - steps: - # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - - uses: actions/checkout@v3 - - - name: Use Python 3.x - uses: actions/setup-python@v4 - with: - python-version: '3.10' - cache: 'pip' # caching pip dependencies - - - name: Install dependencies - run: pip install -r requirements.txt - working-directory: docs - - - name: Build and publish - run: git pull && mkdocs gh-deploy - working-directory: docs diff --git a/.github/workflows/dev-container-vscode-publish.yaml b/.github/workflows/dev-container-vscode-publish.yaml deleted file mode 100644 index 109e558f85..0000000000 --- a/.github/workflows/dev-container-vscode-publish.yaml +++ /dev/null @@ -1,60 +0,0 @@ -name: dev-container-vscode-publish - -on: - push: - # Publish `main` as Docker `latest` image. - branches: - - main - - # Publish `v1.2.3` tags as releases. - tags: - - v* - -concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} - cancel-in-progress: true - -env: - IMAGE_NAME: cactus-dev-container-vscode - -jobs: - # Push image to GitHub Packages. - # See also https://docs.docker.com/docker-hub/builds/ - build-tag-push-container: - runs-on: ubuntu-20.04 - env: - DOCKER_BUILDKIT: 1 - DOCKERFILE_PATH: ./.devcontainer/Dockerfile - DOCKER_BUILD_DIR: ./.devcontainer/ - permissions: - packages: write - contents: read - - steps: - - uses: actions/checkout@v3.5.2 - - - name: Build image - run: docker build $DOCKER_BUILD_DIR --file $DOCKERFILE_PATH --tag $IMAGE_NAME --label "runnumber=${GITHUB_RUN_ID}" - - - name: Log in to registry - # This is where you will update the PAT to GITHUB_TOKEN - run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin - - - name: Push image - run: | - SHORTHASH=$(git rev-parse --short "$GITHUB_SHA") - TODAYS_DATE="$(date +%F)" - DOCKER_TAG="$TODAYS_DATE-$SHORTHASH" - IMAGE_ID=ghcr.io/${{ github.repository_owner }}/$IMAGE_NAME - # Change all uppercase to lowercase - IMAGE_ID=$(echo $IMAGE_ID | tr '[A-Z]' '[a-z]') - # Strip git ref prefix from version - VERSION=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,') - # Strip "v" prefix from tag name - [[ "${{ github.ref }}" == "refs/tags/"* ]] && VERSION=$(echo $VERSION | sed -e 's/^v//') - # Do not use the `latest` tag at all, tag with date + git short hash if there is no git tag - [ "$VERSION" == "main" ] && VERSION=$DOCKER_TAG - echo IMAGE_ID=$IMAGE_ID - echo VERSION=$VERSION - docker tag $IMAGE_NAME $IMAGE_ID:$VERSION - docker push $IMAGE_ID:$VERSION diff --git a/.github/workflows/example-carbon-accounting-publish.yaml b/.github/workflows/example-carbon-accounting-publish.yaml deleted file mode 100644 index 0bf6e33a50..0000000000 --- a/.github/workflows/example-carbon-accounting-publish.yaml +++ /dev/null @@ -1,60 +0,0 @@ -name: example-carbon-accounting-publish - -on: - push: - # Publish `main` as Docker `latest` image. - branches: - - main - - # Publish `v1.2.3` tags as releases. - tags: - - v* - -concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} - cancel-in-progress: true - -env: - IMAGE_NAME: cactus-example-carbon-accounting - -jobs: - # Push image to GitHub Packages. - # See also https://docs.docker.com/docker-hub/builds/ - build-tag-push-container: - runs-on: ubuntu-20.04 - env: - DOCKER_BUILDKIT: 1 - DOCKERFILE_PATH: ./examples/carbon-accounting/Dockerfile - DOCKER_BUILD_DIR: ./ - permissions: - packages: write - contents: read - - steps: - - uses: actions/checkout@v3.5.2 - - - name: Build image - run: docker build $DOCKER_BUILD_DIR --file $DOCKERFILE_PATH --tag $IMAGE_NAME --label "runnumber=${GITHUB_RUN_ID}" - - - name: Log in to registry - # This is where you will update the PAT to GITHUB_TOKEN - run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin - - - name: Push image - run: | - SHORTHASH=$(git rev-parse --short "$GITHUB_SHA") - TODAYS_DATE="$(date +%F)" - DOCKER_TAG="$TODAYS_DATE-$SHORTHASH" - IMAGE_ID=ghcr.io/${{ github.repository_owner }}/$IMAGE_NAME - # Change all uppercase to lowercase - IMAGE_ID=$(echo $IMAGE_ID | tr '[A-Z]' '[a-z]') - # Strip git ref prefix from version - VERSION=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,') - # Strip "v" prefix from tag name - [[ "${{ github.ref }}" == "refs/tags/"* ]] && VERSION=$(echo $VERSION | sed -e 's/^v//') - # Do not use the `latest` tag at all, tag with date + git short hash if there is no git tag - [ "$VERSION" == "main" ] && VERSION=$DOCKER_TAG - echo IMAGE_ID=$IMAGE_ID - echo VERSION=$VERSION - docker tag $IMAGE_NAME $IMAGE_ID:$VERSION - docker push $IMAGE_ID:$VERSION diff --git a/.github/workflows/example-supply-chain-app-publish.yaml b/.github/workflows/example-supply-chain-app-publish.yaml deleted file mode 100644 index ba932ee715..0000000000 --- a/.github/workflows/example-supply-chain-app-publish.yaml +++ /dev/null @@ -1,60 +0,0 @@ -name: example-supply-chain-app-publish - -on: - push: - # Publish `main` as Docker `latest` image. - branches: - - main - - # Publish `v1.2.3` tags as releases. - tags: - - v* - -concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} - cancel-in-progress: true - -env: - IMAGE_NAME: cactus-example-supply-chain-app - -jobs: - # Push image to GitHub Packages. - # See also https://docs.docker.com/docker-hub/builds/ - build-tag-push-container: - runs-on: ubuntu-20.04 - env: - DOCKER_BUILDKIT: 1 - DOCKERFILE_PATH: ./examples/supply-chain-app/Dockerfile - DOCKER_BUILD_DIR: ./ - permissions: - packages: write - contents: read - - steps: - - uses: actions/checkout@v3.5.2 - - - name: Build image - run: docker build $DOCKER_BUILD_DIR --file $DOCKERFILE_PATH --tag $IMAGE_NAME --label "runnumber=${GITHUB_RUN_ID}" - - - name: Log in to registry - # This is where you will update the PAT to GITHUB_TOKEN - run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin - - - name: Push image - run: | - SHORTHASH=$(git rev-parse --short "$GITHUB_SHA") - TODAYS_DATE="$(date +%F)" - DOCKER_TAG="$TODAYS_DATE-$SHORTHASH" - IMAGE_ID=ghcr.io/${{ github.repository_owner }}/$IMAGE_NAME - # Change all uppercase to lowercase - IMAGE_ID=$(echo $IMAGE_ID | tr '[A-Z]' '[a-z]') - # Strip git ref prefix from version - VERSION=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,') - # Strip "v" prefix from tag name - [[ "${{ github.ref }}" == "refs/tags/"* ]] && VERSION=$(echo $VERSION | sed -e 's/^v//') - # Do not use the `latest` tag at all, tag with date + git short hash if there is no git tag - [ "$VERSION" == "main" ] && VERSION=$DOCKER_TAG - echo IMAGE_ID=$IMAGE_ID - echo VERSION=$VERSION - docker tag $IMAGE_NAME $IMAGE_ID:$VERSION - docker push $IMAGE_ID:$VERSION diff --git a/.github/workflows/fabric-all-in-one-publish.yaml b/.github/workflows/fabric-all-in-one-publish.yaml deleted file mode 100644 index b8c790eef4..0000000000 --- a/.github/workflows/fabric-all-in-one-publish.yaml +++ /dev/null @@ -1,60 +0,0 @@ -name: fabric-all-in-one-publish - -on: - push: - # Publish `main` as Docker `latest` image. - branches: - - main - - # Publish `v1.2.3` tags as releases. - tags: - - v* - -concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} - cancel-in-progress: true - -env: - IMAGE_NAME: cactus-fabric-all-in-one - -jobs: - # Push image to GitHub Packages. - # See also https://docs.docker.com/docker-hub/builds/ - build-tag-push-container: - runs-on: ubuntu-20.04 - env: - DOCKER_BUILDKIT: 1 - DOCKERFILE_PATH: ./tools/docker/fabric-all-in-one/Dockerfile_v1.4.x - DOCKER_BUILD_DIR: ./tools/docker/fabric-all-in-one/ - permissions: - packages: write - contents: read - - steps: - - uses: actions/checkout@v3.5.2 - - - name: Build image - run: docker build $DOCKER_BUILD_DIR --file $DOCKERFILE_PATH --tag $IMAGE_NAME --label "runnumber=${GITHUB_RUN_ID}" - - - name: Log in to registry - # This is where you will update the PAT to GITHUB_TOKEN - run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin - - - name: Push image - run: | - SHORTHASH=$(git rev-parse --short "$GITHUB_SHA") - TODAYS_DATE="$(date +%F)" - DOCKER_TAG="$TODAYS_DATE-$SHORTHASH" - IMAGE_ID=ghcr.io/${{ github.repository_owner }}/$IMAGE_NAME - # Change all uppercase to lowercase - IMAGE_ID=$(echo $IMAGE_ID | tr '[A-Z]' '[a-z]') - # Strip git ref prefix from version - VERSION=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,') - # Strip "v" prefix from tag name - [[ "${{ github.ref }}" == "refs/tags/"* ]] && VERSION=$(echo $VERSION | sed -e 's/^v//') - # Do not use the `latest` tag at all, tag with date + git short hash if there is no git tag - [ "$VERSION" == "main" ] && VERSION=$DOCKER_TAG - echo IMAGE_ID=$IMAGE_ID - echo VERSION=$VERSION - docker tag $IMAGE_NAME $IMAGE_ID:$VERSION - docker push $IMAGE_ID:$VERSION diff --git a/.github/workflows/fabric2-all-in-one-publish.yaml b/.github/workflows/fabric2-all-in-one-publish.yaml deleted file mode 100644 index 485395afbe..0000000000 --- a/.github/workflows/fabric2-all-in-one-publish.yaml +++ /dev/null @@ -1,60 +0,0 @@ -name: fabric2-all-in-one-publish - -on: - push: - # Publish `main` as Docker `latest` image. - branches: - - main - - # Publish `v1.2.3` tags as releases. - tags: - - v* - -concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} - cancel-in-progress: true - -env: - IMAGE_NAME: cactus-fabric2-all-in-one - -jobs: - # Push image to GitHub Packages. - # See also https://docs.docker.com/docker-hub/builds/ - build-tag-push-container: - runs-on: ubuntu-20.04 - env: - DOCKER_BUILDKIT: 1 - DOCKERFILE_PATH: ./tools/docker/fabric-all-in-one/Dockerfile_v2.x - DOCKER_BUILD_DIR: ./tools/docker/fabric-all-in-one/ - permissions: - packages: write - contents: read - - steps: - - uses: actions/checkout@v3.5.2 - - - name: Build image - run: docker build $DOCKER_BUILD_DIR --file $DOCKERFILE_PATH --tag $IMAGE_NAME --label "runnumber=${GITHUB_RUN_ID}" - - - name: Log in to registry - # This is where you will update the PAT to GITHUB_TOKEN - run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin - - - name: Push image - run: | - SHORTHASH=$(git rev-parse --short "$GITHUB_SHA") - TODAYS_DATE="$(date +%F)" - DOCKER_TAG="$TODAYS_DATE-$SHORTHASH" - IMAGE_ID=ghcr.io/${{ github.repository_owner }}/$IMAGE_NAME - # Change all uppercase to lowercase - IMAGE_ID=$(echo $IMAGE_ID | tr '[A-Z]' '[a-z]') - # Strip git ref prefix from version - VERSION=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,') - # Strip "v" prefix from tag name - [[ "${{ github.ref }}" == "refs/tags/"* ]] && VERSION=$(echo $VERSION | sed -e 's/^v//') - # Do not use the `latest` tag at all, tag with date + git short hash if there is no git tag - [ "$VERSION" == "main" ] && VERSION=$DOCKER_TAG - echo IMAGE_ID=$IMAGE_ID - echo VERSION=$VERSION - docker tag $IMAGE_NAME $IMAGE_ID:$VERSION - docker push $IMAGE_ID:$VERSION diff --git a/.github/workflows/geth-all-in-one-publish.yaml b/.github/workflows/geth-all-in-one-publish.yaml deleted file mode 100644 index 73d5cabc63..0000000000 --- a/.github/workflows/geth-all-in-one-publish.yaml +++ /dev/null @@ -1,60 +0,0 @@ -name: geth-all-in-one-publish - -on: - push: - # Publish `main` as Docker `latest` image. - branches: - - main - - # Publish `v1.2.3` tags as releases. - tags: - - v* - -concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} - cancel-in-progress: true - -env: - IMAGE_NAME: cactus-geth-all-in-one - -jobs: - # Push image to GitHub Packages. - # See also https://docs.docker.com/docker-hub/builds/ - build-tag-push-container: - runs-on: ubuntu-20.04 - env: - DOCKER_BUILDKIT: 1 - DOCKERFILE_PATH: ./tools/docker/geth-all-in-one/Dockerfile - DOCKER_BUILD_DIR: ./tools/docker/geth-all-in-one/ - permissions: - packages: write - contents: read - - steps: - - uses: actions/checkout@v3.5.2 - - - name: Build image - run: docker build $DOCKER_BUILD_DIR --file $DOCKERFILE_PATH --tag $IMAGE_NAME --label "runnumber=${GITHUB_RUN_ID}" - - - name: Log in to registry - # This is where you will update the PAT to GITHUB_TOKEN - run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin - - - name: Push image - run: | - SHORTHASH=$(git rev-parse --short "$GITHUB_SHA") - TODAYS_DATE="$(date +%F)" - DOCKER_TAG="$TODAYS_DATE-$SHORTHASH" - IMAGE_ID=ghcr.io/${{ github.repository_owner }}/$IMAGE_NAME - # Change all uppercase to lowercase - IMAGE_ID=$(echo $IMAGE_ID | tr '[A-Z]' '[a-z]') - # Strip git ref prefix from version - VERSION=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,') - # Strip "v" prefix from tag name - [[ "${{ github.ref }}" == "refs/tags/"* ]] && VERSION=$(echo $VERSION | sed -e 's/^v//') - # Do not use the `latest` tag at all, tag with date + git short hash if there is no git tag - [ "$VERSION" == "main" ] && VERSION=$DOCKER_TAG - echo IMAGE_ID=$IMAGE_ID - echo VERSION=$VERSION - docker tag $IMAGE_NAME $IMAGE_ID:$VERSION - docker push $IMAGE_ID:$VERSION diff --git a/.github/workflows/gg-shield-action.yaml b/.github/workflows/gg-shield-action.yaml deleted file mode 100644 index db0aa2aeb7..0000000000 --- a/.github/workflows/gg-shield-action.yaml +++ /dev/null @@ -1,34 +0,0 @@ -name: GitGuardian scan - -on: - push: - pull_request: - # Publish `main` as Docker `latest` image. - branches: - - main - - # Publish `v1.2.3` tags as releases. - tags: - - v* - -jobs: - scanning: - name: GitGuardian scan - runs-on: ubuntu-20.04 - steps: - - name: Checkout - uses: actions/checkout@v3.5.2 - with: - fetch-depth: 0 # fetch all history so multiple commits can be scanned - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - name: GitGuardian scan - uses: GitGuardian/ggshield-action@v1.14.4 - with: - args: --show-secrets --exit-zero --all-policies --verbose - env: - GITHUB_PUSH_BEFORE_SHA: ${{ github.event.before }} - GITHUB_PUSH_BASE_SHA: ${{ github.event.base }} - GITHUB_PULL_BASE_SHA: ${{ github.event.pull_request.base.sha }} - GITHUB_DEFAULT_BRANCH: main - GITGUARDIAN_API_KEY: ${{ secrets.GITGUARDIAN_API_KEY }} \ No newline at end of file diff --git a/.github/workflows/ghpkg-all-kotlin-api-clients-publish.yaml b/.github/workflows/ghpkg-all-kotlin-api-clients-publish.yaml deleted file mode 100644 index bc89547012..0000000000 --- a/.github/workflows/ghpkg-all-kotlin-api-clients-publish.yaml +++ /dev/null @@ -1,263 +0,0 @@ -name: ghpkg-all-kotlin-api-clients-publish - -env: - NODEJS_VERSION: v18.18.2 - -on: - push: - branches: [main, dev] - - pull_request: - branches: [main, dev] - -concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} - cancel-in-progress: true - -jobs: - publish: - 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 \ - && sudo rm -f /etc/apt/sources.list.d/sovrin.list* - - - name: Checkout - uses: actions/checkout@v3.5.2 - with: - fetch-depth: 0 - - - name: Get the latest release version - run: | - export GITVERSION=$(git describe --tags | awk -F'.' '{print $$1}') - echo "GITVERSION=$GITVERSION" >> $GITHUB_ENV - - - uses: actions/setup-java@v3.11.0 - with: - distribution: 'adopt' - java-version: '8' - - - name: Set up NodeJS ${{ env.NODEJS_VERSION }} - uses: actions/setup-node@v3.6.0 - with: - node-version: ${{ env.NODEJS_VERSION }} - - - run: npm run configure - - - name: build-cactus-plugin-ledger-connector-corda-kotlin-client - run: | - WDIR=`pwd` - cd ${WDIR}/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client - chmod +x gradlew - ./gradlew clean - ./gradlew build - - - name: publish-cactus-plugin-ledger-connector-corda-kotlin-client - uses: actions/upload-artifact@v3.0.0 - with: - name: cactus-plugin-ledger-connector-corda-kotlin-client-${{ env.GITVERSION }}.jar - path: packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/build/libs/kotlin-client-1.0.0.jar - - - name: build-cactus-cmd-api-server-kotlin-client - run: | - WDIR=`pwd` - cd ${WDIR}/packages/cactus-cmd-api-server/src/main/kotlin/generated/openapi/kotlin-client - chmod +x gradlew - ./gradlew clean - ./gradlew build - - - name: publish-cactus-cmd-api-server-kotlin-client - uses: actions/upload-artifact@v3.0.0 - with: - name: cactus-cmd-api-server-kotlin-client-${{ env.GITVERSION }}.jar - path: packages/cactus-cmd-api-server/src/main/kotlin/generated/openapi/kotlin-client/build/libs/kotlin-client-1.0.0.jar - - - name: build-cactus-core-api-kotlin-client - run: | - WDIR=`pwd` - cd ${WDIR}/packages/cactus-core-api/src/main/kotlin/generated/openapi/kotlin-client - chmod +x gradlew - ./gradlew clean - ./gradlew build - - - name: publish-cactus-core-api-kotlin-client - uses: actions/upload-artifact@v3.0.0 - with: - name: cactus-core-api-kotlin-client-${{ env.GITVERSION }}.jar - path: packages/cactus-core-api/src/main/kotlin/generated/openapi/kotlin-client/build/libs/kotlin-client-1.0.0.jar - - - name: build-cactus-plugin-consortium-manual-kotlin-client - run: | - WDIR=`pwd` - cd ${WDIR}/packages/cactus-plugin-consortium-manual/src/main/kotlin/generated/openapi/kotlin-client - chmod +x gradlew - ./gradlew clean - ./gradlew build - - - name: publish-cactus-plugin-consortium-manual-kotlin-client - uses: actions/upload-artifact@v3.0.0 - with: - name: cactus-plugin-consortium-manual-kotlin-client-${{ env.GITVERSION }}.jar - path: packages/cactus-plugin-consortium-manual/src/main/kotlin/generated/openapi/kotlin-client/build/libs/kotlin-client-1.0.0.jar - - - name: build-cactus-plugin-keychain-google-sm-kotlin-client - run: | - WDIR=`pwd` - cd ${WDIR}/packages/cactus-plugin-keychain-google-sm/src/main/kotlin/generated/openapi/kotlin-client - chmod +x gradlew - ./gradlew clean - ./gradlew build - - - name: publish-cactus-plugin-keychain-google-sm-kotlin-client - uses: actions/upload-artifact@v3.0.0 - with: - name: cactus-plugin-keychain-google-sm-kotlin-client-${{ env.GITVERSION }}.jar - path: packages/cactus-plugin-keychain-google-sm/src/main/kotlin/generated/openapi/kotlin-client/build/libs/kotlin-client-1.0.0.jar - - - name: build-cactus-plugin-keychain-aws-sm-kotlin-client - run: | - WDIR=`pwd` - cd ${WDIR}/packages/cactus-plugin-keychain-aws-sm/src/main/kotlin/generated/openapi/kotlin-client - chmod +x gradlew - ./gradlew clean - ./gradlew build - - - name: publish-cactus-plugin-keychain-aws-sm-kotlin-client - uses: actions/upload-artifact@v3.0.0 - with: - name: cactus-plugin-keychain-aws-sm-kotlin-client-${{ env.GITVERSION }}.jar - path: packages/cactus-plugin-keychain-aws-sm/src/main/kotlin/generated/openapi/kotlin-client/build/libs/kotlin-client-1.0.0.jar - - - name: build-cactus-plugin-keychain-azure-kv-kotlin-client - run: | - WDIR=`pwd` - cd ${WDIR}/packages/cactus-plugin-keychain-azure-kv/src/main/kotlin/generated/openapi/kotlin-client - chmod +x gradlew - ./gradlew clean - ./gradlew build - - - name: publish-cactus-plugin-keychain-azure-kv-kotlin-client - uses: actions/upload-artifact@v3.0.0 - with: - name: cactus-plugin-keychain-azure-kv-kotlin-client-${{ env.GITVERSION }}.jar - path: packages/cactus-plugin-keychain-azure-kv/src/main/kotlin/generated/openapi/kotlin-client/build/libs/kotlin-client-1.0.0.jar - - - name: build-cactus-plugin-keychain-memory-kotlin-client - run: | - WDIR=`pwd` - cd ${WDIR}/packages/cactus-plugin-keychain-memory/src/main/kotlin/generated/openapi/kotlin-client - chmod +x gradlew - ./gradlew clean - ./gradlew build - - - name: publish-cactus-plugin-keychain-memory-kotlin-client - uses: actions/upload-artifact@v3.0.0 - with: - name: cactus-plugin-keychain-memory-kotlin-client-${{ env.GITVERSION }}.jar - path: packages/cactus-plugin-keychain-memory/src/main/kotlin/generated/openapi/kotlin-client/build/libs/kotlin-client-1.0.0.jar - - - name: build-cactus-plugin-keychain-vault-kotlin-client - run: | - WDIR=`pwd` - cd ${WDIR}/packages/cactus-plugin-keychain-vault/src/main/kotlin/generated/openapi/kotlin-client - chmod +x gradlew - ./gradlew clean - ./gradlew build - - - name: publish-cactus-plugin-keychain-vault-kotlin-client - uses: actions/upload-artifact@v3.0.0 - with: - name: cactus-plugin-keychain-vault-kotlin-client-${{ env.GITVERSION }}.jar - path: packages/cactus-plugin-keychain-vault/src/main/kotlin/generated/openapi/kotlin-client/build/libs/kotlin-client-1.0.0.jar - - - name: build-cactus-plugin-ledger-connector-fabric-kotlin-client - run: | - WDIR=`pwd` - cd ${WDIR}/packages/cactus-plugin-ledger-connector-fabric/src/main/kotlin/generated/openapi/kotlin-client - chmod +x gradlew - ./gradlew clean - ./gradlew build - - - name: publish-cactus-plugin-ledger-connector-fabric-kotlin-client - uses: actions/upload-artifact@v3.0.0 - with: - name: cactus-plugin-ledger-connector-fabric-kotlin-client-${{ env.GITVERSION }}.jar - path: packages/cactus-plugin-ledger-connector-fabric/src/main/kotlin/generated/openapi/kotlin-client/build/libs/kotlin-client-1.0.0.jar - - - name: build-cactus-plugin-keychain-memory-wasm-kotlin-client - run: | - WDIR=`pwd` - cd ${WDIR}/packages/cactus-plugin-keychain-memory-wasm/src/main/kotlin/generated/openapi/kotlin-client - chmod +x gradlew - ./gradlew clean - ./gradlew build - - - name: publish-cactus-plugin-keychain-memory-wasm-kotlin-client - uses: actions/upload-artifact@v3.0.0 - with: - name: cactus-plugin-keychain-memory-wasm-kotlin-client-${{ env.GITVERSION }}.jar - path: packages/cactus-plugin-keychain-memory-wasm/src/main/kotlin/generated/openapi/kotlin-client/build/libs/kotlin-client-1.0.0.jar - - - name: build-cactus-plugin-odap-hermes-kotlin-client - run: | - WDIR=`pwd` - cd ${WDIR}/packages/cactus-plugin-odap-hermes/src/main/kotlin/generated/openapi/kotlin-client - chmod +x gradlew - ./gradlew clean - ./gradlew build - - - name: publish-cactus-plugin-odap-hermes-kotlin-client - uses: actions/upload-artifact@v3.0.0 - with: - name: cactus-plugin-odap-hermes-kotlin-client-${{ env.GITVERSION }}.jar - path: packages/cactus-plugin-odap-hermes/src/main/kotlin/generated/openapi/kotlin-client/build/libs/kotlin-client-1.0.0.jar - - - name: build-cactus-example-supply-chain-business-logic-plugin-kotlin-client - run: | - WDIR=`pwd` - cd ${WDIR}/examples/cactus-example-supply-chain-business-logic-plugin/src/main/kotlin/generated/openapi/kotlin-client - chmod +x gradlew - ./gradlew clean - ./gradlew build - - - name: publish-cactus-example-supply-chain-business-logic-plugin-kotlin-client - uses: actions/upload-artifact@v3.0.0 - with: - name: cactus-example-supply-chain-business-logic-plugin-kotlin-client-${{ env.GITVERSION }}.jar - path: examples/cactus-example-supply-chain-business-logic-plugin/src/main/kotlin/generated/openapi/kotlin-client/build/libs/kotlin-client-1.0.0.jar - - - name: build-cactus-example-carbon-accounting-business-logic-plugin-kotlin-client - run: | - WDIR=`pwd` - cd ${WDIR}/examples/cactus-example-carbon-accounting-business-logic-plugin/src/main/kotlin/generated/openapi/kotlin-client - chmod +x gradlew - ./gradlew clean - ./gradlew build - - - name: publish-cactus-example-carbon-accounting-business-logic-plugin-kotlin-client - uses: actions/upload-artifact@v3.0.0 - with: - name: cactus-example-carbon-accounting-business-logic-plugin-kotlin-client-${{ env.GITVERSION }}.jar - path: examples/cactus-example-carbon-accounting-business-logic-plugin/src/main/kotlin/generated/openapi/kotlin-client/build/libs/kotlin-client-1.0.0.jar - - - name: build-cactus-plugin-object-store-ipfs-kotlin-client - run: | - WDIR=`pwd` - cd ${WDIR}/extensions/cactus-plugin-object-store-ipfs/src/main/kotlin/generated/openapi/kotlin-client - chmod +x gradlew - ./gradlew clean - ./gradlew build - - - name: publish-cactus-plugin-object-store-ipfs-kotlin-client - uses: actions/upload-artifact@v3.0.0 - with: - name: cactus-plugin-object-store-ipfs-kotlin-client-${{ env.GITVERSION }}.jar - path: extensions/cactus-plugin-object-store-ipfs/src/main/kotlin/generated/openapi/kotlin-client/build/libs/kotlin-client-1.0.0.jar \ No newline at end of file diff --git a/.github/workflows/iroha-all-in-one-publish.yaml b/.github/workflows/iroha-all-in-one-publish.yaml deleted file mode 100644 index bf51847c6c..0000000000 --- a/.github/workflows/iroha-all-in-one-publish.yaml +++ /dev/null @@ -1,60 +0,0 @@ -name: iroha-all-in-one-publish - -on: - push: - # Publish `main` as Docker `latest` image. - branches: - - main - - # Publish `v1.2.3` tags as releases. - tags: - - v* - -concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} - cancel-in-progress: true - -env: - IMAGE_NAME: cactus-iroha-all-in-one - -jobs: - # Push image to GitHub Packages. - # See also https://docs.docker.com/docker-hub/builds/ - build-tag-push-container: - runs-on: ubuntu-20.04 - env: - DOCKER_BUILDKIT: 1 - DOCKERFILE_PATH: ./tools/docker/iroha-all-in-one/Dockerfile - DOCKER_BUILD_DIR: ./tools/docker/iroha-all-in-one/ - permissions: - packages: write - contents: read - - steps: - - uses: actions/checkout@v3.5.2 - - - name: Build image - run: docker build $DOCKER_BUILD_DIR --file $DOCKERFILE_PATH --tag $IMAGE_NAME --label "runnumber=${GITHUB_RUN_ID}" - - - name: Log in to registry - # This is where you will update the PAT to GITHUB_TOKEN - run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin - - - name: Push image - run: | - SHORTHASH=$(git rev-parse --short "$GITHUB_SHA") - TODAYS_DATE="$(date +%F)" - DOCKER_TAG="$TODAYS_DATE-$SHORTHASH" - IMAGE_ID=ghcr.io/${{ github.repository_owner }}/$IMAGE_NAME - # Change all uppercase to lowercase - IMAGE_ID=$(echo $IMAGE_ID | tr '[A-Z]' '[a-z]') - # Strip git ref prefix from version - VERSION=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,') - # Strip "v" prefix from tag name - [[ "${{ github.ref }}" == "refs/tags/"* ]] && VERSION=$(echo $VERSION | sed -e 's/^v//') - # Do not use the `latest` tag at all, tag with date + git short hash if there is no git tag - [ "$VERSION" == "main" ] && VERSION=$DOCKER_TAG - echo IMAGE_ID=$IMAGE_ID - echo VERSION=$VERSION - docker tag $IMAGE_NAME $IMAGE_ID:$VERSION - docker push $IMAGE_ID:$VERSION diff --git a/.github/workflows/iroha2-all-in-one-publish.yaml b/.github/workflows/iroha2-all-in-one-publish.yaml deleted file mode 100644 index b76d4c5c6e..0000000000 --- a/.github/workflows/iroha2-all-in-one-publish.yaml +++ /dev/null @@ -1,60 +0,0 @@ -name: iroha2-all-in-one-publish - -on: - push: - # Publish `main` as Docker `latest` image. - branches: - - main - - # Publish `v1.2.3` tags as releases. - tags: - - v* - -concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} - cancel-in-progress: true - -env: - IMAGE_NAME: cactus-iroha2-all-in-one - -jobs: - # Push image to GitHub Packages. - # See also https://docs.docker.com/docker-hub/builds/ - build-tag-push-container: - runs-on: ubuntu-20.04 - env: - DOCKER_BUILDKIT: 1 - DOCKERFILE_PATH: ./tools/docker/iroha2-all-in-one/Dockerfile - DOCKER_BUILD_DIR: ./tools/docker/iroha2-all-in-one/ - permissions: - packages: write - contents: read - - steps: - - uses: actions/checkout@v3.5.2 - - - name: Build image - run: docker build $DOCKER_BUILD_DIR --file $DOCKERFILE_PATH --tag $IMAGE_NAME --label "runnumber=${GITHUB_RUN_ID}" - - - name: Log in to registry - # This is where you will update the PAT to GITHUB_TOKEN - run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin - - - name: Push image - run: | - SHORTHASH=$(git rev-parse --short "$GITHUB_SHA") - TODAYS_DATE="$(date +%F)" - DOCKER_TAG="$TODAYS_DATE-$SHORTHASH" - IMAGE_ID=ghcr.io/${{ github.repository_owner }}/$IMAGE_NAME - # Change all uppercase to lowercase - IMAGE_ID=$(echo $IMAGE_ID | tr '[A-Z]' '[a-z]') - # Strip git ref prefix from version - VERSION=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,') - # Strip "v" prefix from tag name - [[ "${{ github.ref }}" == "refs/tags/"* ]] && VERSION=$(echo $VERSION | sed -e 's/^v//') - # Do not use the `latest` tag at all, tag with date + git short hash if there is no git tag - [ "$VERSION" == "main" ] && VERSION=$DOCKER_TAG - echo IMAGE_ID=$IMAGE_ID - echo VERSION=$VERSION - docker tag $IMAGE_NAME $IMAGE_ID:$VERSION - docker push $IMAGE_ID:$VERSION diff --git a/.github/workflows/keychain-vault-server-publish.yaml b/.github/workflows/keychain-vault-server-publish.yaml deleted file mode 100644 index 52dc3bd0ad..0000000000 --- a/.github/workflows/keychain-vault-server-publish.yaml +++ /dev/null @@ -1,60 +0,0 @@ -name: keychain-vault-server-publish - -on: - push: - # Publish `main` as Docker `latest` image. - branches: - - main - - # Publish `v1.2.3` tags as releases. - tags: - - v* - -concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} - cancel-in-progress: true - -env: - IMAGE_NAME: cactus-keychain-vault-server - -jobs: - # Push image to GitHub Packages. - # See also https://docs.docker.com/docker-hub/builds/ - build-tag-push-container: - runs-on: ubuntu-20.04 - env: - DOCKER_BUILDKIT: 1 - DOCKERFILE_PATH: ./packages/cactus-plugin-keychain-vault/src/cactus-keychain-vault-server/Dockerfile - DOCKER_BUILD_DIR: ./packages/cactus-plugin-keychain-vault/src/cactus-keychain-vault-server/ - permissions: - packages: write - contents: read - - steps: - - uses: actions/checkout@v3.5.2 - - - name: Build image - run: docker build $DOCKER_BUILD_DIR --file $DOCKERFILE_PATH --tag $IMAGE_NAME --label "runnumber=${GITHUB_RUN_ID}" - - - name: Log in to registry - # This is where you will update the PAT to GITHUB_TOKEN - run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin - - - name: Push image - run: | - SHORTHASH=$(git rev-parse --short "$GITHUB_SHA") - TODAYS_DATE="$(date +%F)" - DOCKER_TAG="$TODAYS_DATE-$SHORTHASH" - IMAGE_ID=ghcr.io/${{ github.repository_owner }}/$IMAGE_NAME - # Change all uppercase to lowercase - IMAGE_ID=$(echo $IMAGE_ID | tr '[A-Z]' '[a-z]') - # Strip git ref prefix from version - VERSION=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,') - # Strip "v" prefix from tag name - [[ "${{ github.ref }}" == "refs/tags/"* ]] && VERSION=$(echo $VERSION | sed -e 's/^v//') - # Do not use the `latest` tag at all, tag with date + git short hash if there is no git tag - [ "$VERSION" == "main" ] && VERSION=$DOCKER_TAG - echo IMAGE_ID=$IMAGE_ID - echo VERSION=$VERSION - docker tag $IMAGE_NAME $IMAGE_ID:$VERSION - docker push $IMAGE_ID:$VERSION diff --git a/.github/workflows/publish-npm.yaml b/.github/workflows/publish-npm.yaml deleted file mode 100644 index 68f9d046ca..0000000000 --- a/.github/workflows/publish-npm.yaml +++ /dev/null @@ -1,46 +0,0 @@ -name: publish-npm-manually - -env: - NODEJS_VERSION: v18.18.2 - -on: - workflow_dispatch: - inputs: - tag-pub: - type: string - description: Tag to publish - required: true - -concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} - cancel-in-progress: true - -jobs: - - build-and-publish-packages: - runs-on: ubuntu-20.04 - steps: - - uses: actions/checkout@v3.5.2 - with: - ref: ${{ inputs.tag-pub }} - - run: git fetch --unshallow --prune - - uses: actions/setup-node@v3.6.0 - with: - always-auth: true - node-version: ${{ env.NODEJS_VERSION }} - registry-url: 'https://registry.npmjs.org' - - name: ./tools/ci.sh - run: ./tools/ci.sh - env: - DEV_BUILD_DISABLED: false - FULL_BUILD_DISABLED: false - JEST_TEST_RUNNER_DISABLED: true - TAPE_TEST_RUNNER_DISABLED: true - - name: lerna-publish - env: - NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} - run: | - git config --global user.email "npm-ci@hyperledger.org" - git config --global user.name "hyperledger-ghci" - npm whoami - yarn lerna publish from-git --yes --loglevel=debug diff --git a/.github/workflows/quorum-all-in-one-publish.yaml b/.github/workflows/quorum-all-in-one-publish.yaml deleted file mode 100644 index 9e267e2270..0000000000 --- a/.github/workflows/quorum-all-in-one-publish.yaml +++ /dev/null @@ -1,60 +0,0 @@ -name: quorum-all-in-one-publish - -on: - push: - # Publish `main` as Docker `latest` image. - branches: - - main - - # Publish `v1.2.3` tags as releases. - tags: - - v* - -concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} - cancel-in-progress: true - -env: - IMAGE_NAME: cactus-quorum-all-in-one - -jobs: - # Push image to GitHub Packages. - # See also https://docs.docker.com/docker-hub/builds/ - build-tag-push-container: - runs-on: ubuntu-20.04 - env: - DOCKER_BUILDKIT: 1 - DOCKERFILE_PATH: ./tools/docker/quorum-all-in-one/Dockerfile - DOCKER_BUILD_DIR: ./tools/docker/quorum-all-in-one/ - permissions: - packages: write - contents: read - - steps: - - uses: actions/checkout@v3.5.2 - - - name: Build image - run: docker build $DOCKER_BUILD_DIR --file $DOCKERFILE_PATH --tag $IMAGE_NAME --label "runnumber=${GITHUB_RUN_ID}" - - - name: Log in to registry - # This is where you will update the PAT to GITHUB_TOKEN - run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin - - - name: Push image - run: | - SHORTHASH=$(git rev-parse --short "$GITHUB_SHA") - TODAYS_DATE="$(date +%F)" - DOCKER_TAG="$TODAYS_DATE-$SHORTHASH" - IMAGE_ID=ghcr.io/${{ github.repository_owner }}/$IMAGE_NAME - # Change all uppercase to lowercase - IMAGE_ID=$(echo $IMAGE_ID | tr '[A-Z]' '[a-z]') - # Strip git ref prefix from version - VERSION=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,') - # Strip "v" prefix from tag name - [[ "${{ github.ref }}" == "refs/tags/"* ]] && VERSION=$(echo $VERSION | sed -e 's/^v//') - # Do not use the `latest` tag at all, tag with date + git short hash if there is no git tag - [ "$VERSION" == "main" ] && VERSION=$DOCKER_TAG - echo IMAGE_ID=$IMAGE_ID - echo VERSION=$VERSION - docker tag $IMAGE_NAME $IMAGE_ID:$VERSION - docker push $IMAGE_ID:$VERSION diff --git a/.github/workflows/quorum-multi-party-all-in-one-publish.yaml b/.github/workflows/quorum-multi-party-all-in-one-publish.yaml deleted file mode 100644 index ace53ea99b..0000000000 --- a/.github/workflows/quorum-multi-party-all-in-one-publish.yaml +++ /dev/null @@ -1,60 +0,0 @@ -name: quorum-multi-party-all-in-one-publish - -on: - push: - # Publish `main` as Docker `latest` image. - branches: - - main - - # Publish `v1.2.3` tags as releases. - tags: - - v* - -concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} - cancel-in-progress: true - -env: - IMAGE_NAME: cactus-quorum-multi-party-all-in-one - -jobs: - # Push image to GitHub Packages. - # See also https://docs.docker.com/docker-hub/builds/ - build-tag-push-container: - runs-on: ubuntu-20.04 - env: - DOCKER_BUILDKIT: 1 - DOCKERFILE_PATH: ./tools/docker/quorum-multi-party-all-in-one/Dockerfile - DOCKER_BUILD_DIR: ./tools/docker/quorum-multi-party-all-in-one/ - permissions: - packages: write - contents: read - - steps: - - uses: actions/checkout@v3.5.2 - - - name: Build image - run: docker build $DOCKER_BUILD_DIR --file $DOCKERFILE_PATH --tag $IMAGE_NAME --label "runnumber=${GITHUB_RUN_ID}" - - - name: Log in to registry - # This is where you will update the PAT to GITHUB_TOKEN - run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin - - - name: Push image - run: | - SHORTHASH=$(git rev-parse --short "$GITHUB_SHA") - TODAYS_DATE="$(date +%F)" - DOCKER_TAG="$TODAYS_DATE-$SHORTHASH" - IMAGE_ID=ghcr.io/${{ github.repository_owner }}/$IMAGE_NAME - # Change all uppercase to lowercase - IMAGE_ID=$(echo $IMAGE_ID | tr '[A-Z]' '[a-z]') - # Strip git ref prefix from version - VERSION=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,') - # Strip "v" prefix from tag name - [[ "${{ github.ref }}" == "refs/tags/"* ]] && VERSION=$(echo $VERSION | sed -e 's/^v//') - # Do not use the `latest` tag at all, tag with date + git short hash if there is no git tag - [ "$VERSION" == "main" ] && VERSION=$DOCKER_TAG - echo IMAGE_ID=$IMAGE_ID - echo VERSION=$VERSION - docker tag $IMAGE_NAME $IMAGE_ID:$VERSION - docker push $IMAGE_ID:$VERSION diff --git a/.github/workflows/rust-compiler-publish.yaml b/.github/workflows/rust-compiler-publish.yaml deleted file mode 100644 index 001a3fdf2f..0000000000 --- a/.github/workflows/rust-compiler-publish.yaml +++ /dev/null @@ -1,60 +0,0 @@ -name: rust-compiler-publish - -on: - push: - # Publish `main` as Docker `latest` image. - branches: - - main - - # Publish `v1.2.3` tags as releases. - tags: - - v* - -concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} - cancel-in-progress: true - -env: - IMAGE_NAME: cactus-rust-compiler - -jobs: - # Push image to GitHub Packages. - # See also https://docs.docker.com/docker-hub/builds/ - build-tag-push-container: - runs-on: ubuntu-20.04 - env: - DOCKER_BUILDKIT: 1 - DOCKERFILE_PATH: ./tools/docker/rust-compiler/Dockerfile - DOCKER_BUILD_DIR: ./tools/docker/rust-compiler/ - permissions: - packages: write - contents: read - - steps: - - uses: actions/checkout@v3.5.2 - - - name: Build image - run: docker build $DOCKER_BUILD_DIR --file $DOCKERFILE_PATH --tag $IMAGE_NAME --label "runnumber=${GITHUB_RUN_ID}" - - - name: Log in to registry - # This is where you will update the PAT to GITHUB_TOKEN - run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin - - - name: Push image - run: | - SHORTHASH=$(git rev-parse --short "$GITHUB_SHA") - TODAYS_DATE="$(date +%F)" - DOCKER_TAG="$TODAYS_DATE-$SHORTHASH" - IMAGE_ID=ghcr.io/${{ github.repository_owner }}/$IMAGE_NAME - # Change all uppercase to lowercase - IMAGE_ID=$(echo $IMAGE_ID | tr '[A-Z]' '[a-z]') - # Strip git ref prefix from version - VERSION=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,') - # Strip "v" prefix from tag name - [[ "${{ github.ref }}" == "refs/tags/"* ]] && VERSION=$(echo $VERSION | sed -e 's/^v//') - # Do not use the `latest` tag at all, tag with date + git short hash if there is no git tag - [ "$VERSION" == "main" ] && VERSION=$DOCKER_TAG - echo IMAGE_ID=$IMAGE_ID - echo VERSION=$VERSION - docker tag $IMAGE_NAME $IMAGE_ID:$VERSION - docker push $IMAGE_ID:$VERSION diff --git a/.github/workflows/sawtooth-all-in-one-publish.yaml b/.github/workflows/sawtooth-all-in-one-publish.yaml deleted file mode 100644 index 26d1b49ca7..0000000000 --- a/.github/workflows/sawtooth-all-in-one-publish.yaml +++ /dev/null @@ -1,60 +0,0 @@ -name: sawtooth-all-in-one-publish - -on: - push: - # Publish `main` as Docker `latest` image. - branches: - - main - - # Publish `v1.2.3` tags as releases. - tags: - - v* - -concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} - cancel-in-progress: true - -env: - IMAGE_NAME: cactus-sawtooth-all-in-one - -jobs: - # Push image to GitHub Packages. - # See also https://docs.docker.com/docker-hub/builds/ - build-tag-push-container: - runs-on: ubuntu-20.04 - env: - DOCKER_BUILDKIT: 1 - DOCKERFILE_PATH: ./tools/docker/sawtooth-all-in-one/Dockerfile - DOCKER_BUILD_DIR: ./tools/docker/sawtooth-all-in-one/ - permissions: - packages: write - contents: read - - steps: - - uses: actions/checkout@v3.5.2 - - - name: Build image - run: docker build $DOCKER_BUILD_DIR --file $DOCKERFILE_PATH --tag $IMAGE_NAME --label "runnumber=${GITHUB_RUN_ID}" - - - name: Log in to registry - # This is where you will update the PAT to GITHUB_TOKEN - run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin - - - name: Push image - run: | - SHORTHASH=$(git rev-parse --short "$GITHUB_SHA") - TODAYS_DATE="$(date +%F)" - DOCKER_TAG="$TODAYS_DATE-$SHORTHASH" - IMAGE_ID=ghcr.io/${{ github.repository_owner }}/$IMAGE_NAME - # Change all uppercase to lowercase - IMAGE_ID=$(echo $IMAGE_ID | tr '[A-Z]' '[a-z]') - # Strip git ref prefix from version - VERSION=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,') - # Strip "v" prefix from tag name - [[ "${{ github.ref }}" == "refs/tags/"* ]] && VERSION=$(echo $VERSION | sed -e 's/^v//') - # Do not use the `latest` tag at all, tag with date + git short hash if there is no git tag - [ "$VERSION" == "main" ] && VERSION=$DOCKER_TAG - echo IMAGE_ID=$IMAGE_ID - echo VERSION=$VERSION - docker tag $IMAGE_NAME $IMAGE_ID:$VERSION - docker push $IMAGE_ID:$VERSION diff --git a/.github/workflows/semantic-pull-request.yaml b/.github/workflows/semantic-pull-request.yaml deleted file mode 100644 index f9cda8e4f9..0000000000 --- a/.github/workflows/semantic-pull-request.yaml +++ /dev/null @@ -1,21 +0,0 @@ -name: "Lint PR" - -on: - pull_request_target: - types: - - opened - - edited - - synchronize - -concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} - cancel-in-progress: true - -jobs: - main: - name: Validate PR title - runs-on: ubuntu-20.04 - steps: - - uses: amannn/action-semantic-pull-request@v5.0.2 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/soos.yaml b/.github/workflows/soos.yaml new file mode 100644 index 0000000000..de4d818b2d --- /dev/null +++ b/.github/workflows/soos.yaml @@ -0,0 +1,14 @@ +on: [push] + +jobs: + soos-sca-analysis: + name: SOOS SCA Scan + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@master + - name: Run SOOS - Scan for vulnerabilities + uses: soos-io/soos-sca-github-action@v2 # Get Latest Version from https://github.com/marketplace/actions/soos-core-sca + with: + project_name: "Cacti - test" + client_id: ${{ secrets.SOOS_CLIENT_ID }} + api_key: ${{ secrets.SOOS_API_KEY }} \ No newline at end of file diff --git a/.github/workflows/test-npm-registry-publish.yaml b/.github/workflows/test-npm-registry-publish.yaml deleted file mode 100644 index 9a02b60999..0000000000 --- a/.github/workflows/test-npm-registry-publish.yaml +++ /dev/null @@ -1,60 +0,0 @@ -name: test-npm-registry-publish - -on: - push: - # Publish `main` as Docker `latest` image. - branches: - - main - - # Publish `v1.2.3` tags as releases. - tags: - - v* - -concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} - cancel-in-progress: true - -env: - IMAGE_NAME: cactus-test-npm-registry - -jobs: - # Push image to GitHub Packages. - # See also https://docs.docker.com/docker-hub/builds/ - build-tag-push-container: - runs-on: ubuntu-20.04 - env: - DOCKER_BUILDKIT: 1 - DOCKERFILE_PATH: ./tools/docker/test-npm-registry/Dockerfile - DOCKER_BUILD_DIR: ./tools/docker/test-npm-registry/ - permissions: - packages: write - contents: read - - steps: - - uses: actions/checkout@v3.5.2 - - - name: Build image - run: docker build $DOCKER_BUILD_DIR --file $DOCKERFILE_PATH --tag $IMAGE_NAME --label "runnumber=${GITHUB_RUN_ID}" - - - name: Log in to registry - # This is where you will update the PAT to GITHUB_TOKEN - run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin - - - name: Push image - run: | - SHORTHASH=$(git rev-parse --short "$GITHUB_SHA") - TODAYS_DATE="$(date +%F)" - DOCKER_TAG="$TODAYS_DATE-$SHORTHASH" - IMAGE_ID=ghcr.io/${{ github.repository_owner }}/$IMAGE_NAME - # Change all uppercase to lowercase - IMAGE_ID=$(echo $IMAGE_ID | tr '[A-Z]' '[a-z]') - # Strip git ref prefix from version - VERSION=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,') - # Strip "v" prefix from tag name - [[ "${{ github.ref }}" == "refs/tags/"* ]] && VERSION=$(echo $VERSION | sed -e 's/^v//') - # Do not use the `latest` tag at all, tag with date + git short hash if there is no git tag - [ "$VERSION" == "main" ] && VERSION=$DOCKER_TAG - echo IMAGE_ID=$IMAGE_ID - echo VERSION=$VERSION - docker tag $IMAGE_NAME $IMAGE_ID:$VERSION - docker push $IMAGE_ID:$VERSION diff --git a/.github/workflows/test_weaver-asset-exchange-besu.yaml b/.github/workflows/test_weaver-asset-exchange-besu.yaml deleted file mode 100644 index 93f0d7ce2a..0000000000 --- a/.github/workflows/test_weaver-asset-exchange-besu.yaml +++ /dev/null @@ -1,401 +0,0 @@ -# This is a basic workflow to help you get started with Actions - -name: Test Asset Exchange Besu - -env: - NODEJS_VERSION: v18.18.2 - -# Controls when the workflow will run -on: - # Triggers the workflow on push or pull request events but only for the main branch - push: - branches: [ main ] - paths: - - '.github/workflows/test_weaver-**' - - 'weaver/**' - - '!weaver/docs/**' - - '!weaver/rfcs/**' - - '!weaver/resources/**' - pull_request: - branches: [ main ] - paths: - - '.github/workflows/test_weaver-**' - - 'weaver/**' - - '!weaver/docs/**' - - '!weaver/rfcs/**' - - '!weaver/resources/**' - - # Allows you to run this workflow manually from the Actions tab - workflow_dispatch: - -concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} - cancel-in-progress: true - -# A workflow run is made up of one or more jobs that can run sequentially or in parallel -jobs: - - asset-exchange-besu: - if: ${{ false }} - # The type of runner that the job will run on - runs-on: ubuntu-latest - - strategy: - fail-fast: false - matrix: - app_contract: ["AliceERC1155", "AliceERC20", "AliceERC721"] - - # Steps represent a sequence of tasks that will be executed as part of the job - steps: - # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - - uses: actions/checkout@v3.5.2 - - - name: Set up JDK 11 - uses: actions/setup-java@v3.11.0 - with: - java-version: '11' - distribution: 'adopt' - - - name: Use Node.js ${{ env.NODEJS_VERSION }} - uses: actions/setup-node@v3.6.0 - with: - node-version: ${{ env.NODEJS_VERSION }} - - - name: Use Protoc 3.15 - run: | - curl -LO https://github.com/protocolbuffers/protobuf/releases/download/v3.15.6/protoc-3.15.6-linux-x86_64.zip - unzip protoc-3.15.6-linux-x86_64.zip -d protoc - - # PROTOS - - name: Build Solidity Protos - run: | - export PATH="$PATH:${GITHUB_WORKSPACE}/protoc/bin" - make build - working-directory: weaver/common/protos-sol - - # BESU NETWORK - - name: Start Besu Network - run: | - sudo apt install -y tmux jq - wget https://hyperledger.jfrog.io/artifactory/besu-binaries/besu/22.7.0/besu-22.7.0.zip - unzip besu-22.7.0.zip - export PATH="${PWD}/besu-22.7.0/bin:$PATH" - wget https://artifacts.consensys.net/public/ethsigner/raw/names/ethsigner.zip/versions/22.1.3/ethsigner-22.1.3.zip - unzip ethsigner-22.1.3.zip - export PATH="${PWD}/ethsigner-22.1.3/bin:$PATH" - make start - sleep 100 - working-directory: weaver/tests/network-setups/besu - - # Deploy contracts - - name: Deploy contracts - run: | - make deploy-contracts - working-directory: weaver/samples/besu/simpleasset - - # BESU CLI - - name: Setup BESU CLI .npmrc - run: | - cp .npmrc.template .npmrc - sed -i "s//${{ secrets.GITHUB_TOKEN }}/g" .npmrc - cat .npmrc - working-directory: weaver/samples/besu/besu-cli - - - name: Setup BESU CLI init - run: | - make build - cp config.template.json tmp.json - cp config.template.json tmp.json - jq -r '.network1.tokenContract |= "../simpleasset/build/contracts/${{ matrix.app_contract }}.json"' tmp.json > config.json - cp config.json tmp.json - jq -r '.network2.tokenContract |= "../simpleasset/build/contracts/BobERC20.json"' tmp.json > config.json - rm tmp.json - working-directory: weaver/samples/besu/besu-cli - - - name: Asset Exchange Besu CLI Tests - run: | - export PATH="${PWD}/bin:$PATH" - COUNT=0 - TOTAL=10 - - # HTLC Params - timeout=1000 - hashBase64="ivHErp1x4bJDKuRo6L5bApO/DdoyD/dG0mAZrzLZEIs=" - preimage="secrettext" - - # issue tokens to account 1 - initAmount=10 - transferAmount=5 - tokenId=0 - # & lock 5 token for account 2 in network 1 - if [ ${{ matrix.app_contract }} == "AliceERC20" ]; then - besu-cli asset issue --network=network1 --account=1 --amount=${initAmount} --asset_type=ERC20 - besu-cli asset lock --network=network1 --sender_account=1 --recipient_account=2 --amount=${transferAmount} --timeout=${timeout} --hash_base64=${hashBase64} 1> tmp.out - elif [ ${{ matrix.app_contract }} == "AliceERC1155" ]; then - besu-cli asset issue --network=network1 --account=1 --amount=${initAmount} --token_id=${tokenId} --token_data="" --asset_type=ERC1155 - besu-cli asset lock --network=network1 --sender_account=1 --recipient_account=2 --amount=${transferAmount} --token_id=${tokenId} --timeout=${timeout} --asset_type=ERC1155 --hash_base64=${hashBase64} 1> tmp.out - else - initAmount=1 - transferAmount=1 - besu-cli asset issue --network=network1 --account=1 --token_id=${tokenId} --asset_type=ERC721 1> tmp.out - tokenId=$(cat tmp.out | grep "New ERC721 token minted with id " | sed -e 's/New ERC721 token minted with id //') - cat tmp.out - echo $tokenId - besu-cli asset lock --network=network1 --sender_account=1 --recipient_account=2 --token_id=${tokenId} --asset_type=ERC721 --timeout=${timeout} --hash_base64=${hashBase64} 1> tmp.out - fi - - balanceRem=$((initAmount-transferAmount)) - cat tmp.out | grep "Account balance of the sender in Network network1: ${initAmount} " && COUNT=$(( COUNT + 1 )) && echo "PASS" - cat tmp.out | grep "Account balance of the sender in Network network1: ${balanceRem}" && COUNT=$(( COUNT + 1 )) && echo "PASS" - cat tmp.out | grep "Account balance of the recipient in Network network1: 0" && COUNT=$(( COUNT + 1 )) && echo "PASS" - cat tmp.out - - tmp_string=$(cat tmp.out | grep "Lock contract ID:") - arrIN=(${tmp_string//:/ }) - LOCK_ID=${arrIN[3]} - - # Is Asset locked - besu-cli asset is-locked --network=network1 --lock_contract_id=$LOCK_ID 1> tmp.out - cat tmp.out | grep "in Network network1: true" && COUNT=$(( COUNT + 1 )) && echo "PASS" - cat tmp.out - - # Claim asset - besu-cli asset claim --network=network1 --recipient_account=2 --preimage=${preimage} --token_id=${tokenId} --lock_contract_id=$LOCK_ID 1> tmp.out - cat tmp.out | grep "Account balance of the recipient in Network network1 before claiming: 0" && COUNT=$(( COUNT + 1 )) && echo "PASS" - cat tmp.out | grep "Account balance of the recipient in Network network1 after claiming: ${transferAmount}" && COUNT=$(( COUNT + 1 )) && echo "PASS" - cat tmp.out - - ###### test unlock ####### - timeout=20 - initAmount=5 - recipientAmt=0 - transferAmount=2 - tokenId=1 - if [ ${{ matrix.app_contract }} == "AliceERC20" ]; then - recipientAmt=5 - besu-cli asset lock --network=network1 --sender_account=1 --recipient_account=2 --amount=${transferAmount} --timeout=${timeout} --hash_base64=${hashBase64} 1> tmp.out - elif [ ${{ matrix.app_contract }} == "AliceERC1155" ]; then - besu-cli asset issue --network=network1 --account=1 --amount=${initAmount} --token_id=${tokenId} --token_data="" --asset_type=ERC1155 - besu-cli asset lock --network=network1 --sender_account=1 --recipient_account=2 --amount=${transferAmount} --token_id=${tokenId} --timeout=${timeout} --asset_type=ERC1155 --hash_base64=${hashBase64} 1> tmp.out - else - initAmount=1 - transferAmount=1 - recipientAmt=1 - besu-cli asset issue --network=network1 --account=1 --token_id=${tokenId} --asset_type=ERC721 1> tmp.out - tokenId=$(cat tmp.out | grep "New ERC721 token minted with id " | sed -e 's/New ERC721 token minted with id //') - cat tmp.out - echo $tokenId - besu-cli asset lock --network=network1 --sender_account=1 --recipient_account=2 --token_id=${tokenId} --asset_type=ERC721 --timeout=${timeout} --hash_base64=${hashBase64} 1> tmp.out - fi - - balanceRem=$((initAmount-transferAmount)) - cat tmp.out | grep "Account balance of the sender in Network network1: ${initAmount}" && COUNT=$(( COUNT + 1 )) && echo "PASS" - cat tmp.out | grep "Account balance of the sender in Network network1: ${balanceRem}" && COUNT=$(( COUNT + 1 )) && echo "PASS" - cat tmp.out | grep "Account balance of the recipient in Network network1: ${recipientAmt}" && COUNT=$(( COUNT + 1 )) && echo "PASS" - cat tmp.out - - tmp_string=$(cat tmp.out | grep "Lock contract ID:") - arrIN=(${tmp_string//:/ }) - LOCK_ID=${arrIN[3]} - - sleep $timeout - - besu-cli asset unlock --network=network1 --lock_contract_id=$LOCK_ID --sender_account=1 --token_id=${tokenId} 1> tmp.out - cat tmp.out | grep "before unlocking: ${balanceRem}" && COUNT=$(( COUNT + 1 )) && echo "PASS" - cat tmp.out | grep "after unlocking: ${initAmount}" && COUNT=$(( COUNT + 1 )) && echo "PASS" - cat tmp.out - - # RESULT - echo "Passed $COUNT/$TOTAL Tests." - - if [ $COUNT == $TOTAL ]; then - exit 0 - else - exit 1 - fi - working-directory: weaver/samples/besu/besu-cli - - asset-exchange-besu-local: - # The type of runner that the job will run on - runs-on: ubuntu-latest - - strategy: - fail-fast: false - matrix: - app_contract: ["AliceERC1155", "AliceERC20", "AliceERC721"] - - # Steps represent a sequence of tasks that will be executed as part of the job - steps: - # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - - uses: actions/checkout@v3.5.2 - - - name: Set up JDK 11 - uses: actions/setup-java@v3.11.0 - with: - java-version: '11' - distribution: 'adopt' - - - name: Use Node.js ${{ env.NODEJS_VERSION }} - uses: actions/setup-node@v3.6.0 - with: - node-version: ${{ env.NODEJS_VERSION }} - - - name: Use Protoc 3.15 - run: | - curl -LO https://github.com/protocolbuffers/protobuf/releases/download/v3.15.6/protoc-3.15.6-linux-x86_64.zip - unzip protoc-3.15.6-linux-x86_64.zip -d protoc - - # PROTOS - - name: Build JS Protos - run: | - export PATH="$PATH:${GITHUB_WORKSPACE}/protoc/bin" - make build - working-directory: weaver/common/protos-js - - # PROTOS - - name: Build Solidity Protos - run: | - export PATH="$PATH:${GITHUB_WORKSPACE}/protoc/bin" - make build - working-directory: weaver/common/protos-sol - - # BESU SDK - - name: Setup BESU SDK - run: make build-local - working-directory: weaver/sdks/besu/node - - # BESU NETWORK - - name: Start Besu Network - run: | - sudo apt install -y tmux jq - wget https://hyperledger.jfrog.io/artifactory/besu-binaries/besu/22.7.0/besu-22.7.0.zip - unzip besu-22.7.0.zip - export PATH="${PWD}/besu-22.7.0/bin:$PATH" - wget https://artifacts.consensys.net/public/ethsigner/raw/names/ethsigner.zip/versions/22.1.3/ethsigner-22.1.3.zip - unzip ethsigner-22.1.3.zip - export PATH="${PWD}/ethsigner-22.1.3/bin:$PATH" - make start - sleep 100 - working-directory: weaver/tests/network-setups/besu - - # Deploy contracts - - name: Deploy contracts - run: | - make deploy-contracts - working-directory: weaver/samples/besu/simpleasset - - # BESU CLI - - name: Setup BESU CLI init - run: | - make build-local - cp config.template.json tmp.json - cp config.template.json tmp.json - jq -r '.network1.tokenContract |= "../simpleasset/build/contracts/${{ matrix.app_contract }}.json"' tmp.json > config.json - cp config.json tmp.json - jq -r '.network2.tokenContract |= "../simpleasset/build/contracts/BobERC20.json"' tmp.json > config.json - rm tmp.json - working-directory: weaver/samples/besu/besu-cli - - - name: Asset Exchange Besu CLI Tests - run: | - export PATH="${PWD}/bin:$PATH" - COUNT=0 - TOTAL=10 - - # HTLC Params - timeout=1000 - hashBase64="ivHErp1x4bJDKuRo6L5bApO/DdoyD/dG0mAZrzLZEIs=" - preimage="secrettext" - - # issue tokens to account 1 - initAmount=10 - transferAmount=5 - tokenId=0 - # & lock 5 token for account 2 in network 1 - if [ ${{ matrix.app_contract }} == "AliceERC20" ]; then - besu-cli asset issue --network=network1 --account=1 --amount=${initAmount} --asset_type=ERC20 - besu-cli asset lock --network=network1 --sender_account=1 --recipient_account=2 --amount=${transferAmount} --timeout=${timeout} --hash_base64=${hashBase64} 1> tmp.out - elif [ ${{ matrix.app_contract }} == "AliceERC1155" ]; then - besu-cli asset issue --network=network1 --account=1 --amount=${initAmount} --token_id=${tokenId} --token_data="" --asset_type=ERC1155 - besu-cli asset lock --network=network1 --sender_account=1 --recipient_account=2 --amount=${transferAmount} --token_id=${tokenId} --timeout=${timeout} --asset_type=ERC1155 --hash_base64=${hashBase64} 1> tmp.out - else - initAmount=1 - transferAmount=1 - besu-cli asset issue --network=network1 --account=1 --token_id=${tokenId} --asset_type=ERC721 1> tmp.out - tokenId=$(cat tmp.out | grep "New ERC721 token minted with id " | sed -e 's/New ERC721 token minted with id //') - cat tmp.out - echo $tokenId - besu-cli asset lock --network=network1 --sender_account=1 --recipient_account=2 --token_id=${tokenId} --asset_type=ERC721 --timeout=${timeout} --hash_base64=${hashBase64} 1> tmp.out - fi - - balanceRem=$((initAmount-transferAmount)) - cat tmp.out | grep "Account balance of the sender in Network network1: ${initAmount} " && COUNT=$(( COUNT + 1 )) && echo "PASS" - cat tmp.out | grep "Account balance of the sender in Network network1: ${balanceRem}" && COUNT=$(( COUNT + 1 )) && echo "PASS" - cat tmp.out | grep "Account balance of the recipient in Network network1: 0" && COUNT=$(( COUNT + 1 )) && echo "PASS" - cat tmp.out - - tmp_string=$(cat tmp.out | grep "Lock contract ID:") - arrIN=(${tmp_string//:/ }) - LOCK_ID=${arrIN[3]} - - # Is Asset locked - besu-cli asset is-locked --network=network1 --lock_contract_id=$LOCK_ID 1> tmp.out - cat tmp.out | grep "in Network network1: true" && COUNT=$(( COUNT + 1 )) && echo "PASS" - cat tmp.out - - # Claim asset - besu-cli asset claim --network=network1 --recipient_account=2 --preimage=${preimage} --token_id=${tokenId} --lock_contract_id=$LOCK_ID 1> tmp.out - cat tmp.out | grep "Account balance of the recipient in Network network1 before claiming: 0" && COUNT=$(( COUNT + 1 )) && echo "PASS" - cat tmp.out | grep "Account balance of the recipient in Network network1 after claiming: ${transferAmount}" && COUNT=$(( COUNT + 1 )) && echo "PASS" - cat tmp.out - - ###### test unlock ####### - timeout=20 - initAmount=5 - recipientAmt=0 - transferAmount=2 - tokenId=1 - if [ ${{ matrix.app_contract }} == "AliceERC20" ]; then - recipientAmt=5 - besu-cli asset lock --network=network1 --sender_account=1 --recipient_account=2 --amount=${transferAmount} --timeout=${timeout} --hash_base64=${hashBase64} 1> tmp.out - elif [ ${{ matrix.app_contract }} == "AliceERC1155" ]; then - besu-cli asset issue --network=network1 --account=1 --amount=${initAmount} --token_id=${tokenId} --token_data="" --asset_type=ERC1155 - besu-cli asset lock --network=network1 --sender_account=1 --recipient_account=2 --amount=${transferAmount} --token_id=${tokenId} --timeout=${timeout} --asset_type=ERC1155 --hash_base64=${hashBase64} 1> tmp.out - else - initAmount=1 - transferAmount=1 - recipientAmt=1 - besu-cli asset issue --network=network1 --account=1 --token_id=${tokenId} --asset_type=ERC721 1> tmp.out - tokenId=$(cat tmp.out | grep "New ERC721 token minted with id " | sed -e 's/New ERC721 token minted with id //') - cat tmp.out - echo $tokenId - besu-cli asset lock --network=network1 --sender_account=1 --recipient_account=2 --token_id=${tokenId} --asset_type=ERC721 --timeout=${timeout} --hash_base64=${hashBase64} 1> tmp.out - fi - - balanceRem=$((initAmount-transferAmount)) - cat tmp.out | grep "Account balance of the sender in Network network1: ${initAmount}" && COUNT=$(( COUNT + 1 )) && echo "PASS" - cat tmp.out | grep "Account balance of the sender in Network network1: ${balanceRem}" && COUNT=$(( COUNT + 1 )) && echo "PASS" - cat tmp.out | grep "Account balance of the recipient in Network network1: ${recipientAmt}" && COUNT=$(( COUNT + 1 )) && echo "PASS" - cat tmp.out - - tmp_string=$(cat tmp.out | grep "Lock contract ID:") - arrIN=(${tmp_string//:/ }) - LOCK_ID=${arrIN[3]} - - sleep $timeout - - besu-cli asset unlock --network=network1 --lock_contract_id=$LOCK_ID --sender_account=1 --token_id=${tokenId} 1> tmp.out - cat tmp.out | grep "before unlocking: ${balanceRem}" && COUNT=$(( COUNT + 1 )) && echo "PASS" - cat tmp.out | grep "after unlocking: ${initAmount}" && COUNT=$(( COUNT + 1 )) && echo "PASS" - cat tmp.out - - # RESULT - echo "Passed $COUNT/$TOTAL Tests." - - if [ $COUNT == $TOTAL ]; then - exit 0 - else - exit 1 - fi - working-directory: weaver/samples/besu/besu-cli - diff --git a/.github/workflows/test_weaver-asset-exchange-corda.yaml b/.github/workflows/test_weaver-asset-exchange-corda.yaml deleted file mode 100644 index 090eb49d86..0000000000 --- a/.github/workflows/test_weaver-asset-exchange-corda.yaml +++ /dev/null @@ -1,330 +0,0 @@ -# Copyright IBM Corp. All Rights Reserved. -# -# SPDX-License-Identifier: CC-BY-4.0 - -# This is a basic workflow to help you get started with Actions - -name: Test Asset Exchange Corda - -# Controls when the workflow will run -on: - # Triggers the workflow on push or pull request events but only for the main branch - push: - branches: [ main ] - paths: - - '.github/workflows/test_weaver-**' - - 'weaver/**' - - '!weaver/docs/**' - - '!weaver/rfcs/**' - - '!weaver/resources/**' - pull_request: - branches: [ main ] - paths: - - '.github/workflows/test_weaver-**' - - 'weaver/**' - - '!weaver/docs/**' - - '!weaver/rfcs/**' - - '!weaver/resources/**' - - # Allows you to run this workflow manually from the Actions tab - workflow_dispatch: - -concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} - cancel-in-progress: true - -# A workflow run is made up of one or more jobs that can run sequentially or in parallel -jobs: - - asset-exchange-corda: - if: ${{ false }} - # The type of runner that the job will run on - runs-on: ubuntu-latest - - # Steps represent a sequence of tasks that will be executed as part of the job - steps: - # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - - uses: actions/checkout@v3.5.2 - - - name: Set up JDK 8 - uses: actions/setup-java@v3.11.0 - with: - java-version: '8' - distribution: 'adopt' - - # CORDA NETWORK - - name: Generate github.properties - run: | - echo "Using ${GITHUB_ACTOR} user." - echo "username=${GITHUB_ACTOR}" >> github.properties - echo "password=${{ secrets.GITHUB_TOKEN }}" >> github.properties - echo "url=https://maven.pkg.github.com/${GITHUB_ACTOR}/cacti" >> github.properties - - echo "Using ${GITHUB_ACTOR} user." - echo "username=${GITHUB_ACTOR}" >> github.main.properties - echo "password=${{ secrets.GITHUB_TOKEN }}" >> github.main.properties - echo "url=https://maven.pkg.github.com/hyperledger/cacti" >> github.main.properties - - ./scripts/get-cordapps.sh || mv github.main.properties github.properties - - cat github.properties - working-directory: weaver/tests/network-setups/corda - - # CORDA NETWORK - - name: Start Corda Network - run: | - make start-network1 PROFILE=3-nodes - sleep 100 - docker logs corda_partya_1 - docker logs corda_partyb_1 - working-directory: weaver/tests/network-setups/corda - - # FABRIC CLI - - name: Setup Corda CLI init - run: ./scripts/initAsset.sh 1 - working-directory: weaver/samples/corda/corda-simple-application - - - name: Asset Exchange Corda CLI Tests - run: | - COUNT=0 - TOTAL=5 - - # Lock 50 tokens - CORDA_PORT=10009 ./clients/build/install/clients/bin/clients lock-asset -f -h64 ivHErp1x4bJDKuRo6L5bApO/DdoyD/dG0mAZrzLZEIs= -t 180 -r "O=PartyA,L=London,C=GB" -p t1:50 1> tmp.out - cat tmp.out | grep "HTLC Lock State created with contract ID Right" && COUNT=$(( COUNT + 1 )) && echo "PASS" - cat tmp.out - - CID=$(cat tmp.out | grep "HTLC Lock State created with contract ID Right" | sed -e 's/.*Right(b=\(.*\))\./\1/') - - # Is Asset locked - CORDA_PORT=10009 ./clients/build/install/clients/bin/clients is-asset-locked -cid $CID 1> tmp.out - cat tmp.out | grep "Is Asset Locked Response: true" && COUNT=$(( COUNT + 1 )) && echo "PASS" - cat tmp.out - - # Claim asset - CORDA_PORT=10006 ./clients/build/install/clients/bin/clients claim-asset -cid $CID -s secrettext 1> tmp.out - cat tmp.out | grep "Asset Claim Response: Right" && COUNT=$(( COUNT + 1 )) && echo "PASS" - cat tmp.out - - # Timeout - CORDA_PORT=10006 ./clients/build/install/clients/bin/clients lock-asset -f -h64 ivHErp1x4bJDKuRo6L5bApO/DdoyD/dG0mAZrzLZEIs= -t 5 -r "O=PartyB,L=London,C=GB" -p t1:50 1> tmp.out - CID=$(cat tmp.out | grep "HTLC Lock State created with contract ID Right" | sed -e 's/.*Right(b=\(.*\))\./\1/') - sleep 5 - cat tmp.out - - ## Is asset lock false - CORDA_PORT=10009 ./clients/build/install/clients/bin/clients is-asset-locked -cid $CID 1> tmp.out - cat tmp.out | grep "Is Asset Locked Response: false" && COUNT=$(( COUNT + 1 )) && echo "PASS" - cat tmp.out - - ## Unlock asset - CORDA_PORT=10006 ./clients/build/install/clients/bin/clients unlock-asset -cid $CID 1> tmp.out - cat tmp.out | grep "Asset Unlock Response: Right" && COUNT=$(( COUNT + 1 )) && echo "PASS" - cat tmp.out - - # RESULT - echo "Passed $COUNT/$TOTAL Tests." - - if [ $COUNT == $TOTAL ]; then - exit 0 - else - exit 1 - fi - working-directory: weaver/samples/corda/corda-simple-application - - asset-exchange-corda-local: - # The type of runner that the job will run on - runs-on: ubuntu-latest - - # Steps represent a sequence of tasks that will be executed as part of the job - steps: - # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - - uses: actions/checkout@v3.5.2 - - - name: Set up JDK 8 - uses: actions/setup-java@v3.11.0 - with: - java-version: '8' - distribution: 'adopt' - - - name: Build Java Protos - run: make build - working-directory: weaver/common/protos-java-kt - - # Build Dependencies - - name: Build Corda Interop App - run: make build-local - working-directory: weaver/core/network/corda-interop-app - - - name: Build Corda Interop SDK - run: make build - working-directory: weaver/sdks/corda - - - name: Build Corda SimpleApplication - run: make build-local - working-directory: weaver/samples/corda/corda-simple-application - - # CORDA NETWORK - - name: Start Corda Network - run: | - make start-network1-local PROFILE=3-nodes - sleep 100 - docker logs corda_partya_1 - docker logs corda_partyb_1 - working-directory: weaver/tests/network-setups/corda - - # FABRIC CLI - - name: Setup Corda CLI init - run: ./scripts/initAsset.sh 1 - working-directory: weaver/samples/corda/corda-simple-application - - - name: Asset Exchange Corda CLI Tests - run: | - COUNT=0 - TOTAL=5 - - # Lock 50 tokens - CORDA_PORT=10009 ./clients/build/install/clients/bin/clients lock-asset -f -h64 ivHErp1x4bJDKuRo6L5bApO/DdoyD/dG0mAZrzLZEIs= -t 180 -r "O=PartyA,L=London,C=GB" -p t1:50 1> tmp.out - cat tmp.out | grep "HTLC Lock State created with contract ID Right" && COUNT=$(( COUNT + 1 )) && echo "PASS" - cat tmp.out - - CID=$(cat tmp.out | grep "HTLC Lock State created with contract ID Right" | sed -e 's/.*Right(b=\(.*\))\./\1/') - - # Is Asset locked - CORDA_PORT=10009 ./clients/build/install/clients/bin/clients is-asset-locked -cid $CID 1> tmp.out - cat tmp.out | grep "Is Asset Locked Response: true" && COUNT=$(( COUNT + 1 )) && echo "PASS" - cat tmp.out - - # Claim asset - CORDA_PORT=10006 ./clients/build/install/clients/bin/clients claim-asset -cid $CID -s secrettext 1> tmp.out - cat tmp.out | grep "Asset Claim Response: Right" && COUNT=$(( COUNT + 1 )) && echo "PASS" - cat tmp.out - - # Timeout - CORDA_PORT=10006 ./clients/build/install/clients/bin/clients lock-asset -f -h64 ivHErp1x4bJDKuRo6L5bApO/DdoyD/dG0mAZrzLZEIs= -t 5 -r "O=PartyB,L=London,C=GB" -p t1:50 1> tmp.out - CID=$(cat tmp.out | grep "HTLC Lock State created with contract ID Right" | sed -e 's/.*Right(b=\(.*\))\./\1/') - sleep 5 - cat tmp.out - - ## Is asset lock false - CORDA_PORT=10009 ./clients/build/install/clients/bin/clients is-asset-locked -cid $CID 1> tmp.out - cat tmp.out | grep "Is Asset Locked Response: false" && COUNT=$(( COUNT + 1 )) && echo "PASS" - cat tmp.out - - ## Unlock asset - CORDA_PORT=10006 ./clients/build/install/clients/bin/clients unlock-asset -cid $CID 1> tmp.out - cat tmp.out | grep "Asset Unlock Response: Right" && COUNT=$(( COUNT + 1 )) && echo "PASS" - cat tmp.out - - # RESULT - echo "Passed $COUNT/$TOTAL Tests." - - if [ $COUNT == $TOTAL ]; then - exit 0 - else - exit 1 - fi - working-directory: weaver/samples/corda/corda-simple-application - - house-token-exchange-corda: - if: ${{ false }} - # The type of runner that the job will run on - runs-on: ubuntu-latest - - # Steps represent a sequence of tasks that will be executed as part of the job - steps: - # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - - uses: actions/checkout@v3.5.2 - - - name: Set up JDK 8 - uses: actions/setup-java@v3.11.0 - with: - java-version: '8' - distribution: 'adopt' - - # CORDA NETWORK - - name: Generate github.properties - run: | - echo "Using ${GITHUB_ACTOR} user." - echo "username=${GITHUB_ACTOR}" >> github.properties - echo "password=${{ secrets.GITHUB_TOKEN }}" >> github.properties - echo "url=https://maven.pkg.github.com/${GITHUB_ACTOR}/cacti" >> github.properties - - echo "Using ${GITHUB_ACTOR} user." - echo "username=${GITHUB_ACTOR}" >> github.main.properties - echo "password=${{ secrets.GITHUB_TOKEN }}" >> github.main.properties - echo "url=https://maven.pkg.github.com/hyperledger/cacti" >> github.main.properties - - ./scripts/get-cordapps.sh || mv github.main.properties github.properties - - cat github.properties - working-directory: weaver/tests/network-setups/corda - - # CORDA NETWORK - - name: Start Corda Network - run: | - make start-network1 APP_NAME=house PROFILE=3-nodes - sleep 100 - docker logs corda_partya_1 - docker logs corda_partyb_1 - docker logs corda_partyc_1 - working-directory: weaver/tests/network-setups/corda - - # CORDA CLI - - name: Build CLI - run: | - cp ../../../tests/network-setups/corda/github.properties . - make build-cli - working-directory: weaver/samples/corda/corda-simple-application - - - name: Setup Corda CLI init - run: ./scripts/initHouseToken.sh 1 - working-directory: weaver/samples/corda/corda-simple-application - - - name: House Token Exchange Corda CLI Tests - run: | - COUNT=0 - TOTAL=5 - - # Lock 50 tokens - CORDA_PORT=10009 ./clients/build/install/clients/bin/clients house-token lock -f -h64 ivHErp1x4bJDKuRo6L5bApO/DdoyD/dG0mAZrzLZEIs= -t 180 -r "O=PartyA,L=London,C=GB" -o "O=PartyC,L=London,C=GB" -p house:10 1> tmp.out - cat tmp.out | grep "HTLC Lock State created with contract ID Right" && COUNT=$(( COUNT + 1 )) && echo "PASS" - cat tmp.out - - CID=$(cat tmp.out | grep "HTLC Lock State created with contract ID Right" | sed -e 's/.*Right(b=\(.*\))\./\1/') - - # Is Asset locked - CORDA_PORT=10009 ./clients/build/install/clients/bin/clients house-token is-locked -cid $CID 1> tmp.out - cat tmp.out | grep "Is Asset Locked Response: true" && COUNT=$(( COUNT + 1 )) && echo "PASS" - cat tmp.out - - # Claim asset - CORDA_PORT=10006 ./clients/build/install/clients/bin/clients house-token claim -cid $CID -s secrettext 1> tmp.out - cat tmp.out | grep "Asset Claim Response: Right" && COUNT=$(( COUNT + 1 )) && echo "PASS" - cat tmp.out - - # Timeout - CORDA_PORT=10006 ./clients/build/install/clients/bin/clients house-token lock -f -h64 ivHErp1x4bJDKuRo6L5bApO/DdoyD/dG0mAZrzLZEIs= -t 10 -r "O=PartyB,L=London,C=GB" -p house:20 1> tmp.out - CID=$(cat tmp.out | grep "HTLC Lock State created with contract ID Right" | sed -e 's/.*Right(b=\(.*\))\./\1/') - sleep 10 - cat tmp.out - - ## Is asset lock false - CORDA_PORT=10009 ./clients/build/install/clients/bin/clients house-token is-locked -cid $CID 1> tmp.out - cat tmp.out | grep "Is Asset Locked Response: false" && COUNT=$(( COUNT + 1 )) && echo "PASS" - cat tmp.out - - ## Unlock asset - CORDA_PORT=10006 ./clients/build/install/clients/bin/clients house-token unlock -cid $CID 1> tmp.out - cat tmp.out | grep "Asset Unlock Response: Right" && COUNT=$(( COUNT + 1 )) && echo "PASS" - cat tmp.out - - # RESULT - echo "Passed $COUNT/$TOTAL Tests." - - if [ $COUNT == $TOTAL ]; then - exit 0 - else - exit 1 - fi - working-directory: weaver/samples/corda/corda-simple-application diff --git a/.github/workflows/test_weaver-asset-exchange-fabric.yaml b/.github/workflows/test_weaver-asset-exchange-fabric.yaml deleted file mode 100644 index 61c90060cb..0000000000 --- a/.github/workflows/test_weaver-asset-exchange-fabric.yaml +++ /dev/null @@ -1,202 +0,0 @@ -# Copyright IBM Corp. All Rights Reserved. -# -# SPDX-License-Identifier: CC-BY-4.0 - -# This is a basic workflow to help you get started with Actions - -name: Test Asset Exchange Fabric - -env: - NODEJS_VERSION: v18.18.2 - -# Controls when the workflow will run -on: - # Triggers the workflow on push or pull request events but only for the main branch - push: - branches: [ main ] - paths: - - '.github/workflows/test_weaver-**' - - 'weaver/**' - - '!weaver/docs/**' - - '!weaver/rfcs/**' - - '!weaver/resources/**' - pull_request: - branches: [ main ] - paths: - - '.github/workflows/test_weaver-**' - - 'weaver/**' - - '!weaver/docs/**' - - '!weaver/rfcs/**' - - '!weaver/resources/**' - - # Allows you to run this workflow manually from the Actions tab - workflow_dispatch: - -concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} - cancel-in-progress: true - -# A workflow run is made up of one or more jobs that can run sequentially or in parallel -jobs: - - asset-exchange-fabric: - if: ${{ false }} - # The type of runner that the job will run on - runs-on: ubuntu-latest - - # Steps represent a sequence of tasks that will be executed as part of the job - steps: - # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - - uses: actions/checkout@v3.5.2 - - - name: Set up Go - uses: actions/setup-go@v4.0.0 - with: - go-version: '1.20.2' - - - name: Use Node.js ${{ env.NODEJS_VERSION }} - uses: actions/setup-node@v3.6.0 - with: - node-version: ${{ env.NODEJS_VERSION }} - - # FABRIC NETWORK - - name: Start Fabric Network - run: make start-interop CHAINCODE_NAME=simpleasset PROFILE="2-nodes" - working-directory: weaver/tests/network-setups/fabric/dev - - # FABRIC CLI - - name: Setup Fabric CLI .npmrc - run: | - cp .npmrc.template .npmrc - sed -i "s//${{ secrets.GITHUB_TOKEN }}/g" .npmrc - cat .npmrc - working-directory: weaver/samples/fabric/fabric-cli - - name: Build Fabric CLI - run: npm install - working-directory: weaver/samples/fabric/fabric-cli - - name: Setup Fabric CLI Config - run: | - echo ${GITHUB_WORKSPACE} - cp config.template.json config.json - sed -i "s##${GITHUB_WORKSPACE}/weaver#g" config.json - working-directory: weaver/samples/fabric/fabric-cli - - name: Setup Fabric CLI ENV - run: | - echo ${GITHUB_WORKSPACE} - cp .env.template .env - ./bin/fabric-cli env set MEMBER_CREDENTIAL_FOLDER ${GITHUB_WORKSPACE}/weaver/samples/fabric/fabric-cli/src/data/credentials_docker - ./bin/fabric-cli env set CONFIG_PATH ${GITHUB_WORKSPACE}/weaver/samples/fabric/fabric-cli/config.json - cat .env - working-directory: weaver/samples/fabric/fabric-cli - - - name: Fabric CLI Init - run: ./scripts/initAsset.sh - working-directory: weaver/samples/fabric/fabric-cli - - - name: Asset Exchange Fabric CLI Tests - run: | - COUNT=0 - TOTAL=1 - - # FABRIC2 - FABRIC1 - ./bin/fabric-cli asset exchange-all --network1=network1 --network2=network2 --secret=secrettext --timeout-duration=100 bob:bond01:a04:alice:token1:100 &> tmp.out - tail -n 2 tmp.out | grep "Asset Exchange Complete." && COUNT=$(( COUNT + 1 )) && echo "PASS" - cat tmp.out - - # RESULT - echo "Passed $COUNT/$TOTAL Tests." - - if [ $COUNT == $TOTAL ]; then - exit 0 - else - exit 1 - fi - working-directory: weaver/samples/fabric/fabric-cli - - asset-exchange-fabric-local: - # if: ${{ false }} - # The type of runner that the job will run on - runs-on: ubuntu-latest - - # Steps represent a sequence of tasks that will be executed as part of the job - steps: - # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - - uses: actions/checkout@v3.5.2 - - - name: Set up Go - uses: actions/setup-go@v4.0.0 - with: - go-version: '1.20.2' - - - name: Use Node.js ${{ env.NODEJS_VERSION }} - uses: actions/setup-node@v3.6.0 - with: - node-version: ${{ env.NODEJS_VERSION }} - - - name: Use Protoc 3.15 - run: | - curl -LO https://github.com/protocolbuffers/protobuf/releases/download/v3.15.6/protoc-3.15.6-linux-x86_64.zip - unzip protoc-3.15.6-linux-x86_64.zip -d protoc - go install google.golang.org/protobuf/cmd/protoc-gen-go@latest - go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest - - # PROTOS - - name: Build JS Protos - run: | - export PATH="$PATH:${GITHUB_WORKSPACE}/protoc/bin" - make build - working-directory: weaver/common/protos-js - - # Build Dependencies - - name: Build Fabric Interop SDK - run: make build-local - working-directory: weaver/sdks/fabric/interoperation-node-sdk - - - name: Build Fabric CLI - run: make build-local - working-directory: weaver/samples/fabric/fabric-cli - - # FABRIC NETWORK - - name: Start Fabric Network - run: make start-interop-local CHAINCODE_NAME=simpleasset - working-directory: weaver/tests/network-setups/fabric/dev - - # FABRIC CLI - - name: Setup Fabric CLI Config - run: | - echo ${GITHUB_WORKSPACE} - cp config.template.json config.json - sed -i "s##${GITHUB_WORKSPACE}/weaver#g" config.json - working-directory: weaver/samples/fabric/fabric-cli - - name: Setup Fabric CLI ENV - run: | - echo ${GITHUB_WORKSPACE} - cp .env.template .env - ./bin/fabric-cli env set MEMBER_CREDENTIAL_FOLDER ${GITHUB_WORKSPACE}/weaver/samples/fabric/fabric-cli/src/data/credentials_docker - ./bin/fabric-cli env set CONFIG_PATH ${GITHUB_WORKSPACE}/weaver/samples/fabric/fabric-cli/config.json - cat .env - working-directory: weaver/samples/fabric/fabric-cli - - - name: Fabric CLI Init - run: ./scripts/initAsset.sh - working-directory: weaver/samples/fabric/fabric-cli - - - name: Asset Exchange Fabric CLI Tests - run: | - COUNT=0 - TOTAL=1 - - # FABRIC2 - FABRIC1 - ./bin/fabric-cli asset exchange-all --network1=network1 --network2=network2 --secret=secrettext --timeout-duration=100 bob:bond01:a04:alice:token1:100 &> tmp.out - tail -n 2 tmp.out | grep "Asset Exchange Complete." && COUNT=$(( COUNT + 1 )) && echo "PASS" - cat tmp.out - - # RESULT - echo "Passed $COUNT/$TOTAL Tests." - - if [ $COUNT == $TOTAL ]; then - exit 0 - else - exit 1 - fi - working-directory: weaver/samples/fabric/fabric-cli diff --git a/.github/workflows/test_weaver-asset-transfer.yaml b/.github/workflows/test_weaver-asset-transfer.yaml deleted file mode 100644 index 111cd5c034..0000000000 --- a/.github/workflows/test_weaver-asset-transfer.yaml +++ /dev/null @@ -1,1349 +0,0 @@ -# Copyright IBM Corp. All Rights Reserved. -# -# SPDX-License-Identifier: CC-BY-4.0 - -# This is a basic workflow to help you get started with Actions - -name: Test Asset Transfer - -env: - NODEJS_VERSION: v18.18.2 - -# Controls when the workflow will run -on: - # Triggers the workflow on push or pull request events but only for the main branch - push: - branches: [ main ] - paths: - - '.github/workflows/test_weaver-**' - - 'weaver/**' - - '!weaver/docs/**' - - '!weaver/rfcs/**' - - '!weaver/resources/**' - pull_request: - branches: [ main ] - paths: - - '.github/workflows/test_weaver-**' - - 'weaver/**' - - '!weaver/docs/**' - - '!weaver/rfcs/**' - - '!weaver/resources/**' - - # Allows you to run this workflow manually from the Actions tab - workflow_dispatch: - -concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} - cancel-in-progress: true - -# A workflow run is made up of one or more jobs that can run sequentially or in parallel -jobs: - asset-transfer: - if: ${{ false }} - # The type of runner that the job will run on - runs-on: ubuntu-latest - - # Steps represent a sequence of tasks that will be executed as part of the job - steps: - # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - - uses: actions/checkout@v3.5.2 - - - name: Set up JDK 8 - uses: actions/setup-java@v3.11.0 - with: - java-version: '8' - distribution: 'adopt' - - - name: Set up Go - uses: actions/setup-go@v4.0.0 - with: - go-version: '1.20.2' - - - name: Use Node.js ${{ env.NODEJS_VERSION }} - uses: actions/setup-node@v3.6.0 - with: - node-version: ${{ env.NODEJS_VERSION }} - - # CORDA NETWORK - - name: Generate github.properties - run: | - echo "Using ${GITHUB_ACTOR} user." - echo "username=${GITHUB_ACTOR}" >> github.properties - echo "password=${{ secrets.GITHUB_TOKEN }}" >> github.properties - echo "url=https://maven.pkg.github.com/${GITHUB_ACTOR}/cacti" >> github.properties - - echo "Using ${GITHUB_ACTOR} user." - echo "username=${GITHUB_ACTOR}" >> github.main.properties - echo "password=${{ secrets.GITHUB_TOKEN }}" >> github.main.properties - echo "url=https://maven.pkg.github.com/hyperledger/cacti" >> github.main.properties - - ./scripts/get-cordapps.sh || mv github.main.properties github.properties - - cat github.properties - working-directory: weaver/tests/network-setups/corda - - - name: Start Corda Network - run: | - sed -i "/docker logs corda_partya_1 -f/"' s/^/#/' "scripts/start-nodes.sh" - make start &> corda-net.out & - working-directory: weaver/tests/network-setups/corda - - # FABRIC NETWORK - - name: Start Fabric Network - run: make start-interop CHAINCODE_NAME=simpleassettransfer PROFILE='2-nodes' - working-directory: weaver/tests/network-setups/fabric/dev - - - name: Corda Network logs - run: | - cat tests/network-setups/corda/corda-net.out - docker logs corda_partya_1 - docker logs corda_network2_partya_1 - working-directory: weaver - - # RELAY - - name: Edit Relay docker compose - run: make convert-compose-method2 - working-directory: weaver/core/relay - - - name: Start Relay for network1 - run: make start-server COMPOSE_ARG='--env-file docker/testnet-envs/.env.n1' - working-directory: weaver/core/relay - - - name: Start Relay for network2 - run: make start-server COMPOSE_ARG='--env-file docker/testnet-envs/.env.n2' - working-directory: weaver/core/relay - - - name: Start Relay for Corda_Network - run: make start-server COMPOSE_ARG='--env-file docker/testnet-envs/.env.corda' - working-directory: weaver/core/relay - - - name: Start Relay for Corda_Network2 - run: make start-server COMPOSE_ARG='--env-file docker/testnet-envs/.env.corda2' - working-directory: weaver/core/relay - - # FABRIC DRIVER - - name: Setup Fabric Driver .env - run: | - sed -i "s##${GITHUB_WORKSPACE}/weaver#g" docker-testnet-envs/.env.n1 - sed -i "s##${GITHUB_WORKSPACE}/weaver#g" docker-testnet-envs/.env.n2 - working-directory: weaver/core/drivers/fabric-driver - - - name: Start Fabric Driver for network1 - run: make deploy COMPOSE_ARG='--env-file docker-testnet-envs/.env.n1' NETWORK_NAME=$(grep NETWORK_NAME docker-testnet-envs/.env.n1 | cut -d '=' -f 2) - working-directory: weaver/core/drivers/fabric-driver - - - name: Start Fabric Driver for network2 - run: make deploy COMPOSE_ARG='--env-file docker-testnet-envs/.env.n2' NETWORK_NAME=$(grep NETWORK_NAME docker-testnet-envs/.env.n2 | cut -d '=' -f 2) - working-directory: weaver/core/drivers/fabric-driver - - # IIN AGENT - - name: Setup Fabric IIN Env - run: | - sed -i "s##${GITHUB_WORKSPACE}/weaver#g" docker-testnet/envs/.env.n1.org1 - sed -i "s#^AUTO_SYNC=true#AUTO_SYNC=false#g" docker-testnet/envs/.env.n1.org1 - sed -i "s#^DNS_CONFIG_PATH=.*#DNS_CONFIG_PATH=./docker-testnet/configs/dnsconfig-2-nodes.json#g" docker-testnet/envs/.env.n1.org1 - sed -i "s##${GITHUB_WORKSPACE}/weaver#g" docker-testnet/envs/.env.n1.org2 - sed -i "s#^AUTO_SYNC=true#AUTO_SYNC=false#g" docker-testnet/envs/.env.n1.org2 - sed -i "s#^DNS_CONFIG_PATH=.*#DNS_CONFIG_PATH=./docker-testnet/configs/dnsconfig-2-nodes.json#g" docker-testnet/envs/.env.n1.org2 - sed -i "s##${GITHUB_WORKSPACE}/weaver#g" docker-testnet/envs/.env.n2.org1 - sed -i "s#^AUTO_SYNC=true#AUTO_SYNC=false#g" docker-testnet/envs/.env.n2.org1 - sed -i "s#^DNS_CONFIG_PATH=.*#DNS_CONFIG_PATH=./docker-testnet/configs/dnsconfig-2-nodes.json#g" docker-testnet/envs/.env.n2.org1 - sed -i "s##${GITHUB_WORKSPACE}/weaver#g" docker-testnet/envs/.env.n2.org2 - sed -i "s#^AUTO_SYNC=true#AUTO_SYNC=false#g" docker-testnet/envs/.env.n2.org2 - sed -i "s#^DNS_CONFIG_PATH=.*#DNS_CONFIG_PATH=./docker-testnet/configs/dnsconfig-2-nodes.json#g" docker-testnet/envs/.env.n2.org2 - working-directory: weaver/core/identity-management/iin-agent - - - name: Start Fabric IIN Agent for network1 - run: | - make deploy COMPOSE_ARG='--env-file docker-testnet/envs/.env.n1.org1' DLT_SPECIFIC_DIR=$(grep DLT_SPECIFIC_DIR docker-testnet/envs/.env.n1.org1 | cut -d '=' -f 2) - make deploy COMPOSE_ARG='--env-file docker-testnet/envs/.env.n1.org2' DLT_SPECIFIC_DIR=$(grep DLT_SPECIFIC_DIR docker-testnet/envs/.env.n1.org2 | cut -d '=' -f 2) - working-directory: weaver/core/identity-management/iin-agent - - - name: Start Fabric IIN Agent for network2 - run: | - make deploy COMPOSE_ARG='--env-file docker-testnet/envs/.env.n2.org1' DLT_SPECIFIC_DIR=$(grep DLT_SPECIFIC_DIR docker-testnet/envs/.env.n2.org1 | cut -d '=' -f 2) - make deploy COMPOSE_ARG='--env-file docker-testnet/envs/.env.n2.org2' DLT_SPECIFIC_DIR=$(grep DLT_SPECIFIC_DIR docker-testnet/envs/.env.n2.org2 | cut -d '=' -f 2) - working-directory: weaver/core/identity-management/iin-agent - - # CORDA DRIVER - - name: Start Corda Driver - run: make deploy COMPOSE_ARG='--env-file docker-testnet-envs/.env.corda' - working-directory: weaver/core/drivers/corda-driver - - - name: Start Corda_Network2 Driver - run: make deploy COMPOSE_ARG='--env-file docker-testnet-envs/.env.corda2' - working-directory: weaver/core/drivers/corda-driver - - # FABRIC CLI - - name: Setup Fabric CLI .npmrc - run: | - cp .npmrc.template .npmrc - sed -i "s//${{ secrets.GITHUB_TOKEN }}/g" .npmrc - cat .npmrc - working-directory: weaver/samples/fabric/fabric-cli - - name: Build Fabric CLI - run: | - npm install --global yarn - make build - working-directory: weaver/samples/fabric/fabric-cli - - # FABRIC CLI - - name: Setup Fabric CLI ENV - run: | - echo ${GITHUB_WORKSPACE} - cp .env.template .env - ./bin/fabric-cli env set-file ./.env - ./bin/fabric-cli env set MEMBER_CREDENTIAL_FOLDER ${GITHUB_WORKSPACE}/weaver/samples/fabric/fabric-cli/src/data/credentials_docker - ./bin/fabric-cli env set CONFIG_PATH ${GITHUB_WORKSPACE}/weaver/samples/fabric/fabric-cli/config.json - ./bin/fabric-cli env set DEFAULT_APPLICATION_CHAINCODE simpleassettransfer - ./bin/fabric-cli env set REMOTE_CONFIG_PATH ${GITHUB_WORKSPACE}/weaver/samples/fabric/fabric-cli/remote-network-config.json - ./bin/fabric-cli env set CHAINCODE_PATH ${GITHUB_WORKSPACE}/weaver/samples/fabric/fabric-cli/chaincode.json - cat .env - working-directory: weaver/samples/fabric/fabric-cli - - - name: Setup Fabric CLI Config - run: | - echo ${GITHUB_WORKSPACE} - cp config.template.json config.json - sed -i "s##${GITHUB_WORKSPACE}/weaver#g" config.json - ./bin/fabric-cli config set network2 aclPolicyPrincipalType ca - ./bin/fabric-cli config set network1 chaincode simpleassettransfer - ./bin/fabric-cli config set network2 chaincode simpleassettransfer - cp chaincode.json.template chaincode.json - cp remote-network-config.json.template remote-network-config.json - sed -i "s#localhost:9080#relay-network1:9080#g" remote-network-config.json - sed -i "s#localhost:9081#relay-corda:9081#g" remote-network-config.json - sed -i "s#localhost:9082#relay-corda2:9082#g" remote-network-config.json - sed -i "s#localhost:9083#relay-network2:9083#g" remote-network-config.json - sed -i "s#localhost:10006#corda_partya_1:10003#g" remote-network-config.json - sed -i "s#localhost:30006#corda_network2_partya_1:10003#g" remote-network-config.json - working-directory: weaver/samples/fabric/fabric-cli - - - name: Fabric CLI Init - run: | - ./bin/fabric-cli configure create all --local-network=network1 - ./bin/fabric-cli configure create all --local-network=network2 - ./bin/fabric-cli configure network --local-network=network1 --num-orgs=2 - ./bin/fabric-cli configure network --local-network=network2 --num-orgs=2 - ./scripts/initAssetsForTransfer.sh - working-directory: weaver/samples/fabric/fabric-cli - - - name: Fabric Sync Membership using IIN Agent - run: | - ./bin/fabric-cli configure membership --local-network=network1 --target-network=network2 --iin-agent-endpoint=localhost:9500 - sleep 30 - docker logs iin-agent-Org1MSP-network1 - docker logs iin-agent-Org1MSP-network2 - ./bin/fabric-cli configure membership --local-network=network2 --target-network=network1 --iin-agent-endpoint=localhost:9501 - sleep 30 - docker logs iin-agent-Org1MSP-network1 - docker logs iin-agent-Org1MSP-network2 - working-directory: weaver/samples/fabric/fabric-cli - - # CORDA CLIENT - - name: Corda CLI Setup - run: | - cp remote-network-config.json.template remote-network-config.json - sed -i "s#localhost:9080#relay-network1:9080#g" remote-network-config.json - sed -i "s#localhost:9081#relay-corda:9081#g" remote-network-config.json - sed -i "s#localhost:9082#relay-corda2:9082#g" remote-network-config.json - sed -i "s#localhost:9083#relay-network2:9083#g" remote-network-config.json - sed -i "s#localhost:10006#corda_partya_1:10003#g" remote-network-config.json - sed -i "s#localhost:30006#corda_network2_partya_1:10003#g" remote-network-config.json - working-directory: weaver/samples/corda/corda-simple-application/clients/src/main/resources/config - - - name: Corda CLI Initialize Vault - run: make initialise-vault-asset-transfer-docker - working-directory: weaver/samples/corda/corda-simple-application - - - name: Asset Transfer Corda Client Tests - run: | - COUNT=0 - TOTAL=9 - - # Issue t1:5 tokens to partyA - NETWORK_NAME='Corda_Network' CORDA_PORT=10006 ./clients/build/install/clients/bin/clients issue-asset-state 5 t1 1> tmp.out - cat tmp.out | grep "AssetState(quantity=5, tokenType=t1, owner=O=PartyA" && COUNT=$(( COUNT + 1 )) && echo "PASS" - cat tmp.out - - # CORDA2-CORDA - # Pledge Asset - NETWORK_NAME='Corda_Network' CORDA_PORT=10006 ./clients/build/install/clients/bin/clients transfer pledge-asset --fungible --timeout="3600" --import-network-id='Corda_Network2' --recipient='O=PartyA, L=London, C=GB' --param='t1:5' 1> tmp.out - cat tmp.out | grep "AssetPledgeState created with pledge-id" && COUNT=$(( COUNT + 1 )) && echo "PASS" - cat tmp.out - - PID=$(cat tmp.out | grep "AssetPledgeState created with pledge-id " | awk -F "'" '{print $2}') - - # Is Asset Pledged - CORDA_PORT=10006 ./clients/build/install/clients/bin/clients transfer is-asset-pledged -pid $PID 1> tmp.out - cat tmp.out | grep "Is asset pledged for transfer response: true" && COUNT=$(( COUNT + 1 )) && echo "PASS" - cat tmp.out - - # Claim Remote Asset - NETWORK_NAME='Corda_Network2' CORDA_PORT=30006 ./clients/build/install/clients/bin/clients transfer claim-remote-asset --pledge-id=$PID --locker='O=PartyA, L=London, C=GB' --transfer-category='token.corda' --export-network-id='Corda_Network' --param='t1:5' --import-relay-address='localhost:9082' 1> tmp.out - cat tmp.out | grep "Pledged asset claim response: Right(b=SignedTransaction(id=" && COUNT=$(( COUNT + 1 )) && echo "PASS" - cat tmp.out - - CORDA_PORT=10006 ./clients/build/install/clients/bin/clients get-asset-states-by-type t1 1> tmp.out - cat tmp.out | grep "\[\]" && COUNT=$(( COUNT + 1 )) && echo "PASS" - cat tmp.out - CORDA_PORT=30006 ./clients/build/install/clients/bin/clients get-asset-states-by-type t1 1> tmp.out - cat tmp.out | grep "AssetState(quantity=5, tokenType=t1, owner=O=PartyA, L=London, C=GB, " && COUNT=$(( COUNT + 1 )) && echo "PASS" - cat tmp.out - - # CORDA-CORDA2 - - # Issue and Pledge t2:5 tokens - NETWORK_NAME='Corda_Network' CORDA_PORT=10006 ./clients/build/install/clients/bin/clients issue-asset-state 5 t2 1> tmp.out - NETWORK_NAME='Corda_Network' CORDA_PORT=10006 ./clients/build/install/clients/bin/clients transfer pledge-asset --fungible --timeout="20" --import-network-id='Corda_Network2' --recipient='O=PartyA, L=London, C=GB' --param='t2:5' 1> tmp.out - PID=$(cat tmp.out | grep "AssetPledgeState created with pledge-id " | awk -F "'" '{print $2}') - sleep 20 - - # Is Asset Pledged - CORDA_PORT=10006 ./clients/build/install/clients/bin/clients transfer is-asset-pledged -pid $PID 1> tmp.out - cat tmp.out | grep "Is asset pledged for transfer response: false" && COUNT=$(( COUNT + 1 )) && echo "PASS" - cat tmp.out - - NETWORK_NAME=Corda_Network CORDA_PORT=10006 ./clients/build/install/clients/bin/clients transfer reclaim-pledged-asset --pledge-id=$PID --export-relay-address='localhost:9081' --transfer-category='token.corda' --import-network-id='Corda_Network2' --param='t2:5' 1> tmp.out - cat tmp.out | grep "Pledged Asset Reclaim Response: Right(b=SignedTransaction(id=" && COUNT=$(( COUNT + 1 )) && echo "PASS" - cat tmp.out - - CORDA_PORT=10006 ./clients/build/install/clients/bin/clients get-asset-states-by-type t2 1> tmp.out - cat tmp.out | grep "AssetState(quantity=5, tokenType=t2, owner=O=PartyA, L=London, C=GB, " && COUNT=$(( COUNT + 1 )) && echo "PASS" - cat tmp.out - - # RESULT - echo "Passed $COUNT/$TOTAL Tests." - - if [ $COUNT == $TOTAL ]; then - exit 0 - else - exit 1 - fi - working-directory: weaver/samples/corda/corda-simple-application - - # FABRIC CLI - - name: Asset Transfer Fabric CLI Non-Fungible Tests - run: | - COUNT=0 - TOTAL=8 - - # FABRIC2 - FABRIC1 - ./bin/fabric-cli asset transfer pledge --source-network=network1 --dest-network=network2 --recipient=bob --expiry-secs=3600 --type=bond --ref=a03 --data-file=src/data/assetsForTransfer.json &> tmp.out - tail -n 1 tmp.out | grep "Asset pledged with ID" && COUNT=$(( COUNT + 1 )) && echo "PASS" - cat tmp.out - - CID=$(cat tmp.out | grep "Asset pledged with ID " | sed -e 's/Asset pledged with ID //') - - # FABRIC1 - FABRIC2 - ./bin/fabric-cli asset transfer claim --source-network=network1 --dest-network=network2 --user=bob --owner=alice --type=bond.fabric --pledge-id=$CID --param=bond01:a03 &> tmp.out - tail -n 1 tmp.out | grep "Called Function ClaimRemoteAsset. With Args: $CID" && COUNT=$(( COUNT + 1 )) && echo "PASS" - cat tmp.out - - ./bin/fabric-cli chaincode query --user=alice mychannel simpleassettransfer ReadAsset '["bond01","a03"]' --local-network=network1 &> tmp.out - tail -n 2 tmp.out | grep "Error: the asset a03 does not exist" && COUNT=$(( COUNT + 1 )) && echo "PASS" - cat tmp.out - - ./bin/fabric-cli chaincode query --user=bob mychannel simpleassettransfer ReadAsset '["bond01","a03"]' --local-network=network2 &> tmp.out - #tail -n 1 tmp.out | grep "Result from network query: {\"type\":\"bond01\",\"id\":\"a03\"" && COUNT=$(( COUNT + 1 )) && echo "PASS" - cat tmp.out | tr '\n' ' ' | grep "Result from network query: { \"type\": \"bond01\", \"id\": \"a03\"" && COUNT=$(( COUNT + 1 )) && echo "PASS" - cat tmp.out - - ./bin/fabric-cli asset transfer pledge --source-network=network1 --dest-network=network2 --recipient=bob --expiry-secs=20 --type=bond --ref=a04 --data-file=src/data/assetsForTransfer.json &> tmp.out - cat tmp.out - - CID=$(cat tmp.out | grep "Asset pledged with ID " | sed -e 's/Asset pledged with ID //') - sleep 20 - - ./bin/fabric-cli asset transfer claim --source-network=network1 --dest-network=network2 --user=bob --owner=alice --type=bond.fabric --pledge-id=$CID --param=bond01:a04 &> tmp.out - tail -n 1 tmp.out | grep "cannot claim asset with pledgeId $CID as the expiry time has elapsed" && COUNT=$(( COUNT + 1 )) && echo "PASS" - cat tmp.out - - ./bin/fabric-cli asset transfer reclaim --source-network=network1 --user=alice --type=bond.fabric --pledge-id=$CID --param=bond01:a04 &> tmp.out - tail -n 1 tmp.out | grep "Called Function ReclaimAsset. With Args: $CID" && COUNT=$(( COUNT + 1 )) && echo "PASS" - cat tmp.out - - ./bin/fabric-cli chaincode query --user=alice mychannel simpleassettransfer ReadAsset '["bond01","a04"]' --local-network=network1 &> tmp.out - #tail -n 1 tmp.out | grep "Result from network query: {\"type\":\"bond01\",\"id\":\"a04\"" && COUNT=$(( COUNT + 1 )) && echo "PASS" - cat tmp.out | tr '\n' ' ' | grep "Result from network query: { \"type\": \"bond01\", \"id\": \"a04\"" && COUNT=$(( COUNT + 1 )) && echo "PASS" - cat tmp.out - - ./bin/fabric-cli chaincode query --user=bob mychannel simpleassettransfer ReadAsset '["bond01","a04"]' --local-network=network2 &> tmp.out - tail -n 2 tmp.out | grep "Error: the asset a04 does not exist" && COUNT=$(( COUNT + 1 )) && echo "PASS" - cat tmp.out - - # RESULT - echo "Passed $COUNT/$TOTAL Tests." - - if [ $COUNT == $TOTAL ]; then - exit 0 - else - exit 1 - fi - working-directory: weaver/samples/fabric/fabric-cli - - # FABRIC CLI - - name: Asset Transfer Fabric CLI Fungible Tests - run: | - COUNT=0 - TOTAL=8 - - # FABRIC2 - FABRIC1 - ./bin/fabric-cli asset transfer pledge --source-network=network1 --dest-network=network2 --recipient=bob --expiry-secs=3600 --type=token --units=50 --owner=alice --data-file=src/data/tokensForTransfer.json &> tmp.out - tail -n 1 tmp.out | grep "Asset pledged with ID" && COUNT=$(( COUNT + 1 )) && echo "PASS" - cat tmp.out - - CID=$(cat tmp.out | grep "Asset pledged with ID " | sed -e 's/Asset pledged with ID //') - - # FABRIC1 - FABRIC2 - ./bin/fabric-cli asset transfer claim --source-network=network1 --dest-network=network2 --user=bob --owner=alice --type=token.fabric --pledge-id=$CID --param=token1:50 &> tmp.out - tail -n 1 tmp.out | grep "Called Function ClaimRemoteTokenAsset. With Args: $CID" && COUNT=$(( COUNT + 1 )) && echo "PASS" - cat tmp.out - - ./bin/fabric-cli chaincode query --user=alice mychannel simpleassettransfer GetMyWallet '[]' --local-network=network1 &> tmp.out - tail -n 2 tmp.out | grep "Result from network query: token1=\"9950\"" && COUNT=$(( COUNT + 1 )) && echo "PASS" - cat tmp.out - - ./bin/fabric-cli chaincode query --user=bob mychannel simpleassettransfer GetMyWallet '[]' --local-network=network2 &> tmp.out - tail -n 2 tmp.out | grep "Result from network query: token1=\"50\"" && COUNT=$(( COUNT + 1 )) && echo "PASS" - cat tmp.out - - ./bin/fabric-cli asset transfer pledge --source-network=network1 --dest-network=network2 --recipient=bob --expiry-secs=20 --type=token --units=100 --owner=alice --data-file=src/data/tokensForTransfer.json &> tmp.out - cat tmp.out - - CID=$(cat tmp.out | grep "Asset pledged with ID " | sed -e 's/Asset pledged with ID //') - sleep 20 - - ./bin/fabric-cli asset transfer claim --source-network=network1 --dest-network=network2 --user=bob --owner=alice --type=token.fabric --pledge-id=$CID --param=token1:100 &> tmp.out - tail -n 1 tmp.out | grep "cannot claim asset with pledgeId $CID as the expiry time has elapsed" && COUNT=$(( COUNT + 1 )) && echo "PASS" - cat tmp.out - - ./bin/fabric-cli asset transfer reclaim --source-network=network1 --user=alice --type=token.fabric --pledge-id=$CID --param=token1:100 &> tmp.out - tail -n 1 tmp.out | grep "Called Function ReclaimTokenAsset. With Args: $CID" && COUNT=$(( COUNT + 1 )) && echo "PASS" - cat tmp.out - - ./bin/fabric-cli chaincode query --user=alice mychannel simpleassettransfer GetMyWallet '[]' --local-network=network1 &> tmp.out - tail -n 2 tmp.out | grep "Result from network query: token1=\"9950\"" && COUNT=$(( COUNT + 1 )) && echo "PASS" - cat tmp.out - - ./bin/fabric-cli chaincode query --user=bob mychannel simpleassettransfer GetMyWallet '[]' --local-network=network2 &> tmp.out - tail -n 2 tmp.out | grep "Result from network query: token1=\"50\"" && COUNT=$(( COUNT + 1 )) && echo "PASS" - cat tmp.out - - # RESULT - echo "Passed $COUNT/$TOTAL Tests." - - if [ $COUNT == $TOTAL ]; then - exit 0 - else - exit 1 - fi - working-directory: weaver/samples/fabric/fabric-cli - - - # CORDA - FABRIC - - name: Corda - Fabric Asset Transfer test 1 - Pledge - run: | - COUNT=0 - TOTAL=2 - - # CORDA - FABRIC1 - # Issue and Pledge token1:5 tokens to partyA - NETWORK_NAME='Corda_Network' CORDA_PORT=10006 ./clients/build/install/clients/bin/clients issue-asset-state 5 token1 1> tmp.out - CORDA_PORT=10006 ./clients/build/install/clients/bin/clients transfer pledge-asset --fungible --timeout="3600" --import-network-id='network1' --recipient='alice' --param='token1:5' 1> tmp.out - cat tmp.out | grep "AssetPledgeState created with pledge-id" && COUNT=$(( COUNT + 1 )) && echo "PASS" - cat tmp.out - - PID=$(cat tmp.out | grep "AssetPledgeState created with pledge-id " | awk -F "'" '{print $2}') - - # Is Asset Pledged - CORDA_PORT=10006 ./clients/build/install/clients/bin/clients transfer is-asset-pledged -pid $PID 1> tmp.out - cat tmp.out | grep "Is asset pledged for transfer response: true" && COUNT=$(( COUNT + 1 )) && echo "PASS" - cat tmp.out - - # RESULT - echo "Passed $COUNT/$TOTAL Tests." - - echo "CF_PID=$PID" >> $GITHUB_ENV - - if [ $COUNT == $TOTAL ]; then - exit 0 - else - exit 1 - fi - - working-directory: weaver/samples/corda/corda-simple-application - - - name: Corda - Fabric Asset Transfer test 2 - Claim - run: | - COUNT=0 - TOTAL=3 - - PID=${{ env.CF_PID }} - - # CORDA - FABRIC1 - # Claim in Fabric (pledged in Corda) - ./bin/fabric-cli chaincode query --user=alice mychannel simpleassettransfer GetMyWallet '[]' --local-network=network1 &> tmp.out - tail -n 2 tmp.out | grep "Result from network query: token1=\"9950\"" && COUNT=$(( COUNT + 1 )) && echo "PASS" - cat tmp.out - - ./bin/fabric-cli asset transfer claim --source-network='Corda_Network' --dest-network=network1 --user='alice' --owner='O=PartyA, L=London, C=GB' --type='token.corda' --pledge-id=$PID --param=token1:5 &> tmp.out - tail -n 1 tmp.out | grep "Called Function ClaimRemoteTokenAsset. With Args: $PID" && COUNT=$(( COUNT + 1 )) && echo "PASS" - cat tmp.out - - ./bin/fabric-cli chaincode query --user=alice mychannel simpleassettransfer GetMyWallet '[]' --local-network=network1 &> tmp.out - tail -n 2 tmp.out | grep "Result from network query: token1=\"9955\"" && COUNT=$(( COUNT + 1 )) && echo "PASS" - cat tmp.out - - # RESULT - echo "Passed $COUNT/$TOTAL Tests." - - if [ $COUNT == $TOTAL ]; then - exit 0 - else - exit 1 - fi - - working-directory: weaver/samples/fabric/fabric-cli - - - name: Corda - Fabric Asset Transfer test 3 - Reclaim - run: | - COUNT=0 - TOTAL=3 - - # CORDA - FABRIC1 - # Issue and Pledge token1:10 tokens to partyA - NETWORK_NAME='Corda_Network' CORDA_PORT=10006 ./clients/build/install/clients/bin/clients issue-asset-state 10 token1 1> tmp.out - CORDA_PORT=10006 ./clients/build/install/clients/bin/clients transfer pledge-asset --fungible --timeout="20" --import-network-id='network1' --recipient='alice' --param='token1:10' 1> tmp.out - sleep 20 - - PID=$(cat tmp.out | grep "AssetPledgeState created with pledge-id " | awk -F "'" '{print $2}') - - # Is Asset Pledged - CORDA_PORT=10006 ./clients/build/install/clients/bin/clients transfer is-asset-pledged -pid $PID 1> tmp.out - cat tmp.out | grep "Is asset pledged for transfer response: false" && COUNT=$(( COUNT + 1 )) && echo "PASS" - cat tmp.out - - NETWORK_NAME=Corda_Network CORDA_PORT=10006 ./clients/build/install/clients/bin/clients transfer reclaim-pledged-asset --pledge-id=$PID --export-relay-address='localhost:9081' --transfer-category='token.fabric' --import-network-id='network1' --param='token1:10' 1> tmp.out - cat tmp.out | grep "Pledged Asset Reclaim Response: Right(b=SignedTransaction(id=" && COUNT=$(( COUNT + 1 )) && echo "PASS" - cat tmp.out - - CORDA_PORT=10006 ./clients/build/install/clients/bin/clients get-asset-states-by-type token1 1> tmp.out - cat tmp.out | grep "AssetState(quantity=10, tokenType=token1, owner=O=PartyA, L=London, C=GB, " && COUNT=$(( COUNT + 1 )) && echo "PASS" - cat tmp.out - - # RESULT - echo "Passed $COUNT/$TOTAL Tests." - - if [ $COUNT == $TOTAL ]; then - exit 0 - else - exit 1 - fi - - working-directory: weaver/samples/corda/corda-simple-application - - - name: Fabric - Corda Asset Transfer test 1 - Pledge - run: | - COUNT=0 - TOTAL=1 - - ./bin/fabric-cli asset transfer pledge --source-network='network1' --dest-network='Corda_Network' --recipient='O=PartyA, L=London, C=GB' --expiry-secs=3600 --type='token' --units=50 --owner=alice --data-file=src/data/tokensForTransfer.json &> tmp.out - - PID=$(cat tmp.out | grep "Asset pledged with ID " | sed -e 's/Asset pledged with ID //') - - ./bin/fabric-cli chaincode query --user=alice mychannel simpleassettransfer GetMyWallet '[]' --local-network=network1 &> tmp.out - tail -n 2 tmp.out | grep "Result from network query: token1=\"9905\"" && COUNT=$(( COUNT + 1 )) && echo "PASS" - cat tmp.out - - sleep 30 - - # RESULT - echo "Passed $COUNT/$TOTAL Tests." - - echo "FC_PID=$PID" >> $GITHUB_ENV - - if [ $COUNT == $TOTAL ]; then - exit 0 - else - exit 1 - fi - - working-directory: weaver/samples/fabric/fabric-cli - - - name: Fabric - Corda Asset Transfer test 2 - Claim - run: | - COUNT=0 - TOTAL=2 - - PID=${{ env.FC_PID }} - - # FABRIC - CORDA - # Claim Remote Asset - CORDA_PORT=10006 ./clients/build/install/clients/bin/clients transfer claim-remote-asset --pledge-id=$PID --locker='alice' --transfer-category='token.fabric' --export-network-id='network1' --param='token1:50' --import-relay-address='localhost:9082' 1> tmp.out - cat tmp.out | grep "Pledged asset claim response: Right(b=SignedTransaction(id=" && COUNT=$(( COUNT + 1 )) && echo "PASS" - cat tmp.out - - CORDA_PORT=10006 ./clients/build/install/clients/bin/clients get-asset-states-by-type token1 1> tmp.out - cat tmp.out | grep "AssetState(quantity=50, tokenType=token1, owner=O=PartyA, L=London, C=GB, " && COUNT=$(( COUNT + 1 )) && echo "PASS" - cat tmp.out - - # RESULT - echo "Passed $COUNT/$TOTAL Tests." - - if [ $COUNT == $TOTAL ]; then - exit 0 - else - exit 1 - fi - - working-directory: weaver/samples/corda/corda-simple-application - - - name: Fabric - Corda Asset Transfer test 3 - Reclaim - run: | - COUNT=0 - TOTAL=3 - - ./bin/fabric-cli asset transfer pledge --source-network='network1' --dest-network='Corda_Network' --recipient='O=PartyA, L=London, C=GB' --expiry-secs=30 --type='token' --units=50 --owner=alice --data-file=src/data/tokensForTransfer.json &> tmp.out - PID=$(cat tmp.out | grep "Asset pledged with ID " | sed -e 's/Asset pledged with ID //') - - ./bin/fabric-cli chaincode query --user=alice mychannel simpleassettransfer GetMyWallet '[]' --local-network=network1 &> tmp.out - tail -n 2 tmp.out | grep "Result from network query: token1=\"9855\"" && COUNT=$(( COUNT + 1 )) && echo "PASS" - cat tmp.out - - sleep 30 - - ./bin/fabric-cli asset transfer reclaim --source-network='network1' --user='alice' --type='token.corda' --pledge-id=$PID --param=token1:50 &> tmp.out - tail -n 1 tmp.out | grep "Called Function ReclaimTokenAsset. With Args: $PID" && COUNT=$(( COUNT + 1 )) && echo "PASS" - cat tmp.out - - ./bin/fabric-cli chaincode query --user=alice mychannel simpleassettransfer GetMyWallet '[]' --local-network=network1 &> tmp.out - tail -n 2 tmp.out | grep "Result from network query: token1=\"9905\"" && COUNT=$(( COUNT + 1 )) && echo "PASS" - cat tmp.out - - # RESULT - echo "Passed $COUNT/$TOTAL Tests." - - if [ $COUNT == $TOTAL ]; then - exit 0 - else - exit 1 - fi - - working-directory: weaver/samples/fabric/fabric-cli - - - name: DEBUG Logs - corda partya - if: failure() - run: docker logs corda_partya_1 - - - name: DEBUG Logs - corda network2 partya - if: failure() - run: docker logs corda_network2_partya_1 - - - name: DEBUG Logs - fabric n1 relay - if: failure() - run: docker logs relay-network1 - - - name: DEBUG Logs - fabric n2 relay - if: failure() - run: docker logs relay-network2 - - - name: DEBUG Logs - corda relay - if: failure() - run: docker logs relay-corda - - - name: DEBUG Logs - corda2 relay - if: failure() - run: docker logs relay-corda2 - - - name: DEBUG Logs - fabric n1 driver - if: failure() - run: docker logs driver-fabric-network1 - - - name: DEBUG Logs - fabric n2 driver - if: failure() - run: docker logs driver-fabric-network2 - - - name: DEBUG Logs - corda driver - if: failure() - run: docker logs driver-corda-Corda_Network - - - name: DEBUG Logs - corda2 driver - if: failure() - run: docker logs driver-corda-Corda_Network2 - - asset-transfer-local: - # if: ${{ false }} - # The type of runner that the job will run on - runs-on: ubuntu-latest - - # Steps represent a sequence of tasks that will be executed as part of the job - steps: - # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - - uses: actions/checkout@v3.5.2 - - - name: Set up JDK 8 - uses: actions/setup-java@v3.11.0 - with: - java-version: '8' - distribution: 'adopt' - - - name: Set up Go - uses: actions/setup-go@v4.0.0 - with: - go-version: '1.20.2' - - - name: Use Node.js ${{ env.NODEJS_VERSION }} - uses: actions/setup-node@v3.6.0 - with: - node-version: ${{ env.NODEJS_VERSION }} - - - name: Install RUST Toolchain minimal stable with clippy and rustfmt - uses: actions-rs/toolchain@v1.0.6 - with: - profile: minimal - toolchain: stable - components: rustfmt, clippy - - - name: Get Latest Relay Dependencies - run: | - make protos-local - cargo update -p nom - cargo update -p lexical-core - working-directory: weaver/core/relay - - - name: Use Protoc 3.15 - run: | - curl -LO https://github.com/protocolbuffers/protobuf/releases/download/v3.15.6/protoc-3.15.6-linux-x86_64.zip - unzip protoc-3.15.6-linux-x86_64.zip -d protoc - go install google.golang.org/protobuf/cmd/protoc-gen-go@latest - go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest - - # PROTOS - - name: Build GO Protos - run: | - export PATH="$PATH:${GITHUB_WORKSPACE}/protoc/bin" - make build - working-directory: weaver/common/protos-go - - # PROTOS - - name: Build JS Protos - run: | - export PATH="$PATH:${GITHUB_WORKSPACE}/protoc/bin" - make build - working-directory: weaver/common/protos-js - - - name: Build Java Protos - run: make build - working-directory: weaver/common/protos-java-kt - - # Build Dependencies - - name: Build Corda Interop App - run: make build-local - working-directory: weaver/core/network/corda-interop-app - - - name: Build Corda Interop SDK - run: make build - working-directory: weaver/sdks/corda - - - name: Build Corda SimpleApplication - run: make build-local - working-directory: weaver/samples/corda/corda-simple-application - - - name: Build Fabric Interop SDK - run: make build-local - working-directory: weaver/sdks/fabric/interoperation-node-sdk - - - name: Build Fabric CLI - run: make build-local - working-directory: weaver/samples/fabric/fabric-cli - - - name: Build Relay - run: make - working-directory: weaver/core/relay - - - name: Build Fabric Driver - run: make build-local - working-directory: weaver/core/drivers/fabric-driver - - - name: Build IIN Agent - run: make build-local - working-directory: weaver/core/identity-management/iin-agent - - - name: Build Corda Driver - run: make build-local - working-directory: weaver/core/drivers/corda-driver - - # CORDA NETWORK - - name: Start Corda Network - run: | - sed -i "/docker logs corda_partya_1 -f/"' s/^/#/' "scripts/start-nodes.sh" - make start-local &> corda-net.out & - working-directory: weaver/tests/network-setups/corda - - # FABRIC NETWORK - - - name: Start Fabric Network - run: make start-interop-local CHAINCODE_NAME=simpleassettransfer - working-directory: weaver/tests/network-setups/fabric/dev - - - name: Corda Network logs - run: | - cat tests/network-setups/corda/corda-net.out - docker logs corda_partya_1 - docker logs corda_network2_partya_1 - working-directory: weaver - - # RELAY - - name: Start Relay for network1 - run: RELAY_CONFIG=config/Fabric_Relay.toml cargo run --bin server &> relay-n1.out & - working-directory: weaver/core/relay - - - name: Start Relay for network2 - run: RELAY_CONFIG=config/Fabric_Relay2.toml cargo run --bin server &> relay-n2.out & - working-directory: weaver/core/relay - - - name: Start Relay for Corda_Network - run: RELAY_CONFIG=config/Corda_Relay.toml cargo run --bin server &> relay-corda.out & - working-directory: weaver/core/relay - - - name: Start Relay for Corda_Network2 - run: RELAY_CONFIG=config/Corda_Relay2.toml cargo run --bin server &> relay-corda2.out & - working-directory: weaver/core/relay - - # FABRIC DRIVER - - name: Setup Fabric Driver .env - run: | - cp .env.template .env - CCP_PATH=${GITHUB_WORKSPACE}/weaver/tests/network-setups/fabric/shared/network1/peerOrganizations/org1.network1.com/connection-org1.json - sed -i "s#path_to_connection_profile#${CCP_PATH}#g" .env - working-directory: weaver/core/drivers/fabric-driver - - - name: Start Fabric Driver for network1 - run: npm run dev &> fdriver-n1.out & - working-directory: weaver/core/drivers/fabric-driver - - - name: Start Fabric Driver for network2 - run: CONNECTION_PROFILE=${GITHUB_WORKSPACE}/weaver/tests/network-setups/fabric/shared/network2/peerOrganizations/org1.network2.com/connection-org1.json NETWORK_NAME=network2 RELAY_ENDPOINT=localhost:9083 DRIVER_ENDPOINT=localhost:9095 npm run dev &> fdriver-n2.out & - working-directory: weaver/core/drivers/fabric-driver - - # IIN AGENT - - name: Setup Fabric IIN Config - run: | - # FABRIC CONFIG - cp src/fabric-ledger/config.json.template src/fabric-ledger/config-n1.json - CCP_PATH=${GITHUB_WORKSPACE}/weaver/tests/network-setups/fabric/shared/network1/peerOrganizations/org1.network1.com/connection-org1.json - sed -i "s##${CCP_PATH}#g" src/fabric-ledger/config-n1.json - cat src/fabric-ledger/config-n1.json - cp src/fabric-ledger/config.json.template src/fabric-ledger/config-n2.json - CCP_PATH=${GITHUB_WORKSPACE}/weaver/tests/network-setups/fabric/shared/network2/peerOrganizations/org1.network2.com/connection-org1.json - sed -i "s##${CCP_PATH}#g" src/fabric-ledger/config-n2.json - cat src/fabric-ledger/config-n2.json - # DNS CONFIG - sed -i "s#iin-agent-Org1MSP-network1#localhost#g" docker-testnet/configs/dnsconfig.json - sed -i "s#iin-agent-Org1MSP-network2#localhost#g" docker-testnet/configs/dnsconfig.json - cat docker-testnet/configs/dnsconfig.json - working-directory: weaver/core/identity-management/iin-agent - - - name: Setup Fabric IIN Env - run: | - cp .env.template .env - sed -i "s##Org1MSP#g" .env - sed -i "s#^DLT_TYPE=.*#DLT_TYPE=fabric#g" .env - sed -i "s##interop#g" .env - sed -i "s#^DNS_CONFIG_PATH=#DNS_CONFIG_PATH=./docker-testnet/configs/dnsconfig.json#g" .env - sed -i "s#^SECURITY_DOMAIN_CONFIG_PATH=#SECURITY_DOMAIN_CONFIG_PATH=./docker-testnet/configs/security-domain-config.json#g" .env - sed -i "s#^CONFIG_PATH=#CONFIG_PATH=./src/fabric-ledger/config-n1.json#g" .env - sed -i "s#^AUTO_SYNC=#AUTO_SYNC=false#g" .env - cat .env - working-directory: weaver/core/identity-management/iin-agent - - - name: Start Fabric IIN Agent for network1 - run: npm run dev &> iinagent-n1.out & - working-directory: weaver/core/identity-management/iin-agent - - - name: Start Fabric IIN Agent for network2 - run: IIN_AGENT_ENDPOINT=localhost:9501 SECURITY_DOMAIN=network2 CONFIG_PATH=./src/fabric-ledger/config-n2.json npm run dev &> iinagent-n2.out & - working-directory: weaver/core/identity-management/iin-agent - - # CORDA DRIVER - - name: Start Corda_Network Driver - run: ./build/install/driver-corda/bin/driver-corda &> corda-driver.out & - working-directory: weaver/core/drivers/corda-driver - - - name: Start Corda_Network2 Driver - run: DRIVER_PORT=9098 ./build/install/driver-corda/bin/driver-corda &> corda2-driver.out & - working-directory: weaver/core/drivers/corda-driver - - # FABRIC CLI - - name: Setup Fabric CLI ENV - run: | - echo ${GITHUB_WORKSPACE} - cp .env.template .env - ./bin/fabric-cli env set-file ./.env - ./bin/fabric-cli env set MEMBER_CREDENTIAL_FOLDER ${GITHUB_WORKSPACE}/weaver/samples/fabric/fabric-cli/src/data/credentials - ./bin/fabric-cli env set CONFIG_PATH ${GITHUB_WORKSPACE}/weaver/samples/fabric/fabric-cli/config.json - ./bin/fabric-cli env set DEFAULT_APPLICATION_CHAINCODE simpleassettransfer - ./bin/fabric-cli env set REMOTE_CONFIG_PATH ${GITHUB_WORKSPACE}/weaver/samples/fabric/fabric-cli/remote-network-config.json - ./bin/fabric-cli env set CHAINCODE_PATH ${GITHUB_WORKSPACE}/weaver/samples/fabric/fabric-cli/chaincode.json - cat .env - working-directory: weaver/samples/fabric/fabric-cli - - - name: Setup Fabric CLI Config - run: | - echo ${GITHUB_WORKSPACE} - cp config.template.json config.json - sed -i "s##${GITHUB_WORKSPACE}/weaver#g" config.json - ###### Change line number in following commands if config is modified ##### - ./bin/fabric-cli config set network2 aclPolicyPrincipalType ca - ./bin/fabric-cli config set network1 chaincode simpleassettransfer - ./bin/fabric-cli config set network2 chaincode simpleassettransfer - cp chaincode.json.template chaincode.json - cp remote-network-config.json.template remote-network-config.json - working-directory: weaver/samples/fabric/fabric-cli - - - - name: Fabric CLI Init - run: | - ./bin/fabric-cli configure create all --local-network=network1 - ./bin/fabric-cli configure create all --local-network=network2 - ./bin/fabric-cli configure network --local-network=network1 - ./bin/fabric-cli configure network --local-network=network2 - ./scripts/initAssetsForTransfer.sh - working-directory: weaver/samples/fabric/fabric-cli - - - name: Fabric Sync Membership using IIN Agent - run: | - ./bin/fabric-cli configure membership --local-network=network1 --target-network=network2 --iin-agent-endpoint=localhost:9500 - sleep 10 - tail -10 ../../../core/identity-management/iin-agent/iinagent-n1.out - ./bin/fabric-cli configure membership --local-network=network2 --target-network=network1 --iin-agent-endpoint=localhost:9501 - sleep 10 - tail -10 ../../../core/identity-management/iin-agent/iinagent-n2.out - working-directory: weaver/samples/fabric/fabric-cli - - # CORDA CLIENT - - name: Corda CLI Setup - run: | - cp remote-network-config.json.template remote-network-config.json - working-directory: weaver/samples/corda/corda-simple-application/clients/src/main/resources/config - - - name: Corda CLI Initialize Vault - run: make initialise-vault-asset-transfer - working-directory: weaver/samples/corda/corda-simple-application - - - name: Asset Transfer Corda Client Tests - run: | - COUNT=0 - TOTAL=9 - - # Issue t1:5 tokens to partyA - NETWORK_NAME='Corda_Network' CORDA_PORT=10006 ./clients/build/install/clients/bin/clients issue-asset-state 5 t1 1> tmp.out - cat tmp.out | grep "AssetState(quantity=5, tokenType=t1, owner=O=PartyA" && COUNT=$(( COUNT + 1 )) && echo "PASS" - cat tmp.out - - # CORDA2-CORDA - # Pledge Asset - NETWORK_NAME='Corda_Network' CORDA_PORT=10006 ./clients/build/install/clients/bin/clients transfer pledge-asset --fungible --timeout="3600" --import-network-id='Corda_Network2' --recipient='O=PartyA, L=London, C=GB' --param='t1:5' 1> tmp.out - cat tmp.out | grep "AssetPledgeState created with pledge-id" && COUNT=$(( COUNT + 1 )) && echo "PASS" - cat tmp.out - - PID=$(cat tmp.out | grep "AssetPledgeState created with pledge-id " | awk -F "'" '{print $2}') - - # Is Asset Pledged - CORDA_PORT=10006 ./clients/build/install/clients/bin/clients transfer is-asset-pledged -pid $PID 1> tmp.out - cat tmp.out | grep "Is asset pledged for transfer response: true" && COUNT=$(( COUNT + 1 )) && echo "PASS" - cat tmp.out - - # Claim Remote Asset - NETWORK_NAME='Corda_Network2' CORDA_PORT=30006 ./clients/build/install/clients/bin/clients transfer claim-remote-asset --pledge-id=$PID --locker='O=PartyA, L=London, C=GB' --transfer-category='token.corda' --export-network-id='Corda_Network' --param='t1:5' --import-relay-address='localhost:9082' 1> tmp.out - cat tmp.out | grep "Pledged asset claim response: Right(b=SignedTransaction(id=" && COUNT=$(( COUNT + 1 )) && echo "PASS" - cat tmp.out - - CORDA_PORT=10006 ./clients/build/install/clients/bin/clients get-asset-states-by-type t1 1> tmp.out - cat tmp.out | grep "\[\]" && COUNT=$(( COUNT + 1 )) && echo "PASS" - cat tmp.out - CORDA_PORT=30006 ./clients/build/install/clients/bin/clients get-asset-states-by-type t1 1> tmp.out - cat tmp.out | grep "AssetState(quantity=5, tokenType=t1, owner=O=PartyA, L=London, C=GB, " && COUNT=$(( COUNT + 1 )) && echo "PASS" - cat tmp.out - - # CORDA-CORDA2 - - # Issue and Pledge t2:5 tokens - NETWORK_NAME='Corda_Network' CORDA_PORT=10006 ./clients/build/install/clients/bin/clients issue-asset-state 5 t2 1> tmp.out - NETWORK_NAME='Corda_Network' CORDA_PORT=10006 ./clients/build/install/clients/bin/clients transfer pledge-asset --fungible --timeout="20" --import-network-id='Corda_Network2' --recipient='O=PartyA, L=London, C=GB' --param='t2:5' 1> tmp.out - PID=$(cat tmp.out | grep "AssetPledgeState created with pledge-id " | awk -F "'" '{print $2}') - sleep 20 - - # Is Asset Pledged - CORDA_PORT=10006 ./clients/build/install/clients/bin/clients transfer is-asset-pledged -pid $PID 1> tmp.out - cat tmp.out | grep "Is asset pledged for transfer response: false" && COUNT=$(( COUNT + 1 )) && echo "PASS" - cat tmp.out - - NETWORK_NAME=Corda_Network CORDA_PORT=10006 ./clients/build/install/clients/bin/clients transfer reclaim-pledged-asset --pledge-id=$PID --export-relay-address='localhost:9081' --transfer-category='token.corda' --import-network-id='Corda_Network2' --param='t2:5' 1> tmp.out - cat tmp.out | grep "Pledged Asset Reclaim Response: Right(b=SignedTransaction(id=" && COUNT=$(( COUNT + 1 )) && echo "PASS" - cat tmp.out - - CORDA_PORT=10006 ./clients/build/install/clients/bin/clients get-asset-states-by-type t2 1> tmp.out - cat tmp.out | grep "AssetState(quantity=5, tokenType=t2, owner=O=PartyA, L=London, C=GB, " && COUNT=$(( COUNT + 1 )) && echo "PASS" - cat tmp.out - - # RESULT - echo "Passed $COUNT/$TOTAL Tests." - - if [ $COUNT == $TOTAL ]; then - exit 0 - else - exit 1 - fi - working-directory: weaver/samples/corda/corda-simple-application - - # FABRIC CLI - - name: Asset Transfer Fabric CLI Non-Fungible Tests - run: | - COUNT=0 - TOTAL=8 - - # FABRIC2 - FABRIC1 - ./bin/fabric-cli asset transfer pledge --source-network=network1 --dest-network=network2 --recipient=bob --expiry-secs=3600 --type=bond --ref=a03 --data-file=src/data/assetsForTransfer.json &> tmp.out - tail -n 1 tmp.out | grep "Asset pledged with ID" && COUNT=$(( COUNT + 1 )) && echo "PASS" - cat tmp.out - - CID=$(cat tmp.out | grep "Asset pledged with ID " | sed -e 's/Asset pledged with ID //') - - # FABRIC1 - FABRIC2 - ./bin/fabric-cli asset transfer claim --source-network=network1 --dest-network=network2 --user=bob --owner=alice --type=bond.fabric --pledge-id=$CID --param=bond01:a03 &> tmp.out - tail -n 1 tmp.out | grep "Called Function ClaimRemoteAsset. With Args: $CID" && COUNT=$(( COUNT + 1 )) && echo "PASS" - cat tmp.out - - ./bin/fabric-cli chaincode query --user=alice mychannel simpleassettransfer ReadAsset '["bond01","a03"]' --local-network=network1 &> tmp.out - tail -n 2 tmp.out | grep "Error: the asset a03 does not exist" && COUNT=$(( COUNT + 1 )) && echo "PASS" - cat tmp.out - - ./bin/fabric-cli chaincode query --user=bob mychannel simpleassettransfer ReadAsset '["bond01","a03"]' --local-network=network2 &> tmp.out - #tail -n 1 tmp.out | grep "Result from network query: {\"type\":\"bond01\",\"id\":\"a03\"" && COUNT=$(( COUNT + 1 )) && echo "PASS" - cat tmp.out | tr '\n' ' ' | grep "Result from network query: { \"type\": \"bond01\", \"id\": \"a03\"" && COUNT=$(( COUNT + 1 )) && echo "PASS" - cat tmp.out - - ./bin/fabric-cli asset transfer pledge --source-network=network1 --dest-network=network2 --recipient=bob --expiry-secs=20 --type=bond --ref=a04 --data-file=src/data/assetsForTransfer.json &> tmp.out - cat tmp.out - - CID=$(cat tmp.out | grep "Asset pledged with ID " | sed -e 's/Asset pledged with ID //') - sleep 20 - - ./bin/fabric-cli asset transfer claim --source-network=network1 --dest-network=network2 --user=bob --owner=alice --type=bond.fabric --pledge-id=$CID --param=bond01:a04 &> tmp.out - tail -n 1 tmp.out | grep "cannot claim asset with pledgeId $CID as the expiry time has elapsed" && COUNT=$(( COUNT + 1 )) && echo "PASS" - cat tmp.out - - ./bin/fabric-cli asset transfer reclaim --source-network=network1 --user=alice --type=bond.fabric --pledge-id=$CID --param=bond01:a04 &> tmp.out - tail -n 1 tmp.out | grep "Called Function ReclaimAsset. With Args: $CID" && COUNT=$(( COUNT + 1 )) && echo "PASS" - cat tmp.out - - ./bin/fabric-cli chaincode query --user=alice mychannel simpleassettransfer ReadAsset '["bond01","a04"]' --local-network=network1 &> tmp.out - #tail -n 1 tmp.out | grep "Result from network query: {\"type\":\"bond01\",\"id\":\"a04\"" && COUNT=$(( COUNT + 1 )) && echo "PASS" - cat tmp.out | tr '\n' ' ' | grep "Result from network query: { \"type\": \"bond01\", \"id\": \"a04\"" && COUNT=$(( COUNT + 1 )) && echo "PASS" - cat tmp.out - - ./bin/fabric-cli chaincode query --user=bob mychannel simpleassettransfer ReadAsset '["bond01","a04"]' --local-network=network2 &> tmp.out - tail -n 2 tmp.out | grep "Error: the asset a04 does not exist" && COUNT=$(( COUNT + 1 )) && echo "PASS" - cat tmp.out - - # RESULT - echo "Passed $COUNT/$TOTAL Tests." - - if [ $COUNT == $TOTAL ]; then - exit 0 - else - exit 1 - fi - working-directory: weaver/samples/fabric/fabric-cli - - # FABRIC CLI - - name: Asset Transfer Fabric CLI Fungible Tests - run: | - COUNT=0 - TOTAL=8 - - # FABRIC2 - FABRIC1 - ./bin/fabric-cli asset transfer pledge --source-network=network1 --dest-network=network2 --recipient=bob --expiry-secs=3600 --type=token --units=50 --owner=alice --data-file=src/data/tokensForTransfer.json &> tmp.out - tail -n 1 tmp.out | grep "Asset pledged with ID" && COUNT=$(( COUNT + 1 )) && echo "PASS" - cat tmp.out - - CID=$(cat tmp.out | grep "Asset pledged with ID " | sed -e 's/Asset pledged with ID //') - - # FABRIC1 - FABRIC2 - ./bin/fabric-cli asset transfer claim --source-network=network1 --dest-network=network2 --user=bob --owner=alice --type=token.fabric --pledge-id=$CID --param=token1:50 &> tmp.out - tail -n 1 tmp.out | grep "Called Function ClaimRemoteTokenAsset. With Args: $CID" && COUNT=$(( COUNT + 1 )) && echo "PASS" - cat tmp.out - - ./bin/fabric-cli chaincode query --user=alice mychannel simpleassettransfer GetMyWallet '[]' --local-network=network1 &> tmp.out - tail -n 2 tmp.out | grep "Result from network query: token1=\"9950\"" && COUNT=$(( COUNT + 1 )) && echo "PASS" - cat tmp.out - - ./bin/fabric-cli chaincode query --user=bob mychannel simpleassettransfer GetMyWallet '[]' --local-network=network2 &> tmp.out - tail -n 2 tmp.out | grep "Result from network query: token1=\"50\"" && COUNT=$(( COUNT + 1 )) && echo "PASS" - cat tmp.out - - ./bin/fabric-cli asset transfer pledge --source-network=network1 --dest-network=network2 --recipient=bob --expiry-secs=20 --type=token --units=100 --owner=alice --data-file=src/data/tokensForTransfer.json &> tmp.out - cat tmp.out - - CID=$(cat tmp.out | grep "Asset pledged with ID " | sed -e 's/Asset pledged with ID //') - sleep 20 - - ./bin/fabric-cli asset transfer claim --source-network=network1 --dest-network=network2 --user=bob --owner=alice --type=token.fabric --pledge-id=$CID --param=token1:100 &> tmp.out - tail -n 1 tmp.out | grep "cannot claim asset with pledgeId $CID as the expiry time has elapsed" && COUNT=$(( COUNT + 1 )) && echo "PASS" - cat tmp.out - - ./bin/fabric-cli asset transfer reclaim --source-network=network1 --user=alice --type=token.fabric --pledge-id=$CID --param=token1:100 &> tmp.out - tail -n 1 tmp.out | grep "Called Function ReclaimTokenAsset. With Args: $CID" && COUNT=$(( COUNT + 1 )) && echo "PASS" - cat tmp.out - - ./bin/fabric-cli chaincode query --user=alice mychannel simpleassettransfer GetMyWallet '[]' --local-network=network1 &> tmp.out - tail -n 2 tmp.out | grep "Result from network query: token1=\"9950\"" && COUNT=$(( COUNT + 1 )) && echo "PASS" - cat tmp.out - - ./bin/fabric-cli chaincode query --user=bob mychannel simpleassettransfer GetMyWallet '[]' --local-network=network2 &> tmp.out - tail -n 2 tmp.out | grep "Result from network query: token1=\"50\"" && COUNT=$(( COUNT + 1 )) && echo "PASS" - cat tmp.out - - # RESULT - echo "Passed $COUNT/$TOTAL Tests." - - if [ $COUNT == $TOTAL ]; then - exit 0 - else - exit 1 - fi - working-directory: weaver/samples/fabric/fabric-cli - - - # CORDA - FABRIC - - name: Corda - Fabric Asset Transfer test 1 - Pledge - run: | - COUNT=0 - TOTAL=2 - - # CORDA - FABRIC1 - # Issue and Pledge token1:5 tokens to partyA - NETWORK_NAME='Corda_Network' CORDA_PORT=10006 ./clients/build/install/clients/bin/clients issue-asset-state 5 token1 1> tmp.out - CORDA_PORT=10006 ./clients/build/install/clients/bin/clients transfer pledge-asset --fungible --timeout="3600" --import-network-id='network1' --recipient='alice' --param='token1:5' 1> tmp.out - cat tmp.out | grep "AssetPledgeState created with pledge-id" && COUNT=$(( COUNT + 1 )) && echo "PASS" - cat tmp.out - - PID=$(cat tmp.out | grep "AssetPledgeState created with pledge-id " | awk -F "'" '{print $2}') - - # Is Asset Pledged - CORDA_PORT=10006 ./clients/build/install/clients/bin/clients transfer is-asset-pledged -pid $PID 1> tmp.out - cat tmp.out | grep "Is asset pledged for transfer response: true" && COUNT=$(( COUNT + 1 )) && echo "PASS" - cat tmp.out - - # RESULT - echo "Passed $COUNT/$TOTAL Tests." - - echo "CF_PID=$PID" >> $GITHUB_ENV - - if [ $COUNT == $TOTAL ]; then - exit 0 - else - exit 1 - fi - - working-directory: weaver/samples/corda/corda-simple-application - - - name: Corda - Fabric Asset Transfer test 2 - Claim - run: | - COUNT=0 - TOTAL=3 - - PID=${{ env.CF_PID }} - - # CORDA - FABRIC1 - # Claim in Fabric (pledged in Corda) - ./bin/fabric-cli chaincode query --user=alice mychannel simpleassettransfer GetMyWallet '[]' --local-network=network1 &> tmp.out - tail -n 2 tmp.out | grep "Result from network query: token1=\"9950\"" && COUNT=$(( COUNT + 1 )) && echo "PASS" - cat tmp.out - - ./bin/fabric-cli asset transfer claim --source-network='Corda_Network' --dest-network=network1 --user='alice' --owner='O=PartyA, L=London, C=GB' --type='token.corda' --pledge-id=$PID --param=token1:5 &> tmp.out - tail -n 1 tmp.out | grep "Called Function ClaimRemoteTokenAsset. With Args: $PID" && COUNT=$(( COUNT + 1 )) && echo "PASS" - cat tmp.out - - ./bin/fabric-cli chaincode query --user=alice mychannel simpleassettransfer GetMyWallet '[]' --local-network=network1 &> tmp.out - tail -n 2 tmp.out | grep "Result from network query: token1=\"9955\"" && COUNT=$(( COUNT + 1 )) && echo "PASS" - cat tmp.out - - # RESULT - echo "Passed $COUNT/$TOTAL Tests." - - if [ $COUNT == $TOTAL ]; then - exit 0 - else - exit 1 - fi - - working-directory: weaver/samples/fabric/fabric-cli - - - name: Corda - Fabric Asset Transfer test 3 - Reclaim - run: | - COUNT=0 - TOTAL=3 - - # CORDA - FABRIC1 - # Issue and Pledge token1:10 tokens to partyA - NETWORK_NAME='Corda_Network' CORDA_PORT=10006 ./clients/build/install/clients/bin/clients issue-asset-state 10 token1 1> tmp.out - CORDA_PORT=10006 ./clients/build/install/clients/bin/clients transfer pledge-asset --fungible --timeout="20" --import-network-id='network1' --recipient='alice' --param='token1:10' 1> tmp.out - sleep 20 - - PID=$(cat tmp.out | grep "AssetPledgeState created with pledge-id " | awk -F "'" '{print $2}') - - # Is Asset Pledged - CORDA_PORT=10006 ./clients/build/install/clients/bin/clients transfer is-asset-pledged -pid $PID 1> tmp.out - cat tmp.out | grep "Is asset pledged for transfer response: false" && COUNT=$(( COUNT + 1 )) && echo "PASS" - cat tmp.out - - NETWORK_NAME=Corda_Network CORDA_PORT=10006 ./clients/build/install/clients/bin/clients transfer reclaim-pledged-asset --pledge-id=$PID --export-relay-address='localhost:9081' --transfer-category='token.fabric' --import-network-id='network1' --param='token1:10' 1> tmp.out - cat tmp.out | grep "Pledged Asset Reclaim Response: Right(b=SignedTransaction(id=" && COUNT=$(( COUNT + 1 )) && echo "PASS" - cat tmp.out - - CORDA_PORT=10006 ./clients/build/install/clients/bin/clients get-asset-states-by-type token1 1> tmp.out - cat tmp.out | grep "AssetState(quantity=10, tokenType=token1, owner=O=PartyA, L=London, C=GB, " && COUNT=$(( COUNT + 1 )) && echo "PASS" - cat tmp.out - - # RESULT - echo "Passed $COUNT/$TOTAL Tests." - - if [ $COUNT == $TOTAL ]; then - exit 0 - else - exit 1 - fi - - working-directory: weaver/samples/corda/corda-simple-application - - - name: Fabric - Corda Asset Transfer test 1 - Pledge - run: | - COUNT=0 - TOTAL=1 - - ./bin/fabric-cli asset transfer pledge --source-network='network1' --dest-network='Corda_Network' --recipient='O=PartyA, L=London, C=GB' --expiry-secs=3600 --type='token' --units=50 --owner=alice --data-file=src/data/tokensForTransfer.json &> tmp.out - - PID=$(cat tmp.out | grep "Asset pledged with ID " | sed -e 's/Asset pledged with ID //') - - ./bin/fabric-cli chaincode query --user=alice mychannel simpleassettransfer GetMyWallet '[]' --local-network=network1 &> tmp.out - tail -n 2 tmp.out | grep "Result from network query: token1=\"9905\"" && COUNT=$(( COUNT + 1 )) && echo "PASS" - cat tmp.out - - sleep 30 - - # RESULT - echo "Passed $COUNT/$TOTAL Tests." - - echo "FC_PID=$PID" >> $GITHUB_ENV - - if [ $COUNT == $TOTAL ]; then - exit 0 - else - exit 1 - fi - - working-directory: weaver/samples/fabric/fabric-cli - - - name: Fabric - Corda Asset Transfer test 2 - Claim - run: | - COUNT=0 - TOTAL=2 - - PID=${{ env.FC_PID }} - - # FABRIC - CORDA - # Claim Remote Asset - CORDA_PORT=10006 ./clients/build/install/clients/bin/clients transfer claim-remote-asset --pledge-id=$PID --locker='alice' --transfer-category='token.fabric' --export-network-id='network1' --param='token1:50' --import-relay-address='localhost:9082' 1> tmp.out - cat tmp.out | grep "Pledged asset claim response: Right(b=SignedTransaction(id=" && COUNT=$(( COUNT + 1 )) && echo "PASS" - cat tmp.out - - CORDA_PORT=10006 ./clients/build/install/clients/bin/clients get-asset-states-by-type token1 1> tmp.out - cat tmp.out | grep "AssetState(quantity=50, tokenType=token1, owner=O=PartyA, L=London, C=GB, " && COUNT=$(( COUNT + 1 )) && echo "PASS" - cat tmp.out - - # RESULT - echo "Passed $COUNT/$TOTAL Tests." - - if [ $COUNT == $TOTAL ]; then - exit 0 - else - exit 1 - fi - - working-directory: weaver/samples/corda/corda-simple-application - - - name: Fabric - Corda Asset Transfer test 3 - Reclaim - run: | - COUNT=0 - TOTAL=3 - - ./bin/fabric-cli asset transfer pledge --source-network='network1' --dest-network='Corda_Network' --recipient='O=PartyA, L=London, C=GB' --expiry-secs=30 --type='token' --units=50 --owner=alice --data-file=src/data/tokensForTransfer.json &> tmp.out - PID=$(cat tmp.out | grep "Asset pledged with ID " | sed -e 's/Asset pledged with ID //') - - ./bin/fabric-cli chaincode query --user=alice mychannel simpleassettransfer GetMyWallet '[]' --local-network=network1 &> tmp.out - tail -n 2 tmp.out | grep "Result from network query: token1=\"9855\"" && COUNT=$(( COUNT + 1 )) && echo "PASS" - cat tmp.out - - sleep 30 - - ./bin/fabric-cli asset transfer reclaim --source-network='network1' --user='alice' --type='token.corda' --pledge-id=$PID --param=token1:50 &> tmp.out - tail -n 1 tmp.out | grep "Called Function ReclaimTokenAsset. With Args: $PID" && COUNT=$(( COUNT + 1 )) && echo "PASS" - cat tmp.out - - ./bin/fabric-cli chaincode query --user=alice mychannel simpleassettransfer GetMyWallet '[]' --local-network=network1 &> tmp.out - tail -n 2 tmp.out | grep "Result from network query: token1=\"9905\"" && COUNT=$(( COUNT + 1 )) && echo "PASS" - cat tmp.out - - # RESULT - echo "Passed $COUNT/$TOTAL Tests." - - if [ $COUNT == $TOTAL ]; then - exit 0 - else - exit 1 - fi - - working-directory: weaver/samples/fabric/fabric-cli - - - name: DEBUG Logs - corda partya - if: failure() - run: docker logs corda_partya_1 - - - name: DEBUG Logs - corda network2 partya - if: failure() - run: docker logs corda_network2_partya_1 - - - name: DEBUG Logs - fabric n1 relay - if: failure() - run: cat weaver/core/relay/relay-n1.out - - - name: DEBUG Logs - fabric n2 relay - if: failure() - run: cat weaver/core/relay/relay-n2.out - - - name: DEBUG Logs - corda relay - if: failure() - run: cat weaver/core/relay/relay-corda.out - - - name: DEBUG Logs - corda2 relay - if: failure() - run: cat weaver/core/relay/relay-corda2.out - - - name: DEBUG Logs - fabric n1 driver - if: failure() - run: cat weaver/core/drivers/fabric-driver/fdriver-n1.out - - - name: DEBUG Logs - fabric n2 driver - if: failure() - run: cat weaver/core/drivers/fabric-driver/fdriver-n2.out - - - name: DEBUG Logs - corda driver - if: failure() - run: cat weaver/core/drivers/corda-driver/corda-driver.out - - - name: DEBUG Logs - corda2 driver - if: failure() - run: cat weaver/core/drivers/corda-driver/corda2-driver.out \ No newline at end of file diff --git a/.github/workflows/test_weaver-corda-interop-app.yaml b/.github/workflows/test_weaver-corda-interop-app.yaml deleted file mode 100644 index c4f90066d9..0000000000 --- a/.github/workflows/test_weaver-corda-interop-app.yaml +++ /dev/null @@ -1,50 +0,0 @@ -# Copyright IBM Corp. All Rights Reserved. -# -# SPDX-License-Identifier: CC-BY-4.0 - -# This workflow will build a Java project with Gradle -# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle - -name: Unit Test Corda Interop App - -on: - push: - branches: [ main ] - paths: - - '.github/workflows/test_weaver-**' - - 'weaver/common/protos-java-kt/**' - - 'weaver/core/network/corda-interop-app/**' - pull_request: - branches: [ main ] - paths: - - '.github/workflows/test_weaver-**' - - 'weaver/common/protos-java-kt/**' - - 'weaver/core/network/corda-interop-app/**' - -concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} - cancel-in-progress: true - -jobs: - unit_test_interop_cordapp: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3.5.2 - - - name: Set up JDK 8 - uses: actions/setup-java@v3.11.0 - with: - java-version: '8' - distribution: 'adopt' - - - name: Build Protos (Local) - run: make build - working-directory: weaver/common/protos-java-kt - - - name: Build Corda Interop App (Local) - run: make build-local - working-directory: weaver/core/network/corda-interop-app - - - name: Run Tests (Local) - run: make test - working-directory: weaver/core/network/corda-interop-app diff --git a/.github/workflows/test_weaver-data-sharing.yaml b/.github/workflows/test_weaver-data-sharing.yaml deleted file mode 100644 index ae99098277..0000000000 --- a/.github/workflows/test_weaver-data-sharing.yaml +++ /dev/null @@ -1,1210 +0,0 @@ -# Copyright IBM Corp. All Rights Reserved. -# -# SPDX-License-Identifier: CC-BY-4.0 - -# This is a basic workflow to help you get started with Actions - -name: Test Data Sharing - -env: - NODEJS_VERSION: v18.18.2 - -# Controls when the workflow will run -on: - # Triggers the workflow on push or pull request events but only for the main branch - push: - branches: [ main ] - paths: - - '.github/workflows/test_weaver-**' - - 'weaver/**' - - '!weaver/docs/**' - - '!weaver/rfcs/**' - - '!weaver/resources/**' - pull_request: - branches: [ main ] - paths: - - '.github/workflows/test_weaver-**' - - 'weaver/**' - - '!weaver/docs/**' - - '!weaver/rfcs/**' - - '!weaver/resources/**' - - # Allows you to run this workflow manually from the Actions tab - workflow_dispatch: - -concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} - cancel-in-progress: true - -# A workflow run is made up of one or more jobs that can run sequentially or in parallel -jobs: - data-sharing: - if: ${{ false }} - # The type of runner that the job will run on - runs-on: ubuntu-latest - - # Steps represent a sequence of tasks that will be executed as part of the job - steps: - # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - - uses: actions/checkout@v3.5.2 - - - name: Set up JDK 8 - uses: actions/setup-java@v3.11.0 - with: - java-version: '8' - distribution: 'adopt' - - - name: Set up Go - uses: actions/setup-go@v4.0.0 - with: - go-version: '1.20.2' - - - name: Use Node.js ${{ env.NODEJS_VERSION }} - uses: actions/setup-node@v3.6.0 - with: - node-version: ${{ env.NODEJS_VERSION }} - - # CORDA NETWORK - - name: Generate github.properties - run: | - echo "Using ${GITHUB_ACTOR} user." - echo "username=${GITHUB_ACTOR}" >> github.properties - echo "password=${{ secrets.GITHUB_TOKEN }}" >> github.properties - echo "url=https://maven.pkg.github.com/${GITHUB_ACTOR}/cacti" >> github.properties - - echo "Using ${GITHUB_ACTOR} user." - echo "username=${GITHUB_ACTOR}" >> github.main.properties - echo "password=${{ secrets.GITHUB_TOKEN }}" >> github.main.properties - echo "url=https://maven.pkg.github.com/hyperledger/cacti" >> github.main.properties - - ./scripts/get-cordapps.sh || mv github.main.properties github.properties - - cat github.properties - working-directory: weaver/tests/network-setups/corda - - - name: Start Corda Network - run: | - sed -i "/docker logs corda_partya_1 -f/"' s/^/#/' "scripts/start-nodes.sh" - make start &> corda-net.out & - working-directory: weaver/tests/network-setups/corda - - # FABRIC NETWORK - - name: Start Fabric Network - run: make start-interop PROFILE='2-nodes' - working-directory: weaver/tests/network-setups/fabric/dev - - - name: Corda Network logs - run: | - cat tests/network-setups/corda/corda-net.out - docker logs corda_partya_1 - working-directory: weaver - - # RELAY - - name: Edit Relay docker compose - run: make convert-compose-method2 - working-directory: weaver/core/relay - - - name: Start Relay for network1 - run: make start-server COMPOSE_ARG='--env-file docker/testnet-envs/.env.n1' - working-directory: weaver/core/relay - - - name: Start Relay for network2 - run: make start-server COMPOSE_ARG='--env-file docker/testnet-envs/.env.n2' - working-directory: weaver/core/relay - - - name: Start Relay for Corda_Network - run: make start-server COMPOSE_ARG='--env-file docker/testnet-envs/.env.corda' - working-directory: weaver/core/relay - - - name: Start Relay for Corda_Network2 - run: make start-server COMPOSE_ARG='--env-file docker/testnet-envs/.env.corda2' - working-directory: weaver/core/relay - - # FABRIC DRIVER - - name: Setup Fabric Driver .env - run: | - sed -i "s##${GITHUB_WORKSPACE}/weaver#g" docker-testnet-envs/.env.n1 - sed -i "s##${GITHUB_WORKSPACE}/weaver#g" docker-testnet-envs/.env.n2 - working-directory: weaver/core/drivers/fabric-driver - - - name: Start Fabric Driver for network1 - run: make deploy COMPOSE_ARG='--env-file docker-testnet-envs/.env.n1' NETWORK_NAME=$(grep NETWORK_NAME docker-testnet-envs/.env.n1 | cut -d '=' -f 2) - working-directory: weaver/core/drivers/fabric-driver - - - name: Start Fabric Driver for network2 - run: make deploy COMPOSE_ARG='--env-file docker-testnet-envs/.env.n2' NETWORK_NAME=$(grep NETWORK_NAME docker-testnet-envs/.env.n2 | cut -d '=' -f 2) - working-directory: weaver/core/drivers/fabric-driver - - # IIN AGENT - - name: Setup Fabric IIN Env - run: | - sed -i "s##${GITHUB_WORKSPACE}/weaver#g" docker-testnet/envs/.env.n1.org1 - sed -i "s#^AUTO_SYNC=true#AUTO_SYNC=false#g" docker-testnet/envs/.env.n1.org1 - sed -i "s#^DNS_CONFIG_PATH=.*#DNS_CONFIG_PATH=./docker-testnet/configs/dnsconfig-2-nodes.json#g" docker-testnet/envs/.env.n1.org1 - sed -i "s##${GITHUB_WORKSPACE}/weaver#g" docker-testnet/envs/.env.n1.org2 - sed -i "s#^AUTO_SYNC=true#AUTO_SYNC=false#g" docker-testnet/envs/.env.n1.org2 - sed -i "s#^DNS_CONFIG_PATH=.*#DNS_CONFIG_PATH=./docker-testnet/configs/dnsconfig-2-nodes.json#g" docker-testnet/envs/.env.n1.org2 - sed -i "s##${GITHUB_WORKSPACE}/weaver#g" docker-testnet/envs/.env.n2.org1 - sed -i "s#^AUTO_SYNC=true#AUTO_SYNC=false#g" docker-testnet/envs/.env.n2.org1 - sed -i "s#^DNS_CONFIG_PATH=.*#DNS_CONFIG_PATH=./docker-testnet/configs/dnsconfig-2-nodes.json#g" docker-testnet/envs/.env.n2.org1 - sed -i "s##${GITHUB_WORKSPACE}/weaver#g" docker-testnet/envs/.env.n2.org2 - sed -i "s#^AUTO_SYNC=true#AUTO_SYNC=false#g" docker-testnet/envs/.env.n2.org2 - sed -i "s#^DNS_CONFIG_PATH=.*#DNS_CONFIG_PATH=./docker-testnet/configs/dnsconfig-2-nodes.json#g" docker-testnet/envs/.env.n2.org2 - working-directory: weaver/core/identity-management/iin-agent - - - name: Start Fabric IIN Agent for network1 - run: | - make deploy COMPOSE_ARG='--env-file docker-testnet/envs/.env.n1.org1' DLT_SPECIFIC_DIR=$(grep DLT_SPECIFIC_DIR docker-testnet/envs/.env.n1.org1 | cut -d '=' -f 2) - make deploy COMPOSE_ARG='--env-file docker-testnet/envs/.env.n1.org2' DLT_SPECIFIC_DIR=$(grep DLT_SPECIFIC_DIR docker-testnet/envs/.env.n1.org2 | cut -d '=' -f 2) - working-directory: weaver/core/identity-management/iin-agent - - - name: Start Fabric IIN Agent for network2 - run: | - make deploy COMPOSE_ARG='--env-file docker-testnet/envs/.env.n2.org1' DLT_SPECIFIC_DIR=$(grep DLT_SPECIFIC_DIR docker-testnet/envs/.env.n2.org1 | cut -d '=' -f 2) - make deploy COMPOSE_ARG='--env-file docker-testnet/envs/.env.n2.org2' DLT_SPECIFIC_DIR=$(grep DLT_SPECIFIC_DIR docker-testnet/envs/.env.n2.org2 | cut -d '=' -f 2) - working-directory: weaver/core/identity-management/iin-agent - - # CORDA DRIVER - - name: Start Corda Driver - run: make deploy COMPOSE_ARG='--env-file docker-testnet-envs/.env.corda' - working-directory: weaver/core/drivers/corda-driver - - - name: Start Corda_Network2 Driver - run: make deploy COMPOSE_ARG='--env-file docker-testnet-envs/.env.corda2' - working-directory: weaver/core/drivers/corda-driver - - # FABRIC CLI - - name: Setup Fabric CLI .npmrc - run: | - cp .npmrc.template .npmrc - sed -i "s//${{ secrets.GITHUB_TOKEN }}/g" .npmrc - cat .npmrc - working-directory: weaver/samples/fabric/fabric-cli - - name: Build Fabric CLI - run: | - npm install --global yarn - make build - working-directory: weaver/samples/fabric/fabric-cli - - name: Setup Fabric CLI Config - run: | - echo ${GITHUB_WORKSPACE} - cp config.template.json config.json - sed -i "s##${GITHUB_WORKSPACE}/weaver#g" config.json - working-directory: weaver/samples/fabric/fabric-cli - - name: Setup Fabric CLI ENV - run: | - echo ${GITHUB_WORKSPACE} - cp .env.template .env - sed -i "s/CHAINCODE_PATH=.*/CHAINCODE_PATH=\.\/chaincode\.json/g" .env - ./bin/fabric-cli env set MEMBER_CREDENTIAL_FOLDER ${GITHUB_WORKSPACE}/weaver/samples/fabric/fabric-cli/src/data/credentials_docker - ./bin/fabric-cli env set CONFIG_PATH ${GITHUB_WORKSPACE}/weaver/samples/fabric/fabric-cli/config.json - cat .env - working-directory: weaver/samples/fabric/fabric-cli - - - name: Fabric CLI Configure ALL - run: ./bin/fabric-cli configure all network1 network2 --num-orgs=2 - working-directory: weaver/samples/fabric/fabric-cli - - - name: Fabric Sync Membership using IIN Agent - run: | - ./bin/fabric-cli configure membership --local-network=network1 --target-network=network2 --iin-agent-endpoint=localhost:9500 - sleep 30 - docker logs iin-agent-Org1MSP-network1 - docker logs iin-agent-Org1MSP-network2 - ./bin/fabric-cli configure membership --local-network=network2 --target-network=network1 --iin-agent-endpoint=localhost:9501 - sleep 30 - docker logs iin-agent-Org1MSP-network1 - docker logs iin-agent-Org1MSP-network2 - working-directory: weaver/samples/fabric/fabric-cli - - # CORDA CLIENT - - name: Corda CLI Initialize Vault - run: make initialise-vault-docker - working-directory: weaver/samples/corda/corda-simple-application - - - name: Data Transfer Corda Client Tests - run: | - COUNT=0 - TOTAL=8 - - # CORDA-CORDA2 - ./clients/build/install/clients/bin/clients request-state localhost:9081 relay-corda2:9082/Corda_Network2/corda_network2_partya_1:10003#com.cordaSimpleApplication.flow.GetStateByKey:H 1> tmp.out - cat tmp.out | grep "SimpleState(key=H, value=\[SimpleState(key=H, value=1" && COUNT=$(( COUNT + 1 )) && echo "PASS" - cat tmp.out - - ./clients/build/install/clients/bin/clients get-state H 1> tmp.out - cat tmp.out | grep "SimpleState(key=H, value=\[SimpleState(key=H, value=1" && COUNT=$(( COUNT + 1 )) && echo "PASS" - cat tmp.out - - # CORDA2-CORDA - - NETWORK_NAME=Corda_Network2 CORDA_PORT=30006 ./clients/build/install/clients/bin/clients request-state localhost:9082 relay-corda:9081/Corda_Network/corda_partya_1:10003#com.cordaSimpleApplication.flow.GetStateByKey:C 1> tmp.out - cat tmp.out | grep "SimpleState(key=C, value=\[SimpleState(key=C, value=20" && COUNT=$(( COUNT + 1 )) && echo "PASS" - cat tmp.out - - NETWORK_NAME=Corda_Network2 CORDA_PORT=30006 ./clients/build/install/clients/bin/clients get-state C 1> tmp.out - cat tmp.out | grep "SimpleState(key=C, value=\[SimpleState(key=C, value=20" && COUNT=$(( COUNT + 1 )) && echo "PASS" - cat tmp.out - - # CORDA - FABRIC1 - ./clients/build/install/clients/bin/clients request-state localhost:9081 relay-network1:9080/network1/mychannel:simplestate:Read:a 1> tmp.out - cat tmp.out | grep "SimpleState(key=a, value=Arcturus" && COUNT=$(( COUNT + 1 )) && echo "PASS" - cat tmp.out - - ./clients/build/install/clients/bin/clients get-state a 1> tmp.out - cat tmp.out | grep "SimpleState(key=a, value=Arcturus" && COUNT=$(( COUNT + 1 )) && echo "PASS" - cat tmp.out - - # CORDA - FABRIC2 - ./clients/build/install/clients/bin/clients request-state localhost:9081 relay-network2:9083/network2/mychannel:simplestate:Read:Arcturus 1> tmp.out - cat tmp.out | grep "SimpleState(key=Arcturus, value=17.671" && COUNT=$(( COUNT + 1 )) && echo "PASS" - cat tmp.out - - ./clients/build/install/clients/bin/clients get-state Arcturus 1> tmp.out - cat tmp.out | grep "SimpleState(key=Arcturus, value=17.671" && COUNT=$(( COUNT + 1 )) && echo "PASS" - cat tmp.out - - # RESULT - echo "Passed $COUNT/$TOTAL Tests." - - if [ $COUNT == $TOTAL ]; then - exit 0 - else - exit 1 - fi - working-directory: weaver/samples/corda/corda-simple-application - - # FABRIC CLI - - name: Data Transfer Fabric CLI Tests - run: | - COUNT=0 - TOTAL=12 - - # FABRIC2 - FABRIC1 - cp chaincode.json.template chaincode.json - ./bin/fabric-cli interop --local-network=network2 --requesting-org=Org1MSP relay-network1:9080/network1/mychannel:simplestate:Read:a &> tmp.out - tail -n 1 tmp.out | grep "Args: a, Arcturus" && COUNT=$(( COUNT + 1 )) && echo "PASS" - cat tmp.out - - ./bin/fabric-cli chaincode query mychannel simplestate read '["a"]' --local-network=network2 &> tmp.out - tail -n 1 tmp.out | grep "Result from network query: Arcturus" && COUNT=$(( COUNT + 1 )) && echo "PASS" - cat tmp.out - - # FABRIC1 - FABRIC2 - sed -i "s/\"args\"\: \[\"a\"/\"args\"\: \[\"Arcturus\"/g" chaincode.json - ./bin/fabric-cli interop --local-network=network1 --requesting-org=Org1MSP relay-network2:9083/network2/mychannel:simplestate:Read:Arcturus &> tmp.out - tail -n 1 tmp.out | grep "Args: Arcturus, 17.671" && COUNT=$(( COUNT + 1 )) && echo "PASS" - cat tmp.out - - # FABRIC2 - FABRIC1 - CONFIDENTIAL - sed -i "s/\"args\"\: \[\"Arcturus\"/\"args\"\: \[\"b\"/g" chaincode.json - ./bin/fabric-cli interop --local-network=network2 --requesting-org=Org1MSP --e2e-confidentiality=true relay-network1:9080/network1/mychannel:simplestate:Read:b &> tmp.out - tail -n 1 tmp.out | grep "Args: b, Betelgeuse" && COUNT=$(( COUNT + 1 )) && echo "PASS" - cat tmp.out - - ./bin/fabric-cli chaincode query mychannel simplestate read '["b"]' --local-network=network2 &> tmp.out - tail -n 1 tmp.out | grep "Result from network query: Betelgeuse" && COUNT=$(( COUNT + 1 )) && echo "PASS" - cat tmp.out - - # FABRIC1 - FABRIC2 - CONFIDENTIAL - sed -i "s/\"args\"\: \[\"b\"/\"args\"\: \[\"Betelgeuse\"/g" chaincode.json - ./bin/fabric-cli interop --local-network=network1 --requesting-org=Org1MSP --e2e-confidentiality=true relay-network2:9083/network2/mychannel:simplestate:Read:Betelgeuse &> tmp.out - tail -n 1 tmp.out | grep "Args: Betelgeuse, 617.1" && COUNT=$(( COUNT + 1 )) && echo "PASS" - cat tmp.out - - ./bin/fabric-cli chaincode query mychannel simplestate read '["Betelgeuse"]' --local-network=network1 &> tmp.out - tail -n 1 tmp.out | grep "Result from network query: 617.1" && COUNT=$(( COUNT + 1 )) && echo "PASS" - cat tmp.out - - ./bin/fabric-cli chaincode query mychannel simplestate read '["Arcturus"]' --local-network=network1 &> tmp.out - tail -n 1 tmp.out | grep "Result from network query: 17.671" && COUNT=$(( COUNT + 1 )) && echo "PASS" - cat tmp.out - - # FABRIC1 - CORDA - cp chaincode.json.template chaincode.json - sed -i "s/\"args\"\: \[\"a\"/\"args\"\: \[\"H\"/g" chaincode.json - ./bin/fabric-cli interop --local-network=network1 --sign=true --requesting-org=Org1MSP relay-corda:9081/Corda_Network/corda_partya_1:10003#com.cordaSimpleApplication.flow.GetStateByKey:H --debug=true &> tmp.out - tail -n 1 tmp.out | grep "Args: H, \[SimpleState(key=H, value=1" && COUNT=$(( COUNT + 1 )) && echo "PASS" - cat tmp.out - - ./bin/fabric-cli chaincode query mychannel simplestate read '["H"]' --local-network=network1 &> tmp.out - tail -n 1 tmp.out | grep "Result from network query: \[SimpleState(key=H, value=1" && COUNT=$(( COUNT + 1 )) && echo "PASS" - cat tmp.out - - # FABRIC2 - CORDA - cp chaincode.json.template chaincode.json - sed -i "s/\"args\"\: \[\"a\"/\"args\"\: \[\"C\"/g" chaincode.json - ./bin/fabric-cli interop --local-network=network2 --sign=true --requesting-org=Org1MSP relay-corda:9081/Corda_Network/corda_partya_1:10003#com.cordaSimpleApplication.flow.GetStateByKey:C --debug=true &> tmp.out - tail -n 1 tmp.out | grep "Args: C, \[SimpleState(key=C, value=20" && COUNT=$(( COUNT + 1 )) && echo "PASS" - cat tmp.out - - ./bin/fabric-cli chaincode query mychannel simplestate read '["C"]' --local-network=network2 &> tmp.out - tail -n 1 tmp.out | grep "Result from network query: \[SimpleState(key=C, value=20" && COUNT=$(( COUNT + 1 )) && echo "PASS" - cat tmp.out - - - # RESULT - echo "Passed $COUNT/$TOTAL Tests." - - if [ $COUNT == $TOTAL ]; then - exit 0 - else - exit 1 - fi - working-directory: weaver/samples/fabric/fabric-cli - - - name: DEBUG Logs - corda partya - if: failure() - run: docker logs corda_partya_1 - - - name: DEBUG Logs - corda network2 partya - if: failure() - run: docker logs corda_network2_partya_1 - - - name: DEBUG Logs - fabric n1 relay - if: failure() - run: docker logs relay-network1 - - - name: DEBUG Logs - fabric n2 relay - if: failure() - run: docker logs relay-network2 - - - name: DEBUG Logs - corda relay - if: failure() - run: docker logs relay-corda - - - name: DEBUG Logs - corda2 relay - if: failure() - run: docker logs relay-corda2 - - - name: DEBUG Logs - fabric n1 driver - if: failure() - run: docker logs driver-fabric-network1 - - - name: DEBUG Logs - fabric n2 driver - if: failure() - run: docker logs driver-fabric-network2 - - - name: DEBUG Logs - corda driver - if: failure() - run: docker logs driver-corda-Corda_Network - - - name: DEBUG Logs - corda2 driver - if: failure() - run: docker logs driver-corda-Corda_Network2 - - data-sharing-docker-local: - # if: ${{ false }} - # The type of runner that the job will run on - runs-on: ubuntu-latest - - # Steps represent a sequence of tasks that will be executed as part of the job - steps: - # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - - uses: actions/checkout@v3.5.2 - - - name: Set up JDK 8 - uses: actions/setup-java@v3.11.0 - with: - java-version: '8' - distribution: 'adopt' - - - name: Set up Go - uses: actions/setup-go@v4.0.0 - with: - go-version: '1.20.2' - - - name: Use Node.js ${{ env.NODEJS_VERSION }} - uses: actions/setup-node@v3.6.0 - with: - node-version: ${{ env.NODEJS_VERSION }} - - - name: Use Protoc 3.15 - run: | - curl -LO https://github.com/protocolbuffers/protobuf/releases/download/v3.15.6/protoc-3.15.6-linux-x86_64.zip - unzip protoc-3.15.6-linux-x86_64.zip -d protoc - go install google.golang.org/protobuf/cmd/protoc-gen-go@latest - go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest - - # PROTOS - - name: Build GO Protos - run: | - export PATH="$PATH:${GITHUB_WORKSPACE}/protoc/bin" - make build - working-directory: weaver/common/protos-go - - # PROTOS - - name: Build JS Protos - run: | - export PATH="$PATH:${GITHUB_WORKSPACE}/protoc/bin" - make build - working-directory: weaver/common/protos-js - - - name: Build Java Protos - run: make build - working-directory: weaver/common/protos-java-kt - - # Build Dependencies - - name: Build Corda Interop App - run: make build-local - working-directory: weaver/core/network/corda-interop-app - - - name: Build Corda Interop SDK - run: make build - working-directory: weaver/sdks/corda - - - name: Build Corda SimpleApplication - run: make build-local - working-directory: weaver/samples/corda/corda-simple-application - - - name: Build Fabric Interop SDK - run: make build-local - working-directory: weaver/sdks/fabric/interoperation-node-sdk - - - name: Build Fabric CLI - run: make build-local - working-directory: weaver/samples/fabric/fabric-cli - - - name: Build Relay - run: make build-server-local - working-directory: weaver/core/relay - - - name: Build Fabric Driver - run: make build-image-local - working-directory: weaver/core/drivers/fabric-driver - - - name: Build Corda Driver - run: make image-local - working-directory: weaver/core/drivers/corda-driver - - - name: Build IIN Agent - run: make build-image-local - working-directory: weaver/core/identity-management/iin-agent - - - name: Start Corda Network - run: | - sed -i "/docker logs corda_partya_1 -f/"' s/^/#/' "scripts/start-nodes.sh" - make start-local &> corda-net.out & - working-directory: weaver/tests/network-setups/corda - - # FABRIC NETWORK - - name: Start Fabric Network - run: make start-interop-local PROFILE='2-nodes' - working-directory: weaver/tests/network-setups/fabric/dev - - - name: Corda Network logs - run: | - cat tests/network-setups/corda/corda-net.out - docker logs corda_partya_1 - working-directory: weaver - - # RELAY - - name: Edit Relay docker compose - run: make convert-compose-method2 - working-directory: weaver/core/relay - - - name: Start Relay for network1 - run: | - sed -i "s#^DOCKER_IMAGE_NAME=.*#DOCKER_IMAGE_NAME=cacti-weaver-relay-server#g" docker/testnet-envs/.env.n1 - make start-server COMPOSE_ARG='--env-file docker/testnet-envs/.env.n1' - working-directory: weaver/core/relay - - - name: Start Relay for network2 - run: | - sed -i "s#^DOCKER_IMAGE_NAME=.*#DOCKER_IMAGE_NAME=cacti-weaver-relay-server#g" docker/testnet-envs/.env.n2 - make start-server COMPOSE_ARG='--env-file docker/testnet-envs/.env.n2' - working-directory: weaver/core/relay - - - name: Start Relay for Corda_Network - run: | - sed -i "s#^DOCKER_IMAGE_NAME=.*#DOCKER_IMAGE_NAME=cacti-weaver-relay-server#g" docker/testnet-envs/.env.corda - make start-server COMPOSE_ARG='--env-file docker/testnet-envs/.env.corda' - working-directory: weaver/core/relay - - - name: Start Relay for Corda_Network2 - run: | - sed -i "s#^DOCKER_IMAGE_NAME=.*#DOCKER_IMAGE_NAME=cacti-weaver-relay-server#g" docker/testnet-envs/.env.corda2 - make start-server COMPOSE_ARG='--env-file docker/testnet-envs/.env.corda2' - working-directory: weaver/core/relay - - # FABRIC DRIVER - - name: Setup Fabric Driver .env - run: | - sed -i "s#^DOCKER_IMAGE_NAME=.*#DOCKER_IMAGE_NAME=cacti-weaver-driver-fabric#g" docker-testnet-envs/.env.n1 - sed -i "s##${GITHUB_WORKSPACE}/weaver#g" docker-testnet-envs/.env.n1 - sed -i "s#^DOCKER_IMAGE_NAME=.*#DOCKER_IMAGE_NAME=cacti-weaver-driver-fabric#g" docker-testnet-envs/.env.n2 - sed -i "s##${GITHUB_WORKSPACE}/weaver#g" docker-testnet-envs/.env.n2 - working-directory: weaver/core/drivers/fabric-driver - - - name: Start Fabric Driver for network1 - run: make deploy COMPOSE_ARG='--env-file docker-testnet-envs/.env.n1' NETWORK_NAME=$(grep NETWORK_NAME docker-testnet-envs/.env.n1 | cut -d '=' -f 2) - working-directory: weaver/core/drivers/fabric-driver - - - name: Start Fabric Driver for network2 - run: make deploy COMPOSE_ARG='--env-file docker-testnet-envs/.env.n2' NETWORK_NAME=$(grep NETWORK_NAME docker-testnet-envs/.env.n2 | cut -d '=' -f 2) - working-directory: weaver/core/drivers/fabric-driver - - # IIN AGENT - - name: Setup Fabric IIN Env - run: | - sed -i "s#^DOCKER_IMAGE_NAME=.*#DOCKER_IMAGE_NAME=cacti-weaver-iin-agent#g" docker-testnet/envs/.env.n1.org1 - sed -i "s##${GITHUB_WORKSPACE}/weaver#g" docker-testnet/envs/.env.n1.org1 - sed -i "s#^AUTO_SYNC=true#AUTO_SYNC=false#g" docker-testnet/envs/.env.n1.org1 - sed -i "s#^DNS_CONFIG_PATH=.*#DNS_CONFIG_PATH=./docker-testnet/configs/dnsconfig-2-nodes.json#g" docker-testnet/envs/.env.n1.org1 - sed -i "s#^DOCKER_IMAGE_NAME=.*#DOCKER_IMAGE_NAME=cacti-weaver-iin-agent#g" docker-testnet/envs/.env.n1.org2 - sed -i "s##${GITHUB_WORKSPACE}/weaver#g" docker-testnet/envs/.env.n1.org2 - sed -i "s#^AUTO_SYNC=true#AUTO_SYNC=false#g" docker-testnet/envs/.env.n1.org2 - sed -i "s#^DNS_CONFIG_PATH=.*#DNS_CONFIG_PATH=./docker-testnet/configs/dnsconfig-2-nodes.json#g" docker-testnet/envs/.env.n1.org2 - sed -i "s#^DOCKER_IMAGE_NAME=.*#DOCKER_IMAGE_NAME=cacti-weaver-iin-agent#g" docker-testnet/envs/.env.n2.org1 - sed -i "s##${GITHUB_WORKSPACE}/weaver#g" docker-testnet/envs/.env.n2.org1 - sed -i "s#^AUTO_SYNC=true#AUTO_SYNC=false#g" docker-testnet/envs/.env.n2.org1 - sed -i "s#^DNS_CONFIG_PATH=.*#DNS_CONFIG_PATH=./docker-testnet/configs/dnsconfig-2-nodes.json#g" docker-testnet/envs/.env.n2.org1 - sed -i "s#^DOCKER_IMAGE_NAME=.*#DOCKER_IMAGE_NAME=cacti-weaver-iin-agent#g" docker-testnet/envs/.env.n2.org2 - sed -i "s##${GITHUB_WORKSPACE}/weaver#g" docker-testnet/envs/.env.n2.org2 - sed -i "s#^AUTO_SYNC=true#AUTO_SYNC=false#g" docker-testnet/envs/.env.n2.org2 - sed -i "s#^DNS_CONFIG_PATH=.*#DNS_CONFIG_PATH=./docker-testnet/configs/dnsconfig-2-nodes.json#g" docker-testnet/envs/.env.n2.org2 - working-directory: weaver/core/identity-management/iin-agent - - - name: Start Fabric IIN Agent for network1 - run: | - make deploy COMPOSE_ARG='--env-file docker-testnet/envs/.env.n1.org1' DLT_SPECIFIC_DIR=$(grep DLT_SPECIFIC_DIR docker-testnet/envs/.env.n1.org1 | cut -d '=' -f 2) - make deploy COMPOSE_ARG='--env-file docker-testnet/envs/.env.n1.org2' DLT_SPECIFIC_DIR=$(grep DLT_SPECIFIC_DIR docker-testnet/envs/.env.n1.org2 | cut -d '=' -f 2) - working-directory: weaver/core/identity-management/iin-agent - - - name: Start Fabric IIN Agent for network2 - run: | - make deploy COMPOSE_ARG='--env-file docker-testnet/envs/.env.n2.org1' DLT_SPECIFIC_DIR=$(grep DLT_SPECIFIC_DIR docker-testnet/envs/.env.n2.org1 | cut -d '=' -f 2) - make deploy COMPOSE_ARG='--env-file docker-testnet/envs/.env.n2.org2' DLT_SPECIFIC_DIR=$(grep DLT_SPECIFIC_DIR docker-testnet/envs/.env.n2.org2 | cut -d '=' -f 2) - working-directory: weaver/core/identity-management/iin-agent - - # CORDA DRIVER - - name: Start Corda Driver - run: | - sed -i "s#^DOCKER_IMAGE_NAME=.*#DOCKER_IMAGE_NAME=cacti-weaver-driver-corda#g" docker-testnet-envs/.env.corda - make deploy COMPOSE_ARG='--env-file docker-testnet-envs/.env.corda' - working-directory: weaver/core/drivers/corda-driver - - - name: Start Corda_Network2 Driver - run: | - sed -i "s#^DOCKER_IMAGE_NAME=.*#DOCKER_IMAGE_NAME=cacti-weaver-driver-corda#g" docker-testnet-envs/.env.corda2 - make deploy COMPOSE_ARG='--env-file docker-testnet-envs/.env.corda2' - working-directory: weaver/core/drivers/corda-driver - - # FABRIC CLI - - name: Setup Fabric CLI Config - run: | - echo ${GITHUB_WORKSPACE} - cp config.template.json config.json - sed -i "s##${GITHUB_WORKSPACE}/weaver#g" config.json - working-directory: weaver/samples/fabric/fabric-cli - - name: Setup Fabric CLI ENV - run: | - echo ${GITHUB_WORKSPACE} - cp .env.template .env - sed -i "s/CHAINCODE_PATH=.*/CHAINCODE_PATH=\.\/chaincode\.json/g" .env - ./bin/fabric-cli env set MEMBER_CREDENTIAL_FOLDER ${GITHUB_WORKSPACE}/weaver/samples/fabric/fabric-cli/src/data/credentials_docker - ./bin/fabric-cli env set CONFIG_PATH ${GITHUB_WORKSPACE}/weaver/samples/fabric/fabric-cli/config.json - cat .env - working-directory: weaver/samples/fabric/fabric-cli - - - name: Fabric CLI Configure ALL - run: ./bin/fabric-cli configure all network1 network2 --num-orgs=2 - working-directory: weaver/samples/fabric/fabric-cli - - - name: Fabric Sync Membership using IIN Agent - run: | - ./bin/fabric-cli configure membership --local-network=network1 --target-network=network2 --iin-agent-endpoint=localhost:9500 - sleep 30 - docker logs iin-agent-Org1MSP-network1 - docker logs iin-agent-Org1MSP-network2 - ./bin/fabric-cli configure membership --local-network=network2 --target-network=network1 --iin-agent-endpoint=localhost:9501 - sleep 30 - docker logs iin-agent-Org1MSP-network1 - docker logs iin-agent-Org1MSP-network2 - working-directory: weaver/samples/fabric/fabric-cli - - # CORDA CLIENT - - name: Corda CLI Initialize Vault - run: make initialise-vault-docker - working-directory: weaver/samples/corda/corda-simple-application - - - name: Data Transfer Corda Client Tests - run: | - COUNT=0 - TOTAL=8 - - # CORDA-CORDA2 - ./clients/build/install/clients/bin/clients request-state --wkey=H localhost:9081 relay-corda2:9082/Corda_Network2/corda_network2_partya_1:10003#com.cordaSimpleApplication.flow.GetStateByKey:H 1> tmp.out - cat tmp.out | grep "SimpleState(key=H, value=\[SimpleState(key=H, value=1" && COUNT=$(( COUNT + 1 )) && echo "PASS" - cat tmp.out - - ./clients/build/install/clients/bin/clients get-state H 1> tmp.out - cat tmp.out | grep "SimpleState(key=H, value=\[SimpleState(key=H, value=1" && COUNT=$(( COUNT + 1 )) && echo "PASS" - cat tmp.out - - # CORDA2-CORDA - - NETWORK_NAME=Corda_Network2 CORDA_PORT=30006 ./clients/build/install/clients/bin/clients request-state --wkey=C localhost:9082 relay-corda:9081/Corda_Network/corda_partya_1:10003#com.cordaSimpleApplication.flow.GetStateByKey:C 1> tmp.out - cat tmp.out | grep "SimpleState(key=C, value=\[SimpleState(key=C, value=20" && COUNT=$(( COUNT + 1 )) && echo "PASS" - cat tmp.out - - NETWORK_NAME=Corda_Network2 CORDA_PORT=30006 ./clients/build/install/clients/bin/clients get-state C 1> tmp.out - cat tmp.out | grep "SimpleState(key=C, value=\[SimpleState(key=C, value=20" && COUNT=$(( COUNT + 1 )) && echo "PASS" - cat tmp.out - - # CORDA - FABRIC1 - ./clients/build/install/clients/bin/clients request-state --wkey=a localhost:9081 relay-network1:9080/network1/mychannel:simplestate:Read:a 1> tmp.out - cat tmp.out | grep "SimpleState(key=a, value=Arcturus" && COUNT=$(( COUNT + 1 )) && echo "PASS" - cat tmp.out - - ./clients/build/install/clients/bin/clients get-state a 1> tmp.out - cat tmp.out | grep "SimpleState(key=a, value=Arcturus" && COUNT=$(( COUNT + 1 )) && echo "PASS" - cat tmp.out - - # CORDA - FABRIC2 - ./clients/build/install/clients/bin/clients request-state --wkey=Arcturus localhost:9081 relay-network2:9083/network2/mychannel:simplestate:Read:Arcturus 1> tmp.out - cat tmp.out | grep "SimpleState(key=Arcturus, value=17.671" && COUNT=$(( COUNT + 1 )) && echo "PASS" - cat tmp.out - - ./clients/build/install/clients/bin/clients get-state Arcturus 1> tmp.out - cat tmp.out | grep "SimpleState(key=Arcturus, value=17.671" && COUNT=$(( COUNT + 1 )) && echo "PASS" - cat tmp.out - - # RESULT - echo "Passed $COUNT/$TOTAL Tests." - - if [ $COUNT == $TOTAL ]; then - exit 0 - else - exit 1 - fi - working-directory: weaver/samples/corda/corda-simple-application - - # FABRIC CLI - - name: Data Transfer Fabric CLI Tests - run: | - COUNT=0 - TOTAL=12 - - # FABRIC2 - FABRIC1 - cp chaincode.json.template chaincode.json - ./bin/fabric-cli interop --local-network=network2 --requesting-org=Org1MSP relay-network1:9080/network1/mychannel:simplestate:Read:a &> tmp.out - tail -n 1 tmp.out | grep "Args: a, Arcturus" && COUNT=$(( COUNT + 1 )) && echo "PASS" - cat tmp.out - - ./bin/fabric-cli chaincode query mychannel simplestate read '["a"]' --local-network=network2 &> tmp.out - tail -n 1 tmp.out | grep "Result from network query: Arcturus" && COUNT=$(( COUNT + 1 )) && echo "PASS" - cat tmp.out - - # FABRIC1 - FABRIC2 - sed -i "s/\"args\"\: \[\"a\"/\"args\"\: \[\"Arcturus\"/g" chaincode.json - ./bin/fabric-cli interop --local-network=network1 --requesting-org=Org1MSP relay-network2:9083/network2/mychannel:simplestate:Read:Arcturus &> tmp.out - tail -n 1 tmp.out | grep "Args: Arcturus, 17.671" && COUNT=$(( COUNT + 1 )) && echo "PASS" - cat tmp.out - - ./bin/fabric-cli chaincode query mychannel simplestate read '["Arcturus"]' --local-network=network1 &> tmp.out - tail -n 1 tmp.out | grep "Result from network query: 17.671" && COUNT=$(( COUNT + 1 )) && echo "PASS" - cat tmp.out - - # FABRIC2 - FABRIC1 - CONFIDENTIAL - sed -i "s/\"args\"\: \[\"Arcturus\"/\"args\"\: \[\"b\"/g" chaincode.json - ./bin/fabric-cli interop --local-network=network2 --requesting-org=Org1MSP --e2e-confidentiality=true relay-network1:9080/network1/mychannel:simplestate:Read:b &> tmp.out - tail -n 1 tmp.out | grep "Args: b, Betelgeuse" && COUNT=$(( COUNT + 1 )) && echo "PASS" - cat tmp.out - - ./bin/fabric-cli chaincode query mychannel simplestate read '["b"]' --local-network=network2 &> tmp.out - tail -n 1 tmp.out | grep "Result from network query: Betelgeuse" && COUNT=$(( COUNT + 1 )) && echo "PASS" - cat tmp.out - - # FABRIC1 - FABRIC2 - CONFIDENTIAL - sed -i "s/\"args\"\: \[\"b\"/\"args\"\: \[\"Betelgeuse\"/g" chaincode.json - ./bin/fabric-cli interop --local-network=network1 --requesting-org=Org1MSP --e2e-confidentiality=true relay-network2:9083/network2/mychannel:simplestate:Read:Betelgeuse &> tmp.out - tail -n 1 tmp.out | grep "Args: Betelgeuse, 617.1" && COUNT=$(( COUNT + 1 )) && echo "PASS" - cat tmp.out - - ./bin/fabric-cli chaincode query mychannel simplestate read '["Betelgeuse"]' --local-network=network1 &> tmp.out - tail -n 1 tmp.out | grep "Result from network query: 617.1" && COUNT=$(( COUNT + 1 )) && echo "PASS" - cat tmp.out - - # FABRIC1 - CORDA - cp chaincode.json.template chaincode.json - sed -i "s/\"args\"\: \[\"a\"/\"args\"\: \[\"H\"/g" chaincode.json - ./bin/fabric-cli interop --local-network=network1 --sign=true --requesting-org=Org1MSP relay-corda:9081/Corda_Network/corda_partya_1:10003#com.cordaSimpleApplication.flow.GetStateByKey:H --debug=true &> tmp.out - tail -n 1 tmp.out | grep "Args: H, \[SimpleState(key=H, value=1" && COUNT=$(( COUNT + 1 )) && echo "PASS" - cat tmp.out - - ./bin/fabric-cli chaincode query mychannel simplestate read '["H"]' --local-network=network1 &> tmp.out - tail -n 1 tmp.out | grep "Result from network query: \[SimpleState(key=H, value=1" && COUNT=$(( COUNT + 1 )) && echo "PASS" - cat tmp.out - - # FABRIC2 - CORDA - cp chaincode.json.template chaincode.json - sed -i "s/\"args\"\: \[\"a\"/\"args\"\: \[\"C\"/g" chaincode.json - ./bin/fabric-cli interop --local-network=network2 --sign=true --requesting-org=Org1MSP relay-corda:9081/Corda_Network/corda_partya_1:10003#com.cordaSimpleApplication.flow.GetStateByKey:C --debug=true &> tmp.out - tail -n 1 tmp.out | grep "Args: C, \[SimpleState(key=C, value=20" && COUNT=$(( COUNT + 1 )) && echo "PASS" - cat tmp.out - - ./bin/fabric-cli chaincode query mychannel simplestate read '["C"]' --local-network=network2 &> tmp.out - tail -n 1 tmp.out | grep "Result from network query: \[SimpleState(key=C, value=20" && COUNT=$(( COUNT + 1 )) && echo "PASS" - cat tmp.out - - - # RESULT - echo "Passed $COUNT/$TOTAL Tests." - - if [ $COUNT == $TOTAL ]; then - exit 0 - else - exit 1 - fi - working-directory: weaver/samples/fabric/fabric-cli - - - name: DEBUG Logs - corda partya - if: failure() - run: docker logs corda_partya_1 - - - name: DEBUG Logs - corda network2 partya - if: failure() - run: docker logs corda_network2_partya_1 - - - name: DEBUG Logs - fabric n1 relay - if: failure() - run: docker logs relay-network1 - - - name: DEBUG Logs - fabric n2 relay - if: failure() - run: docker logs relay-network2 - - - name: DEBUG Logs - corda relay - if: failure() - run: docker logs relay-corda - - - name: DEBUG Logs - corda2 relay - if: failure() - run: docker logs relay-corda2 - - - name: DEBUG Logs - fabric n1 driver - if: failure() - run: docker logs driver-fabric-network1 - - - name: DEBUG Logs - fabric n2 driver - if: failure() - run: docker logs driver-fabric-network2 - - - name: DEBUG Logs - corda driver - if: failure() - run: docker logs driver-corda-Corda_Network - - - name: DEBUG Logs - corda2 driver - if: failure() - run: docker logs driver-corda-Corda_Network2 - - data-sharing-local: - # if: ${{ false }} - # The type of runner that the job will run on - runs-on: ubuntu-latest - - # Steps represent a sequence of tasks that will be executed as part of the job - steps: - # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - - uses: actions/checkout@v3.5.2 - - - name: Set up JDK 8 - uses: actions/setup-java@v3.11.0 - with: - java-version: '8' - distribution: 'adopt' - - - name: Set up Go - uses: actions/setup-go@v4.0.0 - with: - go-version: '1.20.2' - - - name: Use Node.js ${{ env.NODEJS_VERSION }} - uses: actions/setup-node@v3.6.0 - with: - node-version: ${{ env.NODEJS_VERSION }} - - - name: Install RUST Toolchain minimal stable with clippy and rustfmt - uses: actions-rs/toolchain@v1.0.6 - with: - profile: minimal - toolchain: stable - components: rustfmt, clippy - - - name: Get Latest Relay Dependencies - run: | - make protos-local - cargo update -p nom - cargo update -p lexical-core - working-directory: weaver/core/relay - - - name: Use Protoc 3.15 - run: | - curl -LO https://github.com/protocolbuffers/protobuf/releases/download/v3.15.6/protoc-3.15.6-linux-x86_64.zip - unzip protoc-3.15.6-linux-x86_64.zip -d protoc - go install google.golang.org/protobuf/cmd/protoc-gen-go@latest - go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest - - # PROTOS - - name: Build GO Protos - run: | - export PATH="$PATH:${GITHUB_WORKSPACE}/protoc/bin" - make build - working-directory: weaver/common/protos-go - - # PROTOS - - name: Build JS Protos - run: | - export PATH="$PATH:${GITHUB_WORKSPACE}/protoc/bin" - make build - working-directory: weaver/common/protos-js - - - name: Build Java Protos - run: make build - working-directory: weaver/common/protos-java-kt - - # Build Dependencies - - name: Build Corda Interop App - run: make build-local - working-directory: weaver/core/network/corda-interop-app - - - name: Build Corda Interop SDK - run: make build - working-directory: weaver/sdks/corda - - - name: Build Corda SimpleApplication - run: make build-local - working-directory: weaver/samples/corda/corda-simple-application - - - name: Build Fabric Interop SDK - run: make build-local - working-directory: weaver/sdks/fabric/interoperation-node-sdk - - - name: Build Fabric CLI - run: make build-local - working-directory: weaver/samples/fabric/fabric-cli - - - name: Build Relay - run: make - working-directory: weaver/core/relay - - - name: Build Fabric Driver - run: make build-local - working-directory: weaver/core/drivers/fabric-driver - - - name: Build Corda Driver - run: make build-local - working-directory: weaver/core/drivers/corda-driver - - - name: Build IIN Agent - run: make build-local - working-directory: weaver/core/identity-management/iin-agent - - # CORDA NETWORK - - name: Start Corda Network - run: | - sed -i "/docker logs corda_partya_1 -f/"' s/^/#/' "scripts/start-nodes.sh" - make start-local &> corda-net.out & - working-directory: weaver/tests/network-setups/corda - - # FABRIC NETWORK - - - name: Start Fabric Network - run: make start-interop-local - working-directory: weaver/tests/network-setups/fabric/dev - - - name: Corda Network logs - run: | - cat tests/network-setups/corda/corda-net.out - docker logs corda_partya_1 - working-directory: weaver - - # RELAY - - name: Start Relay for network1 - run: RELAY_CONFIG=config/Fabric_Relay.toml cargo run --bin server &> relay-n1.out & - working-directory: weaver/core/relay - - - name: Start Relay for network2 - run: RELAY_CONFIG=config/Fabric_Relay2.toml cargo run --bin server &> relay-n2.out & - working-directory: weaver/core/relay - - - name: Start Relay for Corda_Network - run: RELAY_CONFIG=config/Corda_Relay.toml cargo run --bin server &> relay-corda.out & - working-directory: weaver/core/relay - - - name: Start Relay for Corda_Network2 - run: RELAY_CONFIG=config/Corda_Relay2.toml cargo run --bin server &> relay-corda2.out & - working-directory: weaver/core/relay - - # FABRIC DRIVER - - name: Setup Fabric Driver .env - run: | - cp .env.template .env - CCP_PATH=${GITHUB_WORKSPACE}/weaver/tests/network-setups/fabric/shared/network1/peerOrganizations/org1.network1.com/connection-org1.json - sed -i "s#path_to_connection_profile#${CCP_PATH}#g" .env - working-directory: weaver/core/drivers/fabric-driver - - - name: Start Fabric Driver for network1 - run: npm run dev &> fdriver-n1.out & - working-directory: weaver/core/drivers/fabric-driver - - - name: Start Fabric Driver for network2 - run: CONNECTION_PROFILE=${GITHUB_WORKSPACE}/weaver/tests/network-setups/fabric/shared/network2/peerOrganizations/org1.network2.com/connection-org1.json NETWORK_NAME=network2 RELAY_ENDPOINT=localhost:9083 DRIVER_ENDPOINT=localhost:9095 npm run dev &> fdriver-n2.out & - working-directory: weaver/core/drivers/fabric-driver - - # IIN AGENT - - name: Setup Fabric IIN Config - run: | - # FABRIC CONFIG - cp src/fabric-ledger/config.json.template src/fabric-ledger/config-n1.json - CCP_PATH=${GITHUB_WORKSPACE}/weaver/tests/network-setups/fabric/shared/network1/peerOrganizations/org1.network1.com/connection-org1.json - sed -i "s##${CCP_PATH}#g" src/fabric-ledger/config-n1.json - cat src/fabric-ledger/config-n1.json - cp src/fabric-ledger/config.json.template src/fabric-ledger/config-n2.json - CCP_PATH=${GITHUB_WORKSPACE}/weaver/tests/network-setups/fabric/shared/network2/peerOrganizations/org1.network2.com/connection-org1.json - sed -i "s##${CCP_PATH}#g" src/fabric-ledger/config-n2.json - cat src/fabric-ledger/config-n2.json - # DNS CONFIG - sed -i "s#iin-agent-Org1MSP-network1#localhost#g" docker-testnet/configs/dnsconfig.json - sed -i "s#iin-agent-Org1MSP-network2#localhost#g" docker-testnet/configs/dnsconfig.json - cat docker-testnet/configs/dnsconfig.json - working-directory: weaver/core/identity-management/iin-agent - - - name: Setup Fabric IIN Env - run: | - cp .env.template .env - sed -i "s##Org1MSP#g" .env - sed -i "s#^DLT_TYPE=.*#DLT_TYPE=fabric#g" .env - sed -i "s##interop#g" .env - sed -i "s#^DNS_CONFIG_PATH=#DNS_CONFIG_PATH=./docker-testnet/configs/dnsconfig.json#g" .env - sed -i "s#^SECURITY_DOMAIN_CONFIG_PATH=#SECURITY_DOMAIN_CONFIG_PATH=./docker-testnet/configs/security-domain-config.json#g" .env - sed -i "s#^CONFIG_PATH=#CONFIG_PATH=./src/fabric-ledger/config-n1.json#g" .env - sed -i "s#^AUTO_SYNC=#AUTO_SYNC=false#g" .env - cat .env - working-directory: weaver/core/identity-management/iin-agent - - - name: Start Fabric IIN Agent for network1 - run: npm run dev &> iinagent-n1.out & - working-directory: weaver/core/identity-management/iin-agent - - - name: Start Fabric IIN Agent for network2 - run: IIN_AGENT_ENDPOINT=localhost:9501 SECURITY_DOMAIN=network2 CONFIG_PATH=./src/fabric-ledger/config-n2.json npm run dev &> iinagent-n2.out & - working-directory: weaver/core/identity-management/iin-agent - - # CORDA DRIVER - - name: Start Corda_Network Driver - run: ./build/install/driver-corda/bin/driver-corda &> corda-driver.out & - working-directory: weaver/core/drivers/corda-driver - - - name: Start Corda_Network2 Driver - run: DRIVER_PORT=9098 ./build/install/driver-corda/bin/driver-corda &> corda2-driver.out & - working-directory: weaver/core/drivers/corda-driver - - # FABRIC CLI - - name: Setup Fabric CLI Config - run: | - echo ${GITHUB_WORKSPACE} - cp config.template.json config.json - sed -i "s##${GITHUB_WORKSPACE}/weaver#g" config.json - working-directory: weaver/samples/fabric/fabric-cli - - name: Setup Fabric CLI ENV - run: | - echo ${GITHUB_WORKSPACE} - cp .env.template .env - sed -i "s/CHAINCODE_PATH=.*/CHAINCODE_PATH=\.\/chaincode\.json/g" .env - ./bin/fabric-cli env set MEMBER_CREDENTIAL_FOLDER ${GITHUB_WORKSPACE}/weaver/samples/fabric/fabric-cli/src/data/credentials - ./bin/fabric-cli env set CONFIG_PATH ${GITHUB_WORKSPACE}/weaver/samples/fabric/fabric-cli/config.json - cat .env - cp chaincode.json.template chaincode.json - working-directory: weaver/samples/fabric/fabric-cli - - - name: Fabric CLI Configure ALL - run: ./bin/fabric-cli configure all network1 network2 - working-directory: weaver/samples/fabric/fabric-cli - - - name: Fabric Sync Membership using IIN Agent - run: | - ./bin/fabric-cli configure membership --local-network=network1 --target-network=network2 --iin-agent-endpoint=localhost:9500 - sleep 10 - tail -10 ../../../core/identity-management/iin-agent/iinagent-n1.out - ./bin/fabric-cli configure membership --local-network=network2 --target-network=network1 --iin-agent-endpoint=localhost:9501 - sleep 10 - tail -10 ../../../core/identity-management/iin-agent/iinagent-n2.out - working-directory: weaver/samples/fabric/fabric-cli - - # CORDA CLIENT - - name: Corda CLI Initialize Vault - run: make initialise-vault - working-directory: weaver/samples/corda/corda-simple-application - - - name: Data Transfer Corda Client Tests - run: | - COUNT=0 - TOTAL=8 - - # CORDA-CORDA2 - ./clients/build/install/clients/bin/clients request-state --wkey=H localhost:9081 localhost:9082/Corda_Network2/localhost:30006#com.cordaSimpleApplication.flow.GetStateByKey:H 1> tmp.out - cat tmp.out | grep "SimpleState(key=H, value=\[SimpleState(key=H, value=1" && COUNT=$(( COUNT + 1 )) && echo "PASS" - cat tmp.out - - ./clients/build/install/clients/bin/clients get-state H 1> tmp.out - cat tmp.out | grep "SimpleState(key=H, value=\[SimpleState(key=H, value=1" && COUNT=$(( COUNT + 1 )) && echo "PASS" - cat tmp.out - - # CORDA2-CORDA - - NETWORK_NAME=Corda_Network2 CORDA_PORT=30006 ./clients/build/install/clients/bin/clients request-state --wkey=C localhost:9082 localhost:9081/Corda_Network/localhost:10006#com.cordaSimpleApplication.flow.GetStateByKey:C 1> tmp.out - cat tmp.out | grep "SimpleState(key=C, value=\[SimpleState(key=C, value=20" && COUNT=$(( COUNT + 1 )) && echo "PASS" - cat tmp.out - - NETWORK_NAME=Corda_Network2 CORDA_PORT=30006 ./clients/build/install/clients/bin/clients get-state C 1> tmp.out - cat tmp.out | grep "SimpleState(key=C, value=\[SimpleState(key=C, value=20" && COUNT=$(( COUNT + 1 )) && echo "PASS" - cat tmp.out - - # CORDA - FABRIC1 - ./clients/build/install/clients/bin/clients request-state --wkey=a localhost:9081 localhost:9080/network1/mychannel:simplestate:Read:a 1> tmp.out - cat tmp.out | grep "SimpleState(key=a, value=Arcturus" && COUNT=$(( COUNT + 1 )) && echo "PASS" - cat tmp.out - - ./clients/build/install/clients/bin/clients get-state a 1> tmp.out - cat tmp.out | grep "SimpleState(key=a, value=Arcturus" && COUNT=$(( COUNT + 1 )) && echo "PASS" - cat tmp.out - - # CORDA - FABRIC2 - ./clients/build/install/clients/bin/clients request-state --wkey=Arcturus localhost:9081 localhost:9083/network2/mychannel:simplestate:Read:Arcturus 1> tmp.out - cat tmp.out | grep "SimpleState(key=Arcturus, value=17.671" && COUNT=$(( COUNT + 1 )) && echo "PASS" - cat tmp.out - - ./clients/build/install/clients/bin/clients get-state Arcturus 1> tmp.out - cat tmp.out | grep "SimpleState(key=Arcturus, value=17.671" && COUNT=$(( COUNT + 1 )) && echo "PASS" - cat tmp.out - - # RESULT - echo "Passed $COUNT/$TOTAL Tests." - - if [ $COUNT == $TOTAL ]; then - exit 0 - else - exit 1 - fi - working-directory: weaver/samples/corda/corda-simple-application - - # FABRIC CLI - - name: Data Transfer Fabric CLI Tests - run: | - COUNT=0 - TOTAL=12 - - # FABRIC2 - FABRIC1 - cp chaincode.json.template chaincode.json - ./bin/fabric-cli interop --local-network=network2 --requesting-org=Org1MSP localhost:9080/network1/mychannel:simplestate:Read:a &> tmp.out - tail -n 1 tmp.out | grep "Args: a, Arcturus" && COUNT=$(( COUNT + 1 )) && echo "PASS" - cat tmp.out - - ./bin/fabric-cli chaincode query mychannel simplestate read '["a"]' --local-network=network2 &> tmp.out - tail -n 1 tmp.out | grep "Result from network query: Arcturus" && COUNT=$(( COUNT + 1 )) && echo "PASS" - cat tmp.out - - # FABRIC2 - FABRIC1 - CONFIDENTIAL - sed -i "s/\"args\"\: \[\"a\"/\"args\"\: \[\"b\"/g" chaincode.json - ./bin/fabric-cli interop --local-network=network2 --requesting-org=Org1MSP --e2e-confidentiality=true localhost:9080/network1/mychannel:simplestate:Read:b &> tmp.out - tail -n 1 tmp.out | grep "Args: b, Betelgeuse" && COUNT=$(( COUNT + 1 )) && echo "PASS" - cat tmp.out - - ./bin/fabric-cli chaincode query mychannel simplestate read '["b"]' --local-network=network2 &> tmp.out - tail -n 1 tmp.out | grep "Result from network query: Betelgeuse" && COUNT=$(( COUNT + 1 )) && echo "PASS" - cat tmp.out - - # FABRIC1 - FABRIC2 - sed -i "s/\"args\"\: \[\"b\"/\"args\"\: \[\"Arcturus\"/g" chaincode.json - ./bin/fabric-cli interop --local-network=network1 --requesting-org=Org1MSP localhost:9083/network2/mychannel:simplestate:Read:Arcturus &> tmp.out - tail -n 1 tmp.out | grep "Args: Arcturus, 17.671" && COUNT=$(( COUNT + 1 )) && echo "PASS" - cat tmp.out - - ./bin/fabric-cli chaincode query mychannel simplestate read '["Arcturus"]' --local-network=network1 &> tmp.out - tail -n 1 tmp.out | grep "Result from network query: 17.671" && COUNT=$(( COUNT + 1 )) && echo "PASS" - cat tmp.out - - # FABRIC1 - FABRIC2 - CONFIDENTIAL - sed -i "s/\"args\"\: \[\"Arcturus\"/\"args\"\: \[\"Betelgeuse\"/g" chaincode.json - ./bin/fabric-cli interop --local-network=network1 --requesting-org=Org1MSP --e2e-confidentiality=true localhost:9083/network2/mychannel:simplestate:Read:Betelgeuse &> tmp.out - tail -n 1 tmp.out | grep "Args: Betelgeuse, 617.1" && COUNT=$(( COUNT + 1 )) && echo "PASS" - cat tmp.out - - ./bin/fabric-cli chaincode query mychannel simplestate read '["Betelgeuse"]' --local-network=network1 &> tmp.out - tail -n 1 tmp.out | grep "Result from network query: 617.1" && COUNT=$(( COUNT + 1 )) && echo "PASS" - cat tmp.out - - # FABRIC1 - CORDA - cp chaincode.json.template chaincode.json - sed -i "s/\"args\"\: \[\"a\"/\"args\"\: \[\"H\"/g" chaincode.json - ./bin/fabric-cli interop --local-network=network1 --sign=true --requesting-org=Org1MSP localhost:9081/Corda_Network/localhost:10006#com.cordaSimpleApplication.flow.GetStateByKey:H --debug=true &> tmp.out - tail -n 1 tmp.out | grep "Args: H, \[SimpleState(key=H, value=1" && COUNT=$(( COUNT + 1 )) && echo "PASS" - cat tmp.out - - ./bin/fabric-cli chaincode query mychannel simplestate read '["H"]' --local-network=network1 &> tmp.out - tail -n 1 tmp.out | grep "Result from network query: \[SimpleState(key=H, value=1" && COUNT=$(( COUNT + 1 )) && echo "PASS" - cat tmp.out - - # FABRIC2 - CORDA - cp chaincode.json.template chaincode.json - sed -i "s/\"args\"\: \[\"a\"/\"args\"\: \[\"C\"/g" chaincode.json - ./bin/fabric-cli interop --local-network=network2 --sign=true --requesting-org=Org1MSP localhost:9081/Corda_Network/localhost:10006#com.cordaSimpleApplication.flow.GetStateByKey:C --debug=true --debug=true &> tmp.out - tail -n 1 tmp.out | grep "Args: C, \[SimpleState(key=C, value=20" && COUNT=$(( COUNT + 1 )) && echo "PASS" - cat tmp.out - - ./bin/fabric-cli chaincode query mychannel simplestate read '["C"]' --local-network=network2 &> tmp.out - tail -n 1 tmp.out | grep "Result from network query: \[SimpleState(key=C, value=20" && COUNT=$(( COUNT + 1 )) && echo "PASS" - cat tmp.out - - - # RESULT - echo "Passed $COUNT/$TOTAL Tests." - - if [ $COUNT == $TOTAL ]; then - exit 0 - else - exit 1 - fi - working-directory: weaver/samples/fabric/fabric-cli - - - name: DEBUG Logs - corda partya - if: failure() - run: docker logs corda_partya_1 - - - name: DEBUG Logs - corda network2 partya - if: failure() - run: docker logs corda_network2_partya_1 - - - name: DEBUG Logs - fabric n1 relay - if: failure() - run: cat weaver/core/relay/relay-n1.out - - - name: DEBUG Logs - fabric n2 relay - if: failure() - run: cat weaver/core/relay/relay-n2.out - - - name: DEBUG Logs - corda relay - if: failure() - run: cat weaver/core/relay/relay-corda.out - - - name: DEBUG Logs - corda2 relay - if: failure() - run: cat weaver/core/relay/relay-corda2.out - - - name: DEBUG Logs - fabric n1 driver - if: failure() - run: cat weaver/core/drivers/fabric-driver/fdriver-n1.out - - - name: DEBUG Logs - fabric n2 driver - if: failure() - run: cat weaver/core/drivers/fabric-driver/fdriver-n2.out - - - name: DEBUG Logs - corda driver - if: failure() - run: cat weaver/core/drivers/corda-driver/corda-driver.out - - - name: DEBUG Logs - corda2 driver - if: failure() - run: cat weaver/core/drivers/corda-driver/corda2-driver.out diff --git a/.github/workflows/test_weaver-docker-build.yaml b/.github/workflows/test_weaver-docker-build.yaml deleted file mode 100644 index a309cd249d..0000000000 --- a/.github/workflows/test_weaver-docker-build.yaml +++ /dev/null @@ -1,176 +0,0 @@ -# Copyright IBM Corp. All Rights Reserved. -# -# SPDX-License-Identifier: CC-BY-4.0 - -name: Test All Docker Images Build - -env: - NODEJS_VERSION: v18.18.2 - -on: - push: - branches: [ main ] - paths: - - '.github/workflows/test_weaver-**' - - 'weaver/**' - - '!weaver/docs/**' - - '!weaver/rfcs/**' - - '!weaver/resources/**' - pull_request: - branches: [ main ] - paths: - - '.github/workflows/test_weaver-**' - - 'weaver/**' - - '!weaver/docs/**' - - '!weaver/rfcs/**' - - '!weaver/resources/**' - -concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} - cancel-in-progress: true - -jobs: - build_docker_relay: - # if: ${{ false }} - runs-on: ubuntu-latest - steps: - # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - - uses: actions/checkout@v3.5.2 - - - name: Build Image - run: make build-server-local - working-directory: weaver/core/relay - - build_docker_fabric_driver_local: - # if: ${{ false }} - runs-on: ubuntu-latest - steps: - # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - - uses: actions/checkout@v3.5.2 - - name: Use Node.js ${{ env.NODEJS_VERSION }} - uses: actions/setup-node@v3.6.0 - with: - node-version: ${{ env.NODEJS_VERSION }} - - - name: Use Protoc 3.15 - run: | - curl -LO https://github.com/protocolbuffers/protobuf/releases/download/v3.15.6/protoc-3.15.6-linux-x86_64.zip - unzip protoc-3.15.6-linux-x86_64.zip -d protoc - - - name: Build JS Protos (Local) - run: | - export PATH="$PATH:${GITHUB_WORKSPACE}/protoc/bin" - make build - working-directory: weaver/common/protos-js - - - name: Build Fabric Interop Node SDK (Local) - run: make build-local - working-directory: weaver/sdks/fabric/interoperation-node-sdk - - - name: Build Image (Local) - run: make build-image-local - working-directory: weaver/core/drivers/fabric-driver - - build_docker_fabric_driver_packages: - if: ${{ false }} - runs-on: ubuntu-latest - steps: - # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - - uses: actions/checkout@v3.5.2 - - - name: Setup .npmrc - run: | - cp .npmrc.template .npmrc - sed -i "s//${{ secrets.GITHUB_TOKEN }}/g" .npmrc - cat .npmrc - working-directory: weaver/core/drivers/fabric-driver - - - name: Build Image - run: make build-image - working-directory: weaver/core/drivers/fabric-driver - - build_docker_corda_driver_local: - runs-on: ubuntu-latest - steps: - # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - - uses: actions/checkout@v3.5.2 - - - name: Set up JDK 8 - uses: actions/setup-java@v3.11.0 - with: - java-version: '8' - distribution: 'adopt' - - - name: Build Protos (Local) - run: make build - working-directory: weaver/common/protos-java-kt - - - name: Build Corda Interop App (Local) - run: make build-local - working-directory: weaver/core/network/corda-interop-app - - - name: Build Corda Interop SDK (Local) - run: make build - working-directory: weaver/sdks/corda - - - name: Build Image (Local) - run: make image-local - working-directory: weaver/core/drivers/corda-driver - - build_docker_corda_driver_packages: - if: ${{ false }} - runs-on: ubuntu-latest - steps: - # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - - uses: actions/checkout@v3.5.2 - - - name: Generate github.properties - run: | - echo "Using ${GITHUB_ACTOR} user." - echo "username=${GITHUB_ACTOR}" >> github.properties - echo "password=${{ secrets.GITHUB_TOKEN }}" >> github.properties - echo "url=https://maven.pkg.github.com/${GITHUB_ACTOR}/cacti" >> github.properties - - echo "Using ${GITHUB_ACTOR} user." - echo "username=${GITHUB_ACTOR}" >> github.main.properties - echo "password=${{ secrets.GITHUB_TOKEN }}" >> github.main.properties - echo "url=https://maven.pkg.github.com/hyperledger/cacti" >> github.main.properties - - make build || mv github.main.properties github.properties - make clean - - cat github.properties - working-directory: weaver/core/drivers/corda-driver - - - name: Build Image - run: make image - working-directory: weaver/core/drivers/corda-driver - - build_docker_iin_agent_local: - runs-on: ubuntu-latest - steps: - # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - - uses: actions/checkout@v3.5.2 - - name: Use Node.js ${{ env.NODEJS_VERSION }} - uses: actions/setup-node@v3.6.0 - with: - node-version: ${{ env.NODEJS_VERSION }} - - - name: Use Protoc 3.15 - run: | - curl -LO https://github.com/protocolbuffers/protobuf/releases/download/v3.15.6/protoc-3.15.6-linux-x86_64.zip - unzip protoc-3.15.6-linux-x86_64.zip -d protoc - - - name: Build JS Protos (Local) - run: | - export PATH="$PATH:${GITHUB_WORKSPACE}/protoc/bin" - make build - working-directory: weaver/common/protos-js - - - name: Build Fabric Interop Node SDK (Local) - run: make build-local - working-directory: weaver/sdks/fabric/interoperation-node-sdk - - - name: Build Image - run: make build-image-local - working-directory: weaver/core/identity-management/iin-agent diff --git a/.github/workflows/test_weaver-go.yaml b/.github/workflows/test_weaver-go.yaml deleted file mode 100644 index 7c8bda49f0..0000000000 --- a/.github/workflows/test_weaver-go.yaml +++ /dev/null @@ -1,161 +0,0 @@ -# Copyright IBM Corp. All Rights Reserved. -# -# SPDX-License-Identifier: CC-BY-4.0 - -name: Unit Test Fabric Interop CC and Sample Chaincode - -on: - push: - branches: [ main ] - paths: - - '.github/workflows/test_weaver-**' - - 'weaver/common/protos-go/**' - - 'weaver/core/network/fabric-interop-cc/**' - - 'weaver/samples/fabric/**' - - '!weaver/samples/fabric/fabric-cli/**' - pull_request: - branches: [ main ] - paths: - - '.github/workflows/test_weaver-**' - - 'weaver/common/protos-go/**' - - 'weaver/core/network/fabric-interop-cc/**' - - 'weaver/samples/fabric/**' - - '!weaver/samples/fabric/fabric-cli/**' - -concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} - cancel-in-progress: true - -jobs: - unit_test_interopcc: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3.5.2 - - - name: Set up Go - uses: actions/setup-go@v4.0.0 - with: - go-version: '1.20.2' - - - name: Vendor - run: make run-vendor - working-directory: weaver/core/network/fabric-interop-cc/contracts/interop - - - name: Build - run: go build -v ./... - working-directory: weaver/core/network/fabric-interop-cc/contracts/interop - - - name: Test - run: go test -v ./... - working-directory: weaver/core/network/fabric-interop-cc/contracts/interop - - unit_test_assetmgmt: - # if: ${{ false }} # disable - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3.5.2 - - - name: Set up Go - uses: actions/setup-go@v4.0.0 - with: - go-version: '1.20.2' - - - name: Vendor - run: make run-vendor - working-directory: weaver/core/network/fabric-interop-cc/interfaces/asset-mgmt - - - name: Build - run: go build -v ./... - working-directory: weaver/core/network/fabric-interop-cc/interfaces/asset-mgmt - - - name: Test - run: go test -v ./... - working-directory: weaver/core/network/fabric-interop-cc/interfaces/asset-mgmt - - unit_test_simplestate: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3.5.2 - - - name: Set up Go - uses: actions/setup-go@v4.0.0 - with: - go-version: '1.20.2' - - - name: Vendor - run: make run-vendor - working-directory: weaver/samples/fabric/simplestate - - - name: Build - run: go build -v ./... - working-directory: weaver/samples/fabric/simplestate - - - name: Test - run: go test -v ./... - working-directory: weaver/samples/fabric/simplestate - - unit_test_simpleasset: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3.5.2 - - - name: Set up Go - uses: actions/setup-go@v4.0.0 - with: - go-version: '1.20.2' - - - name: Vendor - run: make run-vendor - working-directory: weaver/samples/fabric/simpleasset - - - name: Build - run: go build -v ./... - working-directory: weaver/samples/fabric/simpleasset - - - name: Test - run: go test -v ./... - working-directory: weaver/samples/fabric/simpleasset - - unit_test_simpleassetandinterop: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3.5.2 - - - name: Set up Go - uses: actions/setup-go@v4.0.0 - with: - go-version: '1.20.2' - - - name: Vendor - run: make run-vendor - working-directory: weaver/samples/fabric/simpleassetandinterop - - - name: Build - run: go build -v ./... - working-directory: weaver/samples/fabric/simpleassetandinterop - - - name: Test - run: go test -v ./... - working-directory: weaver/samples/fabric/simpleassetandinterop - - unit_test_simpleassettransfer: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3.5.2 - - - name: Set up Go - uses: actions/setup-go@v4.0.0 - with: - go-version: '1.20.2' - - - name: Vendor - run: make run-vendor - working-directory: weaver/samples/fabric/simpleassettransfer - - - name: Build - run: go build -v ./... - working-directory: weaver/samples/fabric/simpleassettransfer - - - name: Test - run: go test -v ./... - working-directory: weaver/samples/fabric/simpleassettransfer diff --git a/.github/workflows/test_weaver-node-pkgs.yaml b/.github/workflows/test_weaver-node-pkgs.yaml deleted file mode 100644 index a2ddf9005c..0000000000 --- a/.github/workflows/test_weaver-node-pkgs.yaml +++ /dev/null @@ -1,119 +0,0 @@ -# Copyright IBM Corp. All Rights Reserved. -# -# SPDX-License-Identifier: CC-BY-4.0 - -# This workflow will do a clean install of node dependencies, cache/restore them, build the source code and run tests across different versions of node -# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions - -name: Unit Test Weaver Node Packages - -env: - NODEJS_LTS_VERSION: v18.18.2 - NODEJS_NEXT_LTS_VERSION: v20.9.0 - -on: - push: - branches: [ main ] - paths: - - '.github/workflows/test_weaver-**' - - 'weaver/common/protos-js/**' - - 'weaver/sdks/fabric/interoperation-node-sdk/**' - - 'weaver/core/identity-management/**' - - 'weaver/docs/**' - pull_request: - branches: [ main ] - paths: - - '.github/workflows/test_weaver-**' - - 'weaver/common/protos-js/**' - - 'weaver/sdks/fabric/interoperation-node-sdk/**' - - 'weaver/core/identity-management/**' - - 'weaver/docs/**' - -concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} - cancel-in-progress: true - -jobs: - unit_test_weaver_node_sdk_local: - - runs-on: ubuntu-latest - - strategy: - matrix: - node-version: [v18.18.2, v20.9.0] - # See supported Node.js release schedule at https://nodejs.org/en/about/releases/ - - steps: - - uses: actions/checkout@v3.5.2 - - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v3.6.0 - with: - node-version: ${{ matrix.node-version }} - - name: Use Protoc 3.15 - run: | - curl -LO https://github.com/protocolbuffers/protobuf/releases/download/v3.15.6/protoc-3.15.6-linux-x86_64.zip - unzip protoc-3.15.6-linux-x86_64.zip -d protoc - - name: Build JS Protos - run: | - export PATH="$PATH:${GITHUB_WORKSPACE}/protoc/bin" - make build - working-directory: weaver/common/protos-js - - name: Build - run: make build-local - working-directory: weaver/sdks/fabric/interoperation-node-sdk - - name: Tests - run: npm run test - working-directory: weaver/sdks/fabric/interoperation-node-sdk - - unit_test_iin_agent_local: - - runs-on: ubuntu-latest - - strategy: - matrix: - node-version: [v18.18.2] - # See supported Node.js release schedule at https://nodejs.org/en/about/releases/ - - steps: - - uses: actions/checkout@v3.5.2 - - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v3.6.0 - with: - node-version: ${{ matrix.node-version }} - - name: Use Protoc 3.15 - run: | - curl -LO https://github.com/protocolbuffers/protobuf/releases/download/v3.15.6/protoc-3.15.6-linux-x86_64.zip - unzip protoc-3.15.6-linux-x86_64.zip -d protoc - - name: Build JS Protos - run: | - export PATH="$PATH:${GITHUB_WORKSPACE}/protoc/bin" - make build - working-directory: weaver/common/protos-js - - name: Build - run: make build-local - working-directory: weaver/sdks/fabric/interoperation-node-sdk - - name: Build IIN Agent - run: make build-local - working-directory: weaver/core/identity-management/iin-agent - - name: Tests - run: npm run test - working-directory: weaver/core/identity-management/iin-agent - - build_docs: - runs-on: ubuntu-latest - steps: - # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - - uses: actions/checkout@v3.5.2 - - - name: Use Node.js ${{ env.NODEJS_LTS_VERSION }} - uses: actions/setup-node@v3.6.0 - with: - node-version: ${{ env.NODEJS_LTS_VERSION }} - - - name: NPM INSTALL - run: npm install - working-directory: weaver/docs - - - name: Build - run: npm run build - working-directory: weaver/docs diff --git a/.github/workflows/test_weaver-pre-release.yaml b/.github/workflows/test_weaver-pre-release.yaml deleted file mode 100644 index 9d2704ac49..0000000000 --- a/.github/workflows/test_weaver-pre-release.yaml +++ /dev/null @@ -1,163 +0,0 @@ -# Copyright IBM Corp. All Rights Reserved. -# -# SPDX-License-Identifier: CC-BY-4.0 - -name: Pre-release Test Weaver Module versions - -on: - pull_request: - branches: - - main - -concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} - cancel-in-progress: true - -jobs: - check_release: - outputs: - status: ${{ steps.early.outputs.status }} - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3.5.2 - - - name: Ignore if not a release PR - id: early - run : | - status="skip" - if echo "${{ github.event.pull_request.title }}" | grep -q "chore(release)"; then - status="continue" - fi - echo "status=$status" >> $GITHUB_OUTPUT - - test_weaver_pre-release: - needs: check_release - if: needs.check_release.outputs.status == 'continue' - runs-on: ubuntu-latest - steps: - # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - - uses: actions/checkout@v3.5.2 - - - name: Get release verison from PR title - run: | - # Assuming release PR follows pattern: chore(release): publish vA.B.C - # Split PR title by space, and take 3rd word - VERSION=$(echo "${{ github.event.pull_request.title }}" | cut -d ' ' -f 3) - # Strip "v" from version - VERSION=$(echo $VERSION | sed -e 's/^v//') - echo "VERSION=$VERSION" >> $GITHUB_ENV - echo $VERSION - - # Gradle - - name: check weaver/common/protos-java-kt/gradle.properties - run: cat gradle.properties | grep "version=" | grep $VERSION || exit 1 - working-directory: weaver/common/protos-java-kt - - - name: check weaver/core/network/corda-interop-app/gradle.properties - run: cat gradle.properties | grep "version=" | grep $VERSION || exit 1 - working-directory: weaver/core/network/corda-interop-app - - - name: check weaver/sdks/corda/gradle.properties - run: cat gradle.properties | grep "version=" | grep $VERSION || exit 1 - working-directory: weaver/sdks/corda - - - name: check weaver/core/drivers/corda-driver/gradle.properties - run: cat gradle.properties | grep "version=" | grep $VERSION || exit 1 - working-directory: weaver/core/drivers/corda-driver - - # NodeJS - - name: check weaver/common/protos-js/package.json - run: cat package.json | grep "version" | grep $VERSION || exit 1 - working-directory: weaver/common/protos-js - - - name: check weaver/sdks/fabric/interoperation-node-sdk/package.json - run: cat package.json | grep "version" | grep $VERSION || exit 1 - working-directory: weaver/sdks/fabric/interoperation-node-sdk - - - name: check weaver/sdks/besu/node/package.json - run: cat package.json | grep "version" | grep $VERSION || exit 1 - working-directory: weaver/sdks/besu/node - - - name: check weaver/core/drivers/fabric-driver/package.json - run: cat package.json | grep "version" | grep $VERSION || exit 1 - working-directory: weaver/core/drivers/fabric-driver - - - name: check weaver/core/identity-management/iin-agent/package.json - run: cat package.json | grep "version" | grep $VERSION || exit 1 - working-directory: weaver/core/identity-management/iin-agent - - # Rust - - name: check weaver/common/protos-rs/pkg/Cargo.toml - run: cat Cargo.toml | grep "^version" | grep $VERSION || exit 1 - working-directory: weaver/common/protos-rs/pkg - - - name: check weaver/core/relay/Cargo.toml - run: cat Cargo.toml | grep "^version" | grep $VERSION || exit 1 - working-directory: weaver/core/relay - - # Docker - - name: check weaver/core/drivers/corda-driver/VERSION - run: cat VERSION | grep $VERSION || exit 1 - working-directory: weaver/core/drivers/corda-driver - - - name: check weaver/core/drivers/fabric-driver/VERSION - run: cat VERSION | grep $VERSION || exit 1 - working-directory: weaver/core/drivers/fabric-driver - - - name: check weaver/core/identity-management/iin-agent/VERSION - run: cat VERSION | grep $VERSION || exit 1 - working-directory: weaver/core/identity-management/iin-agent - - - name: check weaver/core/relay/VERSION - run: cat VERSION | grep $VERSION || exit 1 - working-directory: weaver/core/relay - - # GO - - name: check weaver/common/protos-go/VERSION - run: cat VERSION | grep $VERSION || exit 1 - working-directory: weaver/common/protos-go - - - name: check weaver/core/network/fabric-interop-cc/libs/utils/VERSION - run: cat VERSION | grep $VERSION || exit 1 - working-directory: weaver/core/network/fabric-interop-cc/libs/utils - - - name: check weaver/core/network/fabric-interop-cc/libs/assetexchange/VERSION - run: cat VERSION | grep $VERSION || exit 1 - working-directory: weaver/core/network/fabric-interop-cc/libs/assetexchange - - - name: check weaver/core/network/fabric-interop-cc/interfaces/asset-mgmt/VERSION - run: cat VERSION | grep $VERSION || exit 1 - working-directory: weaver/core/network/fabric-interop-cc/interfaces/asset-mgmt - - - name: check weaver/core/network/fabric-interop-cc/contracts/interop/VERSION - run: cat VERSION | grep $VERSION || exit 1 - working-directory: weaver/core/network/fabric-interop-cc/contracts/interop - - - name: check weaver/sdks/fabric/go-sdk/VERSION - run: cat VERSION | grep $VERSION || exit 1 - working-directory: weaver/sdks/fabric/go-sdk - - test_weaver_go_pre-release: - needs: check_release - if: needs.check_release.outputs.status == 'continue' - runs-on: ubuntu-latest - steps: - # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - - uses: actions/checkout@v3.5.2 - - - name: Get release verison from PR title - run: | - # Assuming release PR follows pattern: chore(release): publish vA.B.C - # Split PR title by space, and take 3rd word - VERSION=$(echo "${{ github.event.pull_request.title }}" | cut -d ' ' -f 3) - # Strip "v" from version - VERSION=$(echo $VERSION | sed -e 's/^v//') - echo "VERSION=$VERSION" >> $GITHUB_ENV - echo $VERSION - - - name: Update GO Checksum - run: ./go-gen-checksum.sh $VERSION - working-directory: tools - - - name: Check if changes are committed - run: (git status | grep "nothing to commit, working tree clean") || (echo "go-gen-checksum not called before release commit" && exit 1) diff --git a/.github/workflows/test_weaver-relay.yaml b/.github/workflows/test_weaver-relay.yaml deleted file mode 100644 index e418407f5b..0000000000 --- a/.github/workflows/test_weaver-relay.yaml +++ /dev/null @@ -1,204 +0,0 @@ -# Copyright IBM Corp. All Rights Reserved. -# -# SPDX-License-Identifier: CC-BY-4.0 - -name: Unit Test Relay - -on: - push: - branches: [ main ] - paths: - - '.github/workflows/test_weaver-**' - - 'weaver/common/protos-rs/**' - - 'weaver/core/relay/**' - pull_request: - branches: [ main ] - paths: - - '.github/workflows/test_weaver-**' - - 'weaver/common/protos-rs/**' - - 'weaver/core/relay/**' - -concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} - cancel-in-progress: true - -jobs: - unit_test_relay_local: - # if: ${{ false }} - runs-on: ubuntu-latest - steps: - # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - - uses: actions/checkout@v3.5.2 - - - name: Install RUST Toolchain minimal stable with clippy and rustfmt - uses: actions-rs/toolchain@v1.0.6 - with: - profile: minimal - toolchain: stable - components: rustfmt, clippy - - - name: Use Protoc 3.15 - run: | - curl -LO https://github.com/protocolbuffers/protobuf/releases/download/v3.15.6/protoc-3.15.6-linux-x86_64.zip - unzip protoc-3.15.6-linux-x86_64.zip -d protoc - - - name: Build Protos RS - run: | - export PATH="$PATH:${GITHUB_WORKSPACE}/protoc/bin" - make build - working-directory: weaver/common/protos-rs - - - name: Get Latest Relay Dependencies - run: | - make protos-local - cargo update -p nom - cargo update -p lexical-core - working-directory: weaver/core/relay - - - name: Build Image - run: make - working-directory: weaver/core/relay - - - name: Run Dummy Relay - run: RELAY_CONFIG=config/Dummy_Relay.toml cargo run --bin server &> relay-dummy.out & - working-directory: weaver/core/relay - - - name: Run Dummy Driver - run: RELAY_CONFIG=config/Dummy_Relay.toml cargo run --bin dummy-driver &> driver-dummy.out & - working-directory: weaver/core/relay - - - name: Mock Client Test - run: | - echo "Waiting for Dummy Relay and Driver to come up" - sleep 30 - cargo run --bin client 9085 localhost:9085/Dummy_Network/abc:abc:abc:abc - working-directory: weaver/core/relay - - unit_test_relay_tls_local: - # if: ${{ false }} - runs-on: ubuntu-latest - steps: - # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - - uses: actions/checkout@v3.5.2 - - - name: Install RUST Toolchain minimal stable with clippy and rustfmt - uses: actions-rs/toolchain@v1.0.6 - with: - profile: minimal - toolchain: stable - components: rustfmt, clippy - - - name: Use Protoc 3.15 - run: | - curl -LO https://github.com/protocolbuffers/protobuf/releases/download/v3.15.6/protoc-3.15.6-linux-x86_64.zip - unzip protoc-3.15.6-linux-x86_64.zip -d protoc - - - name: Build Protos RS - run: | - export PATH="$PATH:${GITHUB_WORKSPACE}/protoc/bin" - make build - working-directory: weaver/common/protos-rs - - - name: Get Latest Relay Dependencies - run: | - make protos-local - cargo update -p nom - cargo update -p lexical-core - working-directory: weaver/core/relay - - - name: Build Image - run: make - working-directory: weaver/core/relay - - - name: Run Dummy Relay - run: RELAY_CONFIG=config/Dummy_Relay_tls.toml cargo run --bin server &> relay-dummy.out & - working-directory: weaver/core/relay - - - name: Run Dummy Driver - run: RELAY_CONFIG=config/Dummy_Relay_tls.toml cargo run --bin dummy-driver &> driver-dummy.out & - working-directory: weaver/core/relay - - - name: Mock Client Test - run: | - echo "Waiting for Dummy Relay and Driver to come up" - sleep 30 - cargo run --bin client-tls 9085 localhost:9085/Dummy_Network/abc:abc:abc:abc - working-directory: weaver/core/relay - - unit_test_relay: - if: ${{ false }} - runs-on: ubuntu-latest - steps: - # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - - uses: actions/checkout@v3.5.2 - - - name: Install RUST Toolchain minimal stable with clippy and rustfmt - uses: actions-rs/toolchain@v1.0.6 - with: - profile: minimal - toolchain: stable - components: rustfmt, clippy - - - name: Get Latest Relay Dependencies - run: | - cargo update -p nom - cargo update -p lexical-core - working-directory: weaver/core/relay - - - name: Build Image - run: make build - working-directory: weaver/core/relay - - - name: Run Dummy Relay - run: RELAY_CONFIG=config/Dummy_Relay.toml cargo run --bin server &> relay-dummy.out & - working-directory: weaver/core/relay - - - name: Run Dummy Driver - run: RELAY_CONFIG=config/Dummy_Relay.toml cargo run --bin dummy-driver &> driver-dummy.out & - working-directory: weaver/core/relay - - - name: Mock Client Test - run: | - echo "Waiting for Dummy Relay and Driver to come up" - sleep 30 - cargo run --bin client 9085 localhost:9085/Dummy_Network/abc:abc:abc:abc - working-directory: weaver/core/relay - - unit_test_relay_tls: - if: ${{ false }} - runs-on: ubuntu-latest - steps: - # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - - uses: actions/checkout@v3.5.2 - - - name: Install RUST Toolchain minimal stable with clippy and rustfmt - uses: actions-rs/toolchain@v1.0.6 - with: - profile: minimal - toolchain: stable - components: rustfmt, clippy - - - name: Get Latest Relay Dependencies - run: | - cargo update -p nom - cargo update -p lexical-core - working-directory: weaver/core/relay - - - name: Build Image - run: make build - working-directory: weaver/core/relay - - - name: Run Dummy Relay - run: RELAY_CONFIG=config/Dummy_Relay_tls.toml cargo run --bin server &> relay-dummy.out & - working-directory: weaver/core/relay - - - name: Run Dummy Driver - run: RELAY_CONFIG=config/Dummy_Relay_tls.toml cargo run --bin dummy-driver &> driver-dummy.out & - working-directory: weaver/core/relay - - - name: Mock Client Test - run: | - echo "Waiting for Dummy Relay and Driver to come up" - sleep 30 - cargo run --bin client-tls 9085 localhost:9085/Dummy_Network/abc:abc:abc:abc - working-directory: weaver/core/relay diff --git a/.github/workflows/trivy.yaml b/.github/workflows/trivy.yaml new file mode 100644 index 0000000000..ee22843be6 --- /dev/null +++ b/.github/workflows/trivy.yaml @@ -0,0 +1,27 @@ +name: build +on: + push: + branches: + - main + pull_request: +jobs: + build: + name: Build + runs-on: ubuntu-20.04 + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: Run Trivy vulnerability scanner in repo mode + uses: aquasecurity/trivy-action@master + with: + scan-type: 'fs' + ignore-unfixed: true + format: 'sarif' + output: 'trivy-results.sarif' + severity: 'CRITICAL' + + - name: Upload Trivy scan results to GitHub Security tab + uses: github/codeql-action/upload-sarif@v2 + with: + sarif_file: 'trivy-results.sarif' diff --git a/.github/workflows/weaver_deploy_corda-pkgs.yml b/.github/workflows/weaver_deploy_corda-pkgs.yml deleted file mode 100644 index f37519b66b..0000000000 --- a/.github/workflows/weaver_deploy_corda-pkgs.yml +++ /dev/null @@ -1,171 +0,0 @@ -# Copyright IBM Corp. All Rights Reserved. -# -# SPDX-License-Identifier: CC-BY-4.0 - -name: Deploy Corda Packages - -on: - push: - tags: - - v* - - # Allows you to run this workflow manually from the Actions tab - workflow_dispatch: - -jobs: - publish-protos-java-kt: - runs-on: ubuntu-latest - permissions: - packages: write - contents: read - - steps: - # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - - uses: actions/checkout@v3.5.2 - - - name: Set up JDK 8 - uses: actions/setup-java@v3.11.0 - with: - java-version: '8' - distribution: 'adopt' - - - name: Generate github.properties - run: | - echo "Using ${GITHUB_ACTOR} user." - echo "username=${GITHUB_ACTOR}" >> github.properties - echo "password=${{ secrets.GITHUB_TOKEN }}" >> github.properties - echo "url=https://maven.pkg.github.com/${GITHUB_REPOSITORY_OWNER}/cacti" >> github.properties - cat github.properties - working-directory: weaver/common/protos-java-kt - - - name: Publish - run: | - make publish > out 2> error - exitStatus=$? - cat out - cat error - (cat error | grep "Received status code 409 from server: Conflict" && exit 0) || exit $exitStatus - working-directory: weaver/common/protos-java-kt - - - publish-interop-app: - if: always() - needs: publish-protos-java-kt - runs-on: ubuntu-latest - permissions: - packages: write - contents: read - - steps: - # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - - uses: actions/checkout@v3.5.2 - - - name: Set up JDK 8 - uses: actions/setup-java@v3.11.0 - with: - java-version: '8' - distribution: 'adopt' - - - name: Generate github.properties - run: | - echo "Using ${GITHUB_ACTOR} user." - echo "username=${GITHUB_ACTOR}" >> github.properties - echo "password=${{ secrets.GITHUB_TOKEN }}" >> github.properties - echo "url=https://maven.pkg.github.com/${GITHUB_REPOSITORY_OWNER}/cacti" >> github.properties - cat github.properties - working-directory: weaver/core/network/corda-interop-app - - - name: Build - run: make build - working-directory: weaver/core/network/corda-interop-app - - - name: Publish - run: | - make publish > out 2> error - exitStatus=$? - cat out - cat error - (cat error | grep "Received status code 409 from server: Conflict" && exit 0) || exit $exitStatus - working-directory: weaver/core/network/corda-interop-app - - publish-sdk: - if: always() - needs: [publish-protos-java-kt, publish-interop-app] - runs-on: ubuntu-latest - permissions: - packages: write - contents: read - - steps: - # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - - uses: actions/checkout@v3.5.2 - - - name: Set up JDK 8 - uses: actions/setup-java@v3.11.0 - with: - java-version: '8' - distribution: 'adopt' - - - name: Generate github.properties - run: | - echo "Using ${GITHUB_ACTOR} user." - echo "username=${GITHUB_ACTOR}" >> github.properties - echo "password=${{ secrets.GITHUB_TOKEN }}" >> github.properties - echo "url=https://maven.pkg.github.com/${GITHUB_REPOSITORY_OWNER}/cacti" >> github.properties - cat github.properties - working-directory: weaver/sdks/corda - - - name: Build - run: make build - working-directory: weaver/sdks/corda - - - name: Publish - run: | - make publish > out 2> error - exitStatus=$? - cat out - cat error - (cat error | grep "Received status code 409 from server: Conflict" && exit 0) || exit $exitStatus - working-directory: weaver/sdks/corda - - publish-driver-image: - if: ${{ always() && github.repository_owner == 'hyperledger' }} - needs: [publish-protos-java-kt, publish-interop-app, publish-sdk] - runs-on: ubuntu-latest - permissions: - packages: write - contents: read - - steps: - # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - - uses: actions/checkout@v3.5.2 - - - name: Login to GitHub Container Registry - uses: docker/login-action@v2.1.0 - with: - registry: ghcr.io - username: ${{ github.actor }} - password: ${{ secrets.GITHUB_TOKEN }} - - - name: Generate github.properties - run: | - echo "Using ${GITHUB_ACTOR} user." - echo "username=${GITHUB_ACTOR}" >> github.properties - echo "password=${{ secrets.GITHUB_TOKEN }}" >> github.properties - echo "url=https://maven.pkg.github.com/${GITHUB_REPOSITORY_OWNER}/cacti" >> github.properties - cat github.properties - working-directory: weaver/core/drivers/corda-driver - - - name: Check if package already exists - run: (make check-if-tag-exists && echo "CORDA_DRIVER_PUSH=true" >> $GITHUB_ENV) || echo "CORDA_DRIVER_PUSH=false" >> $GITHUB_ENV - working-directory: weaver/core/drivers/corda-driver - - - name: Build and Push - if: ${{ env.CORDA_DRIVER_PUSH == 'true' }} - run: make push-image - working-directory: weaver/core/drivers/corda-driver - - - name: Push latest tag - if: ${{ env.CORDA_DRIVER_PUSH == 'true' }} - run: make push-image-latest - working-directory: weaver/core/drivers/corda-driver diff --git a/.github/workflows/weaver_deploy_go-pkgs.yml b/.github/workflows/weaver_deploy_go-pkgs.yml deleted file mode 100644 index c58630d9c1..0000000000 --- a/.github/workflows/weaver_deploy_go-pkgs.yml +++ /dev/null @@ -1,429 +0,0 @@ -# Copyright IBM Corp. All Rights Reserved. -# -# SPDX-License-Identifier: CC-BY-4.0 - -name: Deploy Go Modules - -on: - push: - tags: - - v* - - # Allows you to run this workflow manually from the Actions tab - workflow_dispatch: - -jobs: - publish-protos-go: - if: github.repository_owner == 'hyperledger' - runs-on: ubuntu-latest - steps: - # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - - uses: actions/checkout@v3.5.2 - - - name: Set current date as env - run: echo "RELEASE_DATE=$(date +%b\ %d,\ %Y)" >> $GITHUB_ENV - - - name: Set module tag and description - run: | - echo "MODULE_TAG=weaver/common/protos-go" >> $GITHUB_ENV - echo "MODULE_DESC=GO Weaver Protos" >> $GITHUB_ENV - - - name: Update version - run: | - VERSION=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,') - # Strip "v" prefix from tag name - [[ "${{ github.ref }}" == "refs/tags/"* ]] && VERSION=$(echo $VERSION | sed -e 's/^v//') - echo $VERSION - if [[ $VERSION =~ ^[0-9]+\.[0-9]+\.[0-9]+[A-Za-z\-]*$ ]]; then - echo -n $VERSION > VERSION - fi - cat VERSION - working-directory: weaver/common/protos-go - - - name: Set module version - run: echo "VERSION=v$(cat VERSION)" >> $GITHUB_ENV - working-directory: weaver/common/protos-go - - - name: Check if release already exists - run: (git ls-remote origin | grep "$MODULE_TAG/$VERSION" && echo "PROTOS_GO_RELEASE=false" >> $GITHUB_ENV) || echo "PROTOS_GO_RELEASE=true" >> $GITHUB_ENV - working-directory: weaver/common/protos-go - - - name: Create Release - if: ${{ env.PROTOS_GO_RELEASE == 'true' }} - id: protos-go-release - uses: actions/create-release@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token - with: - tag_name: ${{ env.MODULE_TAG }}/${{ env.VERSION }} - release_name: ${{ env.VERSION }} - ${{ env.MODULE_DESC }} - ${{ env.RELEASE_DATE }} - body: | - - Go Module: `github.com/${{ github.repository_owner }}/cacti/${{ env.MODULE_TAG }}` - - Release: ${{ env.VERSION }} - - Readme: [Here](https://github.com/${{ github.repository_owner }}/cacti/blob/${{ env.MODULE_TAG }}/${{ env.VERSION }}/${{ env.MODULE_TAG }}/README.md). - - Source: [Here](https://github.com/${{ github.repository_owner }}/cacti/blob/${{ env.MODULE_TAG }}/${{ env.VERSION }}/${{ env.MODULE_TAG }}) - draft: false - prerelease: false - - - name: Wait for release to be reflected - if: ${{ env.PROTOS_GO_RELEASE == 'true' }} - run: sleep 300 - - publish-lib-utils: - if: ${{ always() && github.repository_owner == 'hyperledger' }} - needs: publish-protos-go - runs-on: ubuntu-latest - steps: - # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - - uses: actions/checkout@v3.5.2 - - - name: Set up Go - uses: actions/setup-go@v4.0.0 - with: - go-version: '1.20.2' - - - name: Set current date as env - run: echo "RELEASE_DATE=$(date +%b\ %d,\ %Y)" >> $GITHUB_ENV - - - name: Set module tag and description - run: | - echo "MODULE_TAG=weaver/core/network/fabric-interop-cc/libs/utils" >> $GITHUB_ENV - echo "MODULE_DESC=GO Fabric Utils Library for Interoperation" >> $GITHUB_ENV - - - name: Update version - run: | - VERSION=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,') - # Strip "v" prefix from tag name - [[ "${{ github.ref }}" == "refs/tags/"* ]] && VERSION=$(echo $VERSION | sed -e 's/^v//') - echo $VERSION - if [[ $VERSION =~ ^[0-9]+\.[0-9]+\.[0-9]+[A-Za-z\-]*$ ]]; then - echo -n $VERSION > VERSION - fi - cat VERSION - working-directory: weaver/core/network/fabric-interop-cc/libs/utils - - - name: Set module version - run: echo "VERSION=v$(cat VERSION)" >> $GITHUB_ENV - working-directory: weaver/core/network/fabric-interop-cc/libs/utils - - - name: Build test - run: go build -v ./... - working-directory: weaver/core/network/fabric-interop-cc/libs/utils - - - name: Check if release already exists - run: (git ls-remote origin | grep "$MODULE_TAG/$VERSION" && echo "LIB_UTILS_RELEASE=false" >> $GITHUB_ENV) || echo "LIB_UTILS_RELEASE=true" >> $GITHUB_ENV - working-directory: weaver/core/network/fabric-interop-cc/libs/utils - - - name: Create Release - if: ${{ env.LIB_UTILS_RELEASE == 'true' }} - id: lib-utils-release - uses: actions/create-release@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token - with: - tag_name: ${{ env.MODULE_TAG }}/${{ env.VERSION }} - release_name: ${{ env.VERSION }} - ${{ env.MODULE_DESC }} - ${{ env.RELEASE_DATE }} - body: | - - Go Module: `github.com/${{ github.repository_owner }}/cacti/${{ env.MODULE_TAG }}` - - Release: ${{ env.VERSION }} - - Readme: [Here](https://github.com/${{ github.repository_owner }}/cacti/blob/${{ env.MODULE_TAG }}/${{ env.VERSION }}/${{ env.MODULE_TAG }}/README.md). - - Source: [Here](https://github.com/${{ github.repository_owner }}/cacti/blob/${{ env.MODULE_TAG }}/${{ env.VERSION }}/${{ env.MODULE_TAG }}) - draft: false - prerelease: false - - - name: Wait for release to be reflected - if: ${{ env.LIB_UTILS_RELEASE == 'true' }} - run: sleep 300 - - publish-lib-asset-exchange: - if: ${{ always() && github.repository_owner == 'hyperledger' }} - needs: publish-protos-go - runs-on: ubuntu-latest - steps: - # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - - uses: actions/checkout@v3.5.2 - - - name: Set up Go - uses: actions/setup-go@v4.0.0 - with: - go-version: '1.20.2' - - - name: Set current date as env - run: echo "RELEASE_DATE=$(date +%b\ %d,\ %Y)" >> $GITHUB_ENV - - - name: Set module tag and description - run: | - echo "MODULE_TAG=weaver/core/network/fabric-interop-cc/libs/assetexchange" >> $GITHUB_ENV - echo "MODULE_DESC=GO Fabric Library for Asset Exchange" >> $GITHUB_ENV - - - name: Update version - run: | - VERSION=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,') - # Strip "v" prefix from tag name - [[ "${{ github.ref }}" == "refs/tags/"* ]] && VERSION=$(echo $VERSION | sed -e 's/^v//') - echo $VERSION - if [[ $VERSION =~ ^[0-9]+\.[0-9]+\.[0-9]+[A-Za-z\-]*$ ]]; then - echo -n $VERSION > VERSION - fi - cat VERSION - working-directory: weaver/core/network/fabric-interop-cc/libs/assetexchange - - - name: Set module version - run: echo "VERSION=v$(cat VERSION)" >> $GITHUB_ENV - working-directory: weaver/core/network/fabric-interop-cc/libs/assetexchange - - - name: Build test - run: go build -v ./... - working-directory: weaver/core/network/fabric-interop-cc/libs/assetexchange - - - name: Check if release already exists - run: (git ls-remote origin | grep "$MODULE_TAG/$VERSION" && echo "LIB_ASSET_EXCHANGE_RELEASE=false" >> $GITHUB_ENV) || echo "LIB_ASSET_EXCHANGE_RELEASE=true" >> $GITHUB_ENV - working-directory: weaver/core/network/fabric-interop-cc/libs/assetexchange - - - name: Create Release - if: ${{ env.LIB_ASSET_EXCHANGE_RELEASE == 'true' }} - id: lib-asset-exchange-release - uses: actions/create-release@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token - with: - tag_name: ${{ env.MODULE_TAG }}/${{ env.VERSION }} - release_name: ${{ env.VERSION }} - ${{ env.MODULE_DESC }} - ${{ env.RELEASE_DATE }} - body: | - - Go Module: `github.com/${{ github.repository_owner }}/cacti/${{ env.MODULE_TAG }}` - - Release: ${{ env.VERSION }} - - Readme: [Here](https://github.com/${{ github.repository_owner }}/cacti/blob/${{ env.MODULE_TAG }}/${{ env.VERSION }}/${{ env.MODULE_TAG }}/README.md). - - Source: [Here](https://github.com/${{ github.repository_owner }}/cacti/blob/${{ env.MODULE_TAG }}/${{ env.VERSION }}/${{ env.MODULE_TAG }}) - draft: false - prerelease: false - - - name: Wait for release to be reflected - if: ${{ env.LIB_ASSET_EXCHANGE_RELEASE == 'true' }} - run: sleep 300 - - publish-interface-asset-mgmt: - if: ${{ always() && github.repository_owner == 'hyperledger' }} - needs: [publish-protos-go] - runs-on: ubuntu-latest - steps: - # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - - uses: actions/checkout@v3.5.2 - - - name: Set up Go - uses: actions/setup-go@v4.0.0 - with: - go-version: '1.20.2' - - - name: Set current date as env - run: echo "RELEASE_DATE=$(date +%b\ %d,\ %Y)" >> $GITHUB_ENV - - - name: Set module tag and description - run: | - echo "MODULE_TAG=weaver/core/network/fabric-interop-cc/interfaces/asset-mgmt" >> $GITHUB_ENV - echo "MODULE_DESC=GO Fabric Asset Management Interface" >> $GITHUB_ENV - - - name: Update version - run: | - VERSION=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,') - # Strip "v" prefix from tag name - [[ "${{ github.ref }}" == "refs/tags/"* ]] && VERSION=$(echo $VERSION | sed -e 's/^v//') - echo $VERSION - if [[ $VERSION =~ ^[0-9]+\.[0-9]+\.[0-9]+[A-Za-z\-]*$ ]]; then - echo -n $VERSION > VERSION - fi - cat VERSION - working-directory: weaver/core/network/fabric-interop-cc/interfaces/asset-mgmt - - - name: Set module version - run: echo "VERSION=v$(cat VERSION)" >> $GITHUB_ENV - working-directory: weaver/core/network/fabric-interop-cc/interfaces/asset-mgmt - - - name: Build test - run: go build -v ./... - working-directory: weaver/core/network/fabric-interop-cc/interfaces/asset-mgmt - - - name: Check if release already exists - run: (git ls-remote origin | grep "$MODULE_TAG/$VERSION" && echo "INTERFACE_ASSET_MGMT_RELEASE=false" >> $GITHUB_ENV) || echo "INTERFACE_ASSET_MGMT_RELEASE=true" >> $GITHUB_ENV - working-directory: weaver/core/network/fabric-interop-cc/interfaces/asset-mgmt - - - name: Create Release - if: ${{ env.INTERFACE_ASSET_MGMT_RELEASE == 'true' }} - id: asset-mgmt-release - uses: actions/create-release@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token - with: - tag_name: ${{ env.MODULE_TAG }}/${{ env.VERSION }} - release_name: ${{ env.VERSION }} - ${{ env.MODULE_DESC }} - ${{ env.RELEASE_DATE }} - body: | - - Go Module: `github.com/${{ github.repository_owner }}/cacti/${{ env.MODULE_TAG }}` - - Release: ${{ env.VERSION }} - - Readme: [Here](https://github.com/${{ github.repository_owner }}/cacti/blob/${{ env.MODULE_TAG }}/${{ env.VERSION }}/${{ env.MODULE_TAG }}/README.md). - - Source: [Here](https://github.com/${{ github.repository_owner }}/cacti/blob/${{ env.MODULE_TAG }}/${{ env.VERSION }}/${{ env.MODULE_TAG }}) - draft: false - prerelease: false - - - name: Wait for release to be reflected - if: ${{ env.INTERFACE_ASSET_MGMT_RELEASE == 'true' }} - run: sleep 300 - - publish-interop-cc: - if: ${{ always() && github.repository_owner == 'hyperledger' }} - needs: [publish-protos-go, publish-lib-utils, publish-lib-asset-exchange] - runs-on: ubuntu-latest - steps: - # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - - uses: actions/checkout@v3.5.2 - - - name: Set up Go - uses: actions/setup-go@v4.0.0 - with: - go-version: '1.20.2' - - - name: Set current date as env - run: echo "RELEASE_DATE=$(date +%b\ %d,\ %Y)" >> $GITHUB_ENV - - - name: Set module tag and description - run: | - echo "MODULE_TAG=weaver/core/network/fabric-interop-cc/contracts/interop" >> $GITHUB_ENV - echo "MODULE_DESC=GO Fabric Interop Chaincode" >> $GITHUB_ENV - - - name: Update version - run: | - VERSION=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,') - # Strip "v" prefix from tag name - [[ "${{ github.ref }}" == "refs/tags/"* ]] && VERSION=$(echo $VERSION | sed -e 's/^v//') - echo $VERSION - if [[ $VERSION =~ ^[0-9]+\.[0-9]+\.[0-9]+[A-Za-z\-]*$ ]]; then - echo -n $VERSION > VERSION - fi - cat VERSION - working-directory: weaver/core/network/fabric-interop-cc/contracts/interop - - - name: Set module version - run: echo "VERSION=v$(cat VERSION)" >> $GITHUB_ENV - working-directory: weaver/core/network/fabric-interop-cc/contracts/interop - - - name: Build test - run: make build - working-directory: weaver/core/network/fabric-interop-cc/contracts/interop - - - name: Check if release already exists - run: (git ls-remote origin | grep "$MODULE_TAG/$VERSION" && echo "INTEROPCC_RELEASE=false" >> $GITHUB_ENV) || echo "INTEROPCC_RELEASE=true" >> $GITHUB_ENV - working-directory: weaver/core/network/fabric-interop-cc/contracts/interop - - - name: Create Release - if: ${{ env.INTEROPCC_RELEASE == 'true' }} - id: interop-cc-release - uses: actions/create-release@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token - with: - tag_name: ${{ env.MODULE_TAG }}/${{ env.VERSION }} - release_name: ${{ env.VERSION }} - ${{ env.MODULE_DESC }} - ${{ env.RELEASE_DATE }} - body: | - - Go Module: `github.com/${{ github.repository_owner }}/cacti/${{ env.MODULE_TAG }}` - - Release: ${{ env.VERSION }} - - Readme: [Here](https://github.com/${{ github.repository_owner }}/cacti/blob/${{ env.MODULE_TAG }}/${{ env.VERSION }}/${{ env.MODULE_TAG }}/README.md). - - Source: [Here](https://github.com/${{ github.repository_owner }}/cacti/blob/${{ env.MODULE_TAG }}/${{ env.VERSION }}/${{ env.MODULE_TAG }}) - draft: false - prerelease: false - - - name: Wait for release to be reflected - if: ${{ env.INTEROPCC_RELEASE == 'true' }} - run: sleep 300 - - publish-go-sdk: - if: ${{ always() && github.repository_owner == 'hyperledger' }} - needs: [publish-protos-go] - runs-on: ubuntu-latest - steps: - # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - - uses: actions/checkout@v3.5.2 - - - name: Set up Go - uses: actions/setup-go@v4.0.0 - with: - go-version: '1.20.2' - - - name: Set current date as env - run: echo "RELEASE_DATE=$(date +%b\ %d,\ %Y)" >> $GITHUB_ENV - - - name: Set module tag and description - run: | - echo "MODULE_TAG=weaver/sdks/fabric/go-sdk" >> $GITHUB_ENV - echo "MODULE_DESC=GO Fabric Weaver SDK" >> $GITHUB_ENV - - - name: Update version - run: | - VERSION=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,') - # Strip "v" prefix from tag name - [[ "${{ github.ref }}" == "refs/tags/"* ]] && VERSION=$(echo $VERSION | sed -e 's/^v//') - echo $VERSION - if [[ $VERSION =~ ^[0-9]+\.[0-9]+\.[0-9]+[A-Za-z\-]*$ ]]; then - echo -n $VERSION > VERSION - fi - cat VERSION - working-directory: weaver/sdks/fabric/go-sdk - - - name: Set module version - run: echo "VERSION=v$(cat VERSION)" >> $GITHUB_ENV - working-directory: weaver/sdks/fabric/go-sdk - - - name: Build test - run: go build -v ./... - working-directory: weaver/sdks/fabric/go-sdk - - - name: Check if release already exists - run: (git ls-remote origin | grep "$MODULE_TAG/$VERSION" && echo "WEAVER_FABRIC_GO_SDK=false" >> $GITHUB_ENV) || echo "WEAVER_FABRIC_GO_SDK=true" >> $GITHUB_ENV - working-directory: weaver/sdks/fabric/go-sdk - - - name: Create Release - if: ${{ env.WEAVER_FABRIC_GO_SDK == 'true' }} - id: go-sdk-release - uses: actions/create-release@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token - with: - tag_name: ${{ env.MODULE_TAG }}/${{ env.VERSION }} - release_name: ${{ env.VERSION }} - ${{ env.MODULE_DESC }} - ${{ env.RELEASE_DATE }} - body: | - - Go Module: `github.com/${{ github.repository_owner }}/cacti/${{ env.MODULE_TAG }}` - - Release: ${{ env.VERSION }} - - Readme: [Here](https://github.com/${{ github.repository_owner }}/cacti/blob/${{ env.MODULE_TAG }}/${{ env.VERSION }}/${{ env.MODULE_TAG }}/README.md). - - Source: [Here](https://github.com/${{ github.repository_owner }}/cacti/blob/${{ env.MODULE_TAG }}/${{ env.VERSION }}/${{ env.MODULE_TAG }}) - draft: false - prerelease: false - - - name: Wait for release to be reflected - if: ${{ env.WEAVER_FABRIC_GO_SDK == 'true' }} - run: sleep 300 - - publish-weaver-fabric-cc-image: - if: ${{ always() && github.repository_owner == 'hyperledger' }} - needs: [publish-protos-go, publish-lib-utils, publish-lib-asset-exchange] - runs-on: ubuntu-latest - steps: - # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - - uses: actions/checkout@v3.5.2 - - - name: Login to GitHub Container Registry - uses: docker/login-action@v1 - with: - registry: ghcr.io - username: ${{ github.actor }} - password: ${{ secrets.GITHUB_TOKEN }} - - - name: Check if package already exists - run: (make check-if-tag-exists && echo "WEAVER_FABRIC_CC_PUSH=true" >> $GITHUB_ENV) || echo "WEAVER_FABRIC_CC_PUSH=false" >> $GITHUB_ENV - working-directory: weaver/core/network/fabric-interop-cc - - - name: Build and Push - if: ${{ env.WEAVER_FABRIC_CC_PUSH == 'true' }} - run: make push-image - working-directory: weaver/core/network/fabric-interop-cc - - - name: Push latest tag - if: ${{ env.WEAVER_FABRIC_CC_PUSH == 'true' }} - run: make push-image-latest - working-directory: weaver/core/network/fabric-interop-cc diff --git a/.github/workflows/weaver_deploy_node-pkgs.yml b/.github/workflows/weaver_deploy_node-pkgs.yml deleted file mode 100644 index ed99a7713d..0000000000 --- a/.github/workflows/weaver_deploy_node-pkgs.yml +++ /dev/null @@ -1,240 +0,0 @@ -# Copyright IBM Corp. All Rights Reserved. -# -# SPDX-License-Identifier: CC-BY-4.0 - -name: Deploy Node JS Packages - -env: - NODEJS_VERSION: v18.18.2 - -on: - push: - tags: - - v* - - # Allows you to run this workflow manually from the Actions tab - workflow_dispatch: - -jobs: - publish-protos-js: - if: github.repository_owner == 'hyperledger' - runs-on: ubuntu-latest - permissions: - packages: write - contents: read - - steps: - # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - - uses: actions/checkout@v3.5.2 - - - name: Use Node.js ${{ env.NODEJS_VERSION }} - uses: actions/setup-node@v3.6.0 - with: - node-version: ${{ env.NODEJS_VERSION }} - - - name: Use Protoc 3.15 - run: | - curl -LO https://github.com/protocolbuffers/protobuf/releases/download/v3.15.6/protoc-3.15.6-linux-x86_64.zip - unzip protoc-3.15.6-linux-x86_64.zip -d protoc - - - name: Generate .npmrc - run: | - cp .npmrc.template .npmrc - sed -i "s//${{ secrets.GITHUB_TOKEN }}/g" .npmrc - cat .npmrc - working-directory: weaver/common/protos-js - - - name: Build - run: | - export PATH="$PATH:${GITHUB_WORKSPACE}/protoc/bin" - make build - working-directory: weaver/common/protos-js - - - name: Check if package already exists - run : | - PKG_NAME=$(node -p "require('./package.json').name") - PUBLISHED_VERSION=$(npm view $PKG_NAME version) - LOCAL_VERSION=$(node -p "require('./package.json').version") - if [[ "$PUBLISHED_VERSION" == "$LOCAL_VERSION" ]]; then - echo "PROTOS_JS_PUBLISH=false" >> $GITHUB_ENV - else - echo "PROTOS_JS_PUBLISH=true" >> $GITHUB_ENV - fi - working-directory: weaver/common/protos-js - - - name: Publish - if: ${{ env.PROTOS_JS_PUBLISH == 'true' }} - run: | - export PATH="$PATH:${GITHUB_WORKSPACE}/protoc/bin" - make publish - working-directory: weaver/common/protos-js - - publish-fabric-sdk: - if: ${{ always() && github.repository_owner == 'hyperledger' }} - needs: [publish-protos-js] - runs-on: ubuntu-latest - permissions: - packages: write - contents: read - - steps: - # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - - uses: actions/checkout@v3.5.2 - - - name: Use Node.js ${{ env.NODEJS_VERSION }} - uses: actions/setup-node@v3.6.0 - with: - node-version: ${{ env.NODEJS_VERSION }} - - - name: Generate .npmrc - run: | - cp .npmrc.template .npmrc - sed -i "s//${{ secrets.GITHUB_TOKEN }}/g" .npmrc - cat .npmrc - working-directory: weaver/sdks/fabric/interoperation-node-sdk - - - name: Build - run: make build - working-directory: weaver/sdks/fabric/interoperation-node-sdk - - - name: Check if package already exists - run : | - PKG_NAME=$(node -p "require('./package.json').name") - PUBLISHED_VERSION=$(npm view $PKG_NAME version) - LOCAL_VERSION=$(node -p "require('./package.json').version") - if [[ "$PUBLISHED_VERSION" == "$LOCAL_VERSION" ]]; then - echo "WEAVER_FABRIC_SDK_PUBLISH=false" >> $GITHUB_ENV - else - echo "WEAVER_FABRIC_SDK_PUBLISH=true" >> $GITHUB_ENV - fi - working-directory: weaver/sdks/fabric/interoperation-node-sdk - - - name: Publish - if: ${{ env.WEAVER_FABRIC_SDK_PUBLISH == 'true' }} - run: make publish - working-directory: weaver/sdks/fabric/interoperation-node-sdk - - publish-besu-sdk: - if: ${{ always() && github.repository_owner == 'hyperledger' }} - needs: [publish-protos-js] - runs-on: ubuntu-latest - permissions: - packages: write - contents: read - - steps: - # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - - uses: actions/checkout@v3.5.2 - - - name: Use Node.js ${{ env.NODEJS_VERSION }} - uses: actions/setup-node@v3.6.0 - with: - node-version: ${{ env.NODEJS_VERSION }} - - - name: Generate .npmrc - run: | - cp .npmrc.template .npmrc - sed -i "s//${{ secrets.GITHUB_TOKEN }}/g" .npmrc - cat .npmrc - working-directory: weaver/sdks/besu/node - - - name: Build - run: make build - working-directory: weaver/sdks/besu/node - - - name: Check if package already exists - run : | - PKG_NAME=$(node -p "require('./package.json').name") - PUBLISHED_VERSION=$(npm view $PKG_NAME version) - LOCAL_VERSION=$(node -p "require('./package.json').version") - if [[ "$PUBLISHED_VERSION" == "$LOCAL_VERSION" ]]; then - echo "WEAVER_BESU_SDK_PUBLISH=false" >> $GITHUB_ENV - else - echo "WEAVER_BESU_SDK_PUBLISH=true" >> $GITHUB_ENV - fi - working-directory: weaver/sdks/besu/node - - - name: Publish - if: ${{ env.WEAVER_BESU_SDK_PUBLISH == 'true' }} - run: make publish - working-directory: weaver/sdks/besu/node - - publish-driver-image: - if: ${{ always() && github.repository_owner == 'hyperledger' }} - needs: [publish-protos-js, publish-fabric-sdk] - runs-on: ubuntu-latest - permissions: - packages: write - contents: read - - steps: - # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - - uses: actions/checkout@v3.5.2 - - - name: Login to GitHub Container Registry - uses: docker/login-action@v2.1.0 - with: - registry: ghcr.io - username: ${{ github.actor }} - password: ${{ secrets.GITHUB_TOKEN }} - - - name: Generate .npmrc - run: | - cp .npmrc.template .npmrc - sed -i "s//${{ secrets.GITHUB_TOKEN }}/g" .npmrc - cat .npmrc - working-directory: weaver/core/drivers/fabric-driver - - - name: Check if package already exists - run: (make check-if-tag-exists && echo "FABRIC_DRIVER_PUSH=true" >> $GITHUB_ENV) || echo "FABRIC_DRIVER_PUSH=false" >> $GITHUB_ENV - working-directory: weaver/core/drivers/fabric-driver - - - name: Build and Push - if: ${{ env.FABRIC_DRIVER_PUSH == 'true' }} - run: make push-image - working-directory: weaver/core/drivers/fabric-driver - - - name: Push latest tag - if: ${{ env.FABRIC_DRIVER_PUSH == 'true' }} - run: make push-image-latest - working-directory: weaver/core/drivers/fabric-driver - - publish-iin-agent-image: - if: ${{ always() && github.repository_owner == 'hyperledger' }} - needs: [publish-protos-js, publish-fabric-sdk] - runs-on: ubuntu-latest - permissions: - packages: write - contents: read - - steps: - # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - - uses: actions/checkout@v3.5.2 - - - name: Login to GitHub Container Registry - uses: docker/login-action@v2.1.0 - with: - registry: ghcr.io - username: ${{ github.actor }} - password: ${{ secrets.GITHUB_TOKEN }} - - - name: Generate .npmrc - run: | - cp .npmrc.template .npmrc - sed -i "s//${{ secrets.GITHUB_TOKEN }}/g" .npmrc - cat .npmrc - working-directory: weaver/core/identity-management/iin-agent - - - name: Check if package already exists - run: (make check-if-tag-exists && echo "IINAGENT_PUSH=true" >> $GITHUB_ENV) || echo "IINAGENT_PUSH=false" >> $GITHUB_ENV - working-directory: weaver/core/identity-management/iin-agent - - - name: Build and Push - if: ${{ env.IINAGENT_PUSH == 'true' }} - run: make push-image - working-directory: weaver/core/identity-management/iin-agent - - - name: Push latest tag - if: ${{ env.IINAGENT_PUSH == 'true' }} - run: make push-image-latest - working-directory: weaver/core/identity-management/iin-agent diff --git a/.github/workflows/weaver_deploy_relay-server.yml b/.github/workflows/weaver_deploy_relay-server.yml deleted file mode 100644 index a1ec4ed5da..0000000000 --- a/.github/workflows/weaver_deploy_relay-server.yml +++ /dev/null @@ -1,83 +0,0 @@ -# Copyright IBM Corp. All Rights Reserved. -# -# SPDX-License-Identifier: CC-BY-4.0 - -name: Deploy Relay Docker Image - -on: - push: - tags: - - v* - - # Allows you to run this workflow manually from the Actions tab - workflow_dispatch: - -jobs: - publish-protos-rs: - if: github.repository_owner == 'hyperledger' - runs-on: ubuntu-latest - permissions: - packages: write - contents: read - - steps: - # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - - uses: actions/checkout@v3.5.2 - - - name: Install RUST Toolchain minimal stable with clippy and rustfmt - uses: actions-rs/toolchain@v1.0.6 - with: - profile: minimal - toolchain: stable - components: rustfmt, clippy - - - name: Publish - run: cargo publish --token ${CRATES_TOKEN} - env: - CRATES_TOKEN: ${{ secrets.CARGO_CRATES_IO_TOKEN }} - working-directory: weaver/common/protos-rs/pkg - - publish-relay-image: - if: github.repository_owner == 'hyperledger' - needs: publish-protos-rs - runs-on: ubuntu-latest - permissions: - packages: write - contents: read - - steps: - # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - - uses: actions/checkout@v3.5.2 - - - name: Login to GitHub Container Registry - uses: docker/login-action@v2.1.0 - with: - registry: ghcr.io - username: ${{ github.actor }} - password: ${{ secrets.GITHUB_TOKEN }} - - - name: Update version - run: | - VERSION=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,') - # Strip "v" prefix from tag name - [[ "${{ github.ref }}" == "refs/tags/"* ]] && VERSION=$(echo $VERSION | sed -e 's/^v//') - echo $VERSION - if [[ $VERSION =~ ^[0-9]+\.[0-9]+\.[0-9]+[A-Za-z\-]*$ ]]; then - echo -n $VERSION > VERSION - fi - cat VERSION - working-directory: weaver/core/relay - - - name: Check if package already exists - run: (make check-if-tag-exists && echo "RELAY_PUSH=true" >> $GITHUB_ENV) || echo "RELAY_PUSH=false" >> $GITHUB_ENV - working-directory: weaver/core/relay - - - name: Build and Push - if: ${{ env.RELAY_PUSH == 'true' }} - run: make push-server - working-directory: weaver/core/relay - - - name: Push latest tag - if: ${{ env.RELAY_PUSH == 'true' }} - run: (cat out | grep "exists") || make push-server-latest - working-directory: weaver/core/relay \ No newline at end of file