Skip to content

Commit

Permalink
feat: commit initial work on ubuntu 22.04
Browse files Browse the repository at this point in the history
fix: remove setuptools as it conflicts with existing OS packages
chore: update github workflows
fix: fix tests
chore: use temp server
fix: fix deb package versioning
fix: fix msgpack dependency
fix: fix build
fix: add cython3
fix: fix checkpoint service
fix: fix popitem
fix: remove extra parameter from test_stats_publisher
fix: replace iloc with keys
fix: fix collections.Mapping to collections.abc.Mapping
fix: some collections still use last=False...
fix: fix append to add
fix: fix rlp
fix: fix lint
fix: fix popitem that uses last notation
fix: fix Iterable
chore: clean up un-needed files
chore: change to hyperledger github
fix: restore needed file that was cleaned up

Signed-off-by: Kim Ebert <[email protected]>
  • Loading branch information
KimEbert42 committed Apr 23, 2024
1 parent ae6b893 commit cd7fc7a
Show file tree
Hide file tree
Showing 32 changed files with 607 additions and 42 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/PR.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
uses: actions/checkout@v4
- name: setup
id: setup
uses: hyperledger/indy-shared-gha/.github/actions/workflow-setup@v1
uses: hyperledger/indy-shared-gha/.github/actions/workflow-setup@v2
- name: testsNeeded
id: testsNeeded
uses: dorny/paths-filter@v3
Expand All @@ -44,12 +44,12 @@ jobs:
name: Lint
needs: [workflow-setup]
if: ${{ needs.workflow-setup.outputs.testsNeeded == 'true' }}
uses: hyperledger/indy-shared-gha/.github/workflows/lint.yaml@v1
uses: hyperledger/indy-shared-gha/.github/workflows/lint.yaml@v2

build-docker-image:
name: Create Builder Image
needs: [workflow-setup, lint]
uses: hyperledger/indy-shared-gha/.github/workflows/buildimage.yaml@v1
uses: hyperledger/indy-shared-gha/.github/workflows/buildimage.yaml@v2
with:
CACHE_KEY_BUILD: ${{ needs.workflow-setup.outputs.CACHE_KEY_BUILD }}
DOCKER_IMAGE: ghcr.io/${{ needs.workflow-setup.outputs.GITHUB_REPOSITORY_NAME }}/plenum-build
Expand All @@ -58,7 +58,7 @@ jobs:
build_packages:
name: Build Packages
needs: [workflow-setup, build-docker-image]
uses: hyperledger/indy-shared-gha/.github/workflows/buildpackages.yaml@v1
uses: hyperledger/indy-shared-gha/.github/workflows/buildpackages.yaml@v2
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 }}
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/Push.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,16 +28,16 @@ jobs:
uses: actions/checkout@v4
- name: setup
id: setup
uses: hyperledger/indy-shared-gha/.github/actions/workflow-setup@v1
uses: hyperledger/indy-shared-gha/.github/actions/workflow-setup@v2

lint:
name: Lint
uses: hyperledger/indy-shared-gha/.github/workflows/lint.yaml@v1
uses: hyperledger/indy-shared-gha/.github/workflows/lint.yaml@v2

build-docker-image:
name: Create Builder Image
needs: [workflow-setup, lint]
uses: hyperledger/indy-shared-gha/.github/workflows/buildimage.yaml@v1
uses: hyperledger/indy-shared-gha/.github/workflows/buildimage.yaml@v2
with:
CACHE_KEY_BUILD: ${{ needs.workflow-setup.outputs.CACHE_KEY_BUILD }}
DOCKER_IMAGE: ghcr.io/${{ needs.workflow-setup.outputs.GITHUB_REPOSITORY_NAME }}/plenum-build
Expand All @@ -46,7 +46,7 @@ jobs:
build_packages:
name: Build Packages
needs: [workflow-setup, build-docker-image]
uses: hyperledger/indy-shared-gha/.github/workflows/buildpackages.yaml@v1
uses: hyperledger/indy-shared-gha/.github/workflows/buildpackages.yaml@v2
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 }}
Expand All @@ -66,7 +66,7 @@ jobs:
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
uses: hyperledger/indy-shared-gha/.github/workflows/publish_artifacts.yaml@v2
with:
COMPONENT: 'dev'
UBUNTU_VERSION: ${{ needs.workflow-setup.outputs.UBUNTU_VERSION }}
Expand Down
42 changes: 42 additions & 0 deletions .github/workflows/build/Dockerfile.ubuntu-2204
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
FROM ubuntu:22.04

ARG uid=1000
ARG user=indy

RUN apt-get update -y && apt-get install -y \
# common stuff
git \
apt-transport-https \
apt-utils\
wget\
curl\
jq\
gnupg

# ========================================================================================================
# 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
# ========================================================================================================

# 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 focal dev" >> /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

# TODO change this to official repo
RUN echo "deb [trusted=yes] http://209.141.41.82:8000/ packagedir/" >> /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 && \
pip3 install Cython==0.29.36

8 changes: 4 additions & 4 deletions .github/workflows/publishRelease.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,12 @@ jobs:
uses: actions/checkout@v4
- name: get-release-info
id: get-release-info
uses: hyperledger/indy-shared-gha/.github/actions/get-release-info@v1
uses: hyperledger/indy-shared-gha/.github/actions/get-release-info@v2
with:
versionString: "${{ github.event.head_commit.message }}"
- name: workflow-setup
id: workflow-setup
uses: hyperledger/indy-shared-gha/.github/actions/workflow-setup@v1
uses: hyperledger/indy-shared-gha/.github/actions/workflow-setup@v2

