diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index d5b769cfa9..cb2b98af66 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -22,12 +22,17 @@ RUN apt-get update -y && apt-get install -y \ # ======================================================================================================== # Update repository signing keys # -------------------------------------------------------------------------------------------------------- - # Hyperledger -RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 9692C00E657DDE61 && \ - # Sovrin - apt-key adv --keyserver keyserver.ubuntu.com --recv-keys CE7709D068DB5E88 && \ - # Bionic-Security - apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 3B4FE6ACC0B21F32 +# Hyperledger +RUN gpg --keyserver keyserver.ubuntu.com --recv-keys 9692C00E657DDE61 && \ + gpg --export 9692C00E657DDE61 > /etc/apt/keyrings/hyperledger.gpg + +# todo: Will be removed when libindy will have been replace by indy-vdr, askar, and indy-credx +# bionic key +RUN gpg --keyserver keyserver.ubuntu.com --recv-keys 3B4FE6ACC0B21F32 && \ + gpg --export 3B4FE6ACC0B21F32 > /etc/apt/keyrings/ubuntu-bionic.gpg +# sovrin key +RUN gpg --keyserver keyserver.ubuntu.com --recv-keys CE7709D068DB5E88 && \ + gpg --export CE7709D068DB5E88 > /etc/apt/keyrings/sovrin.gpg # ======================================================================================================== # ToDo: @@ -36,10 +41,13 @@ RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 9692C00E657DDE61 && # Plenum # - https://github.com/hyperledger/indy-plenum/issues/1546 # - Needed to pick up rocksdb=5.8.8 -RUN echo "deb https://hyperledger.jfrog.io/artifactory/indy jammy dev" >> /etc/apt/sources.list && \ - echo "deb http://security.ubuntu.com/ubuntu bionic-security main" >> /etc/apt/sources.list && \ - echo "deb https://repo.sovrin.org/deb bionic master" >> /etc/apt/sources.list && \ - echo "deb https://repo.sovrin.org/sdk/deb bionic master" >> /etc/apt/sources.list +RUN echo "deb [signed-by=/etc/apt/keyrings/hyperledger.gpg] https://hyperledger.jfrog.io/artifactory/indy jammy dev rc" > /etc/apt/sources.list.d/hyperledger.list + +# todo: Will be removed when libindy will have been replace by indy-vdr, askar, and indy-credx +RUN echo "deb [signed-by=/etc/apt/keyrings/ubuntu-bionic.gpg] http://security.ubuntu.com/ubuntu bionic-security main" > /etc/apt/sources.list.d/ubuntu-bionic.list +RUN echo "deb [signed-by=/etc/apt/keyrings/sovrin.gpg] https://repo.sovrin.org/deb bionic master" > /etc/apt/sources.list.d/sovrin.list +RUN echo "deb [signed-by=/etc/apt/keyrings/sovrin.gpg] https://repo.sovrin.org/sdk/deb bionic master" >> /etc/apt/sources.list.d/sovrin.list + RUN apt-get update -y && apt-get install -y \ # Python diff --git a/.github/workflows/Push-manual.yaml b/.github/workflows/Push-manual.yaml new file mode 100644 index 0000000000..ade27ffefc --- /dev/null +++ b/.github/workflows/Push-manual.yaml @@ -0,0 +1,70 @@ +name: Indy Plenum - Push Workflow manual dispatch +on: + workflow_dispatch: + +jobs: + workflow-setup: + name: Initialize Workflow + runs-on: ubuntu-latest + outputs: + CACHE_KEY_BUILD: ${{ steps.setup.outputs.CACHE_KEY_BUILD }} + UBUNTU_VERSION: ${{ steps.setup.outputs.UBUNTU_VERSION }} + # Expose the lowercase version of the GitHub repository name + # to all subsequent jobs that reference image repositories + # as the push and pull operations require the URL of the repository + # to be in lowercase. + GITHUB_REPOSITORY_NAME: ${{ steps.setup.outputs.GITHUB_REPOSITORY_NAME }} + distribution: ${{ steps.setup.outputs.distribution }} + publish: ${{ steps.setup.outputs.publish }} + steps: + - name: checkout source code + uses: actions/checkout@v4 + - name: setup + id: setup + uses: hyperledger/indy-shared-gha/.github/actions/workflow-setup@v1 + + lint: + name: Lint + uses: hyperledger/indy-shared-gha/.github/workflows/lint.yaml@v1 + + build-docker-image: + name: Create Builder Image + needs: [workflow-setup, lint] + uses: hyperledger/indy-shared-gha/.github/workflows/buildimage.yaml@v1 + with: + CACHE_KEY_BUILD: ${{ needs.workflow-setup.outputs.CACHE_KEY_BUILD }} + DOCKER_IMAGE: ghcr.io/${{ needs.workflow-setup.outputs.GITHUB_REPOSITORY_NAME }}/plenum-build + UBUNTU_VERSION: ${{ needs.workflow-setup.outputs.UBUNTU_VERSION }} + + build_packages: + name: Build Packages + needs: [workflow-setup, build-docker-image] + uses: hyperledger/indy-shared-gha/.github/workflows/buildpackages.yaml@v1 + with: + DOCKER_IMAGE: ghcr.io/${{ needs.workflow-setup.outputs.GITHUB_REPOSITORY_NAME }}/plenum-build:${{ needs.workflow-setup.outputs.UBUNTU_VERSION }} + UBUNTU_VERSION: ${{ needs.workflow-setup.outputs.UBUNTU_VERSION }} + isDev: 'true' + isRC: 'false' + moduleName: plenum + + plenum_tests: + name: Test Plenum + needs: [workflow-setup, lint, build_packages] + uses: ./.github/workflows/reuseable_test.yaml + with: + GITHUB_REPOSITORY_NAME: ${{ needs.workflow-setup.outputs.GITHUB_REPOSITORY_NAME }} + UBUNTU_VERSION: ${{ needs.workflow-setup.outputs.UBUNTU_VERSION }} + + publish_artifacts: + name: Publish Artifacts + needs: [workflow-setup, plenum_tests] + if: needs.workflow-setup.outputs.publish == 'true' + uses: hyperledger/indy-shared-gha/.github/workflows/publish_artifacts.yaml@v1 + with: + COMPONENT: 'dev' + UBUNTU_VERSION: ${{ needs.workflow-setup.outputs.UBUNTU_VERSION }} + distribution: ${{ needs.workflow-setup.outputs.distribution }} + moduleName: plenum + secrets: + INDY_ARTIFACTORY_REPO_CONFIG: ${{ secrets.INDY_ARTIFACTORY_REPO_CONFIG }} + PYPI_API_TOKEN: ${{ secrets.PYPI_API_TOKEN }} diff --git a/.github/workflows/build/Dockerfile.ubuntu-2204 b/.github/workflows/build/Dockerfile.ubuntu-2204 index 318bdd0c2c..c84d30a94f 100644 --- a/.github/workflows/build/Dockerfile.ubuntu-2204 +++ b/.github/workflows/build/Dockerfile.ubuntu-2204 @@ -3,25 +3,31 @@ FROM ubuntu:22.04 ARG uid=1000 ARG user=indy -RUN apt-get update -y && apt-get install -y \ +RUN apt update -y && apt install -y \ # common stuff git \ + wget \ + gnupg \ apt-transport-https \ - apt-utils\ - wget\ - curl\ - jq\ - gnupg + ca-certificates \ + apt-utils \ + curl \ + jq # ======================================================================================================== -# Update repository signing keys +# Get repository signing keys # -------------------------------------------------------------------------------------------------------- - # Hyperledger -RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 9692C00E657DDE61 && \ - # Sovrin - apt-key adv --keyserver keyserver.ubuntu.com --recv-keys CE7709D068DB5E88 && \ - # Bionic-Security - apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 3B4FE6ACC0B21F32 +# Hyperledger +RUN gpg --keyserver keyserver.ubuntu.com --recv-keys 9692C00E657DDE61 && \ + gpg --export 9692C00E657DDE61 > /etc/apt/keyrings/hyperledger.gpg + +# todo: Will be removed when libindy will have been replace by indy-vdr, askar, and indy-credx +# bionic key +RUN gpg --keyserver keyserver.ubuntu.com --recv-keys 3B4FE6ACC0B21F32 && \ + gpg --export 3B4FE6ACC0B21F32 > /etc/apt/keyrings/ubuntu-bionic.gpg +# sovrin key +RUN gpg --keyserver keyserver.ubuntu.com --recv-keys CE7709D068DB5E88 && \ + gpg --export CE7709D068DB5E88 > /etc/apt/keyrings/sovrin.gpg # ======================================================================================================== # ToDo: @@ -30,15 +36,16 @@ RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 9692C00E657DDE61 && # Plenum # - https://github.com/hyperledger/indy-plenum/issues/1546 # - Needed to pick up rocksdb=5.8.8 -RUN echo "deb https://hyperledger.jfrog.io/artifactory/indy jammy dev" >> /etc/apt/sources.list && \ - echo "deb http://security.ubuntu.com/ubuntu bionic-security main" >> /etc/apt/sources.list && \ - echo "deb https://repo.sovrin.org/deb bionic master" >> /etc/apt/sources.list && \ - echo "deb https://repo.sovrin.org/sdk/deb bionic master" >> /etc/apt/sources.list - -RUN apt-get update -y && apt-get install -y \ - # Python - python3-pip \ - rubygems && \ - gem install --no-document dotenv:2.8.1 fpm:1.15.0 && \ +RUN echo "deb [signed-by=/etc/apt/keyrings/hyperledger.gpg] https://hyperledger.jfrog.io/artifactory/indy jammy dev rc" > /etc/apt/sources.list.d/hyperledger.list + +# todo: Will be removed when libindy will have been replace by indy-vdr, askar, and indy-credx +RUN echo "deb [signed-by=/etc/apt/keyrings/ubuntu-bionic.gpg] http://security.ubuntu.com/ubuntu bionic-security main" > /etc/apt/sources.list.d/ubuntu-bionic.list +RUN echo "deb [signed-by=/etc/apt/keyrings/sovrin.gpg] https://repo.sovrin.org/deb bionic master" > /etc/apt/sources.list.d/sovrin.list +RUN echo "deb [signed-by=/etc/apt/keyrings/sovrin.gpg] https://repo.sovrin.org/sdk/deb bionic master" >> /etc/apt/sources.list.d/sovrin.list + +RUN apt update -y && apt install -y rubygems python3-pip && apt-get -y autoremove && rm -rf /var/lib/apt/lists/* + +# install fpm +RUN gem install --no-document dotenv:2.8.1 fpm:1.15.0 && \ pip3 install Cython==0.29.36 diff --git a/build-scripts/ubuntu-2204/build-3rd-parties.sh b/build-scripts/ubuntu-2204/build-3rd-parties.sh index e8eee146ac..c779800e36 100755 --- a/build-scripts/ubuntu-2204/build-3rd-parties.sh +++ b/build-scripts/ubuntu-2204/build-3rd-parties.sh @@ -145,8 +145,7 @@ pushd `dirname ${SCRIPT_PATH}` >/dev/null # Install any python requirements needed for the builds. pip install -r requirements.txt -pip3 install wheel2deb && apt-get install -y debhelper -apt-get install -y cython3 +pip3 install wheel2deb && apt update && apt install -y debhelper cython3 # Build rocksdb at first ### Can be removed once the code has been updated to run with rocksdb v. 5.17 diff --git a/plenum/test/validator_info/test_validator_info.py b/plenum/test/validator_info/test_validator_info.py index 65a5c1cb91..4b908d4e80 100644 --- a/plenum/test/validator_info/test_validator_info.py +++ b/plenum/test/validator_info/test_validator_info.py @@ -101,6 +101,10 @@ def test_validator_info_file_pool_fields_valid(looper, info, txnPoolNodesLooper, others, disconnected = txnPoolNodeSet[:-1], txnPoolNodeSet[-1] disconnect_node_and_ensure_disconnected(txnPoolNodesLooper, txnPoolNodeSet, disconnected) + + # Wait for the information to be updated, if we dont pause, the test will fail 50 % of the time + looper.runFor(2) + latest_info = node._info_tool.info assert latest_info['Pool_info']['Reachable_nodes_count'] == nodeCount - 1