createRelease:
name: Create Release
Expand Down Expand Up @@ -111,7 +111,7 @@ jobs:
name: Publish Artifacts
needs: [release-infos, createRelease]
if: needs.release-infos.outputs.isVersionBump == 'true' && needs.release-infos.outputs.publish == 'true'
uses: hyperledger/indy-shared-gha/.github/workflows/publish_artifacts.yaml@v1
uses: hyperledger/indy-shared-gha/.github/workflows/publish_artifacts.yaml@v2
with:
COMPONENT: ${{ needs.release-infos.outputs.component }}
UBUNTU_VERSION: ${{ needs.release-infos.outputs.UBUNTU_VERSION }}
Expand All @@ -124,7 +124,7 @@ jobs:
convertPyVersion:
name: "Convert to python version flavour"
needs: [release-infos, publish_artifacts]
uses: hyperledger/indy-shared-gha/.github/workflows/pyVersionConversion.yaml@v1
uses: hyperledger/indy-shared-gha/.github/workflows/pyVersionConversion.yaml@v2
with:
VERSIONTAG: ${{ needs.release-infos.outputs.VERSIONTAG }}

Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/releasepr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,24 +26,24 @@ jobs:
uses: actions/checkout@v4
- name: get-release-info
id: get-release-info
uses: hyperledger/indy-shared-gha/.github/actions/get-release-info@v1
uses: hyperledger/indy-shared-gha/.github/actions/get-release-info@v2
with:
versionString: "${{ github.event.pull_request.body }}"
- name: workflow-setup
id: workflow-setup
uses: hyperledger/indy-shared-gha/.github/actions/workflow-setup@v1
uses: hyperledger/indy-shared-gha/.github/actions/workflow-setup@v2

lint:
name: Lint
needs: [release-infos]
if: needs.release-infos.outputs.isVersionBump == 'true'
uses: hyperledger/indy-shared-gha/.github/workflows/lint.yaml@v1
uses: hyperledger/indy-shared-gha/.github/workflows/lint.yaml@v2

build-docker-image:
name: Create Builder Image
needs: [release-infos, lint]
if: needs.release-infos.outputs.isVersionBump == 'true'
uses: hyperledger/indy-shared-gha/.github/workflows/buildimage.yaml@v1
uses: hyperledger/indy-shared-gha/.github/workflows/buildimage.yaml@v2
with:
CACHE_KEY_BUILD: ${{ needs.release-infos.outputs.CACHE_KEY_BUILD }}
DOCKER_IMAGE: ghcr.io/${{ needs.release-infos.outputs.GITHUB_REPOSITORY_NAME }}/plenum-build
Expand All @@ -53,7 +53,7 @@ jobs:
name: Build Packages
needs: [release-infos, build-docker-image]
if: needs.release-infos.outputs.isVersionBump == 'true'
uses: hyperledger/indy-shared-gha/.github/workflows/buildpackages.yaml@v1
uses: hyperledger/indy-shared-gha/.github/workflows/buildpackages.yaml@v2
with:
DOCKER_IMAGE: ghcr.io/${{ needs.release-infos.outputs.GITHUB_REPOSITORY_NAME }}/plenum-build:${{ needs.release-infos.outputs.UBUNTU_VERSION }}
UBUNTU_VERSION: ${{ needs.release-infos.outputs.UBUNTU_VERSION }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/tag.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@ jobs:
fetch-depth: 0
- name: extract branch
id: get-branch
uses: hyperledger/indy-shared-gha/.github/actions/branch-from-tag@v1
uses: hyperledger/indy-shared-gha/.github/actions/branch-from-tag@v2
with:
tag: ${{ github.ref }}
- name: get-release-info
id: get-release-info
uses: hyperledger/indy-shared-gha/.github/actions/get-release-info@v1
uses: hyperledger/indy-shared-gha/.github/actions/get-release-info@v2
with:
versionString: "${{ github.ref }}"

Expand Down
30 changes: 30 additions & 0 deletions build-scripts/ubuntu-2204/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
### Build indy-plenum using docker

```
./build-indy-plenum-docker.sh <path-to-sources> <version>
```
Built package is placed in a docker volume `indy-plenum-deb-u1604`.

### Build indy-plenum

```
./build-indy-plenum.sh <path to sources> <version> <output-path: default='.'>
```

Built package is placed in the `output-path` folder.

### Build 3rd-party dependencies using docker

```
./build-3rd-parties-docker.sh
```

Built packages are placed in a docker volume `indy-plenum-deb-u1604`.

### Build 3rd-party dependencies

```
./build-3rd-parties-docker.sh <output-path: default='.'>
```

Built packages are placed in the `output-path` folder.
28 changes: 28 additions & 0 deletions build-scripts/ubuntu-2204/build-3rd-parties-docker.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#!/usr/bin/env bash

set -x
set -e


PKG_SOURCE_PATH=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )/../../

if [ -z "$2" ]; then
CMD="/input/build-scripts/ubuntu-2204/build-3rd-parties.sh /output"
else
CMD="$2"
fi

PKG_NAME=indy-plenum
IMAGE_NAME="${PKG_NAME}-build-u2204"
OUTPUT_VOLUME_NAME="${1:-"${PKG_NAME}-deb-u2204"}"

docker build -t "${PKG_NAME}-build-u2204" -f $PKG_SOURCE_PATH/.github/workflows/build/Dockerfile.ubuntu-2204 .
docker volume create --name "${OUTPUT_VOLUME_NAME}"

docker run \
-i \
--rm \
-v "${PKG_SOURCE_PATH}:/input" \
-v "${OUTPUT_VOLUME_NAME}:/output" \
"${IMAGE_NAME}" \
$CMD
Loading

0 comments on commit cd7fc7a

Please sign in to comment.