Skip to content

Commit c655ff1

Browse files
authored
Merge pull request #1870 from KimEbert42/feature/ubuntu22-04
Feature/ubuntu22 04
2 parents 24e389e + 6a612e6 commit c655ff1

20 files changed

+645
-24
lines changed

Diff for: .github/workflows/PR.yaml

+4-4
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030
uses: actions/checkout@v4
3131
- name: setup
3232
id: setup
33-
uses: hyperledger/indy-shared-gha/.github/actions/workflow-setup@v1
33+
uses: hyperledger/indy-shared-gha/.github/actions/workflow-setup@v2
3434
- name: testsNeeded
3535
id: testsNeeded
3636
uses: dorny/paths-filter@v3
@@ -46,12 +46,12 @@ jobs:
4646
name: Lint
4747
needs: [workflow-setup]
4848
if: ${{ needs.workflow-setup.outputs.testsNeeded == 'true' }}
49-
uses: hyperledger/indy-shared-gha/.github/workflows/lint.yaml@v1
49+
uses: hyperledger/indy-shared-gha/.github/workflows/lint.yaml@v2
5050

5151
build-image:
5252
name: Create Builder Image
5353
needs: [workflow-setup, lint]
54-
uses: hyperledger/indy-shared-gha/.github/workflows/buildimage.yaml@v1
54+
uses: hyperledger/indy-shared-gha/.github/workflows/buildimage.yaml@v2
5555
with:
5656
CACHE_KEY_BUILD: ${{ needs.workflow-setup.outputs.CACHE_KEY_BUILD }}
5757
DOCKER_IMAGE: ghcr.io/${{ needs.workflow-setup.outputs.GITHUB_REPOSITORY_NAME }}/node-build
@@ -60,7 +60,7 @@ jobs:
6060
build_packages:
6161
name: Build Packages
6262
needs: [workflow-setup, build-image]
63-
uses: hyperledger/indy-shared-gha/.github/workflows/buildpackages.yaml@v1
63+
uses: hyperledger/indy-shared-gha/.github/workflows/buildpackages.yaml@v2
6464
with:
6565
DOCKER_IMAGE: ghcr.io/${{ needs.workflow-setup.outputs.GITHUB_REPOSITORY_NAME }}/node-build:${{ needs.workflow-setup.outputs.UBUNTU_VERSION }}
6666
UBUNTU_VERSION: ${{ needs.workflow-setup.outputs.UBUNTU_VERSION }}

Diff for: .github/workflows/Push.yaml

+5-5
Original file line numberDiff line numberDiff line change
@@ -29,16 +29,16 @@ jobs:
2929
uses: actions/checkout@v4
3030
- name: setup
3131
id: setup
32-
uses: hyperledger/indy-shared-gha/.github/actions/workflow-setup@v1
32+
uses: hyperledger/indy-shared-gha/.github/actions/workflow-setup@v2
3333

3434
lint:
3535
name: Lint
36-
uses: hyperledger/indy-shared-gha/.github/workflows/lint.yaml@v1
36+
uses: hyperledger/indy-shared-gha/.github/workflows/lint.yaml@v2
3737

3838
build-image:
3939
name: Create Builder Image
4040
needs: [workflow-setup, lint]
41-
uses: hyperledger/indy-shared-gha/.github/workflows/buildimage.yaml@v1
41+
uses: hyperledger/indy-shared-gha/.github/workflows/buildimage.yaml@v2
4242
with:
4343
CACHE_KEY_BUILD: ${{ needs.workflow-setup.outputs.CACHE_KEY_BUILD }}
4444
DOCKER_IMAGE: ghcr.io/${{ needs.workflow-setup.outputs.GITHUB_REPOSITORY_NAME }}/node-build
@@ -47,7 +47,7 @@ jobs:
4747
build_packages:
4848
name: Build Packages
4949
needs: [workflow-setup, build-image]
50-
uses: hyperledger/indy-shared-gha/.github/workflows/buildpackages.yaml@v1
50+
uses: hyperledger/indy-shared-gha/.github/workflows/buildpackages.yaml@v2
5151
with:
5252
DOCKER_IMAGE: ghcr.io/${{ needs.workflow-setup.outputs.GITHUB_REPOSITORY_NAME }}/node-build:${{ needs.workflow-setup.outputs.UBUNTU_VERSION }}
5353
UBUNTU_VERSION: ${{ needs.workflow-setup.outputs.UBUNTU_VERSION }}
@@ -67,7 +67,7 @@ jobs:
6767
name: Publish Artifacts
6868
needs: [workflow-setup, indy_node_tests]
6969
if: needs.workflow-setup.outputs.publish == 'true'
70-
uses: hyperledger/indy-shared-gha/.github/workflows/publish_artifacts.yaml@v1
70+
uses: hyperledger/indy-shared-gha/.github/workflows/publish_artifacts.yaml@v2
7171
with:
7272
COMPONENT: 'dev'
7373
UBUNTU_VERSION: ${{ needs.workflow-setup.outputs.UBUNTU_VERSION }}

Diff for: .github/workflows/build/Dockerfile.ubuntu-2204

+42
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
FROM ubuntu:22.04
2+
3+
ARG uid=1000
4+
ARG user=indy
5+
6+
RUN apt-get update -y && apt-get install -y \
7+
# common stuff
8+
git \
9+
wget \
10+
gnupg \
11+
apt-transport-https \
12+
ca-certificates \
13+
apt-utils \
14+
curl \
15+
jq
16+
17+
# ========================================================================================================
18+
# Update repository signing keys
19+
# --------------------------------------------------------------------------------------------------------
20+
# Hyperledger
21+
RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 9692C00E657DDE61 && \
22+
# Sovrin
23+
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys CE7709D068DB5E88 && \
24+
# Bionic-Security
25+
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 3B4FE6ACC0B21F32
26+
# ========================================================================================================
27+
28+
# ToDo:
29+
# - Eliminate dependency on obsolete bionic repositories.
30+
31+
# Plenum
32+
# - https://github.com/hyperledger/indy-plenum/issues/1546
33+
# - Needed to pick up rocksdb=5.8.8
34+
RUN echo "deb https://hyperledger.jfrog.io/artifactory/indy jammy dev" >> /etc/apt/sources.list && \
35+
echo "deb http://security.ubuntu.com/ubuntu bionic-security main" >> /etc/apt/sources.list && \
36+
echo "deb https://repo.sovrin.org/deb bionic master" >> /etc/apt/sources.list && \
37+
echo "deb https://repo.sovrin.org/sdk/deb bionic master" >> /etc/apt/sources.list
38+
39+
RUN apt-get update -y && apt-get install -y rubygems python3-pip && apt-get -y autoremove && rm -rf /var/lib/apt/lists/*
40+
41+
# install fpm
42+
RUN gem install --no-document rake dotenv:2.8.1 fpm:1.15.0

Diff for: .github/workflows/publishRelease.yaml

+4-4
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,12 @@ jobs:
3333
uses: actions/checkout@v4
3434
- name: get-release-info
3535
id: get-release-info
36-
uses: hyperledger/indy-shared-gha/.github/actions/get-release-info@v1
36+
uses: hyperledger/indy-shared-gha/.github/actions/get-release-info@v2
3737
with:
3838
versionString: "${{ github.event.head_commit.message }}"
3939
- name: workflow-setup
4040
id: workflow-setup
41-
uses: hyperledger/indy-shared-gha/.github/actions/workflow-setup@v1
41+
uses: hyperledger/indy-shared-gha/.github/actions/workflow-setup@v2
4242

4343
createRelease:
4444
name: Create Release
@@ -110,7 +110,7 @@ jobs:
110110
name: Publish Artifacts
111111
needs: [release-infos, createRelease]
112112
if: needs.release-infos.outputs.isVersionBump == 'true' && needs.release-infos.outputs.publish == 'true'
113-
uses: hyperledger/indy-shared-gha/.github/workflows/publish_artifacts.yaml@v1
113+
uses: hyperledger/indy-shared-gha/.github/workflows/publish_artifacts.yaml@v2
114114
with:
115115
COMPONENT: ${{ needs.release-infos.outputs.component }}
116116
UBUNTU_VERSION: ${{ needs.release-infos.outputs.UBUNTU_VERSION }}
@@ -123,7 +123,7 @@ jobs:
123123
convertPyVersion:
124124
name: "Convert to python version flavour"
125125
needs: [release-infos, publish_artifacts]
126-
uses: hyperledger/indy-shared-gha/.github/workflows/pyVersionConversion.yaml@v1
126+
uses: hyperledger/indy-shared-gha/.github/workflows/pyVersionConversion.yaml@v2
127127
with:
128128
VERSIONTAG: ${{ needs.release-infos.outputs.VERSIONTAG }}
129129

Diff for: .github/workflows/releasepr.yaml

+5-5
Original file line numberDiff line numberDiff line change
@@ -26,24 +26,24 @@ jobs:
2626
uses: actions/checkout@v4
2727
- name: get-release-info
2828
id: get-release-info
29-
uses: hyperledger/indy-shared-gha/.github/actions/get-release-info@v1
29+
uses: hyperledger/indy-shared-gha/.github/actions/get-release-info@v2
3030
with:
3131
versionString: "${{ github.event.pull_request.body }}"
3232
- name: workflow-setup
3333
id: workflow-setup
34-
uses: hyperledger/indy-shared-gha/.github/actions/workflow-setup@v1
34+
uses: hyperledger/indy-shared-gha/.github/actions/workflow-setup@v2
3535

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

4242
build-docker-image:
4343
name: Create Builder Image
4444
needs: [release-infos, lint]
4545
if: needs.release-infos.outputs.isVersionBump == 'true'
46-
uses: hyperledger/indy-shared-gha/.github/workflows/buildimage.yaml@v1
46+
uses: hyperledger/indy-shared-gha/.github/workflows/buildimage.yaml@v2
4747
with:
4848
CACHE_KEY_BUILD: ${{ needs.release-infos.outputs.CACHE_KEY_BUILD }}
4949
DOCKER_IMAGE: ghcr.io/${{ needs.release-infos.outputs.GITHUB_REPOSITORY_NAME }}/node-build
@@ -53,7 +53,7 @@ jobs:
5353
name: Build Packages
5454
needs: [release-infos, build-docker-image]
5555
if: needs.release-infos.outputs.isVersionBump == 'true'
56-
uses: hyperledger/indy-shared-gha/.github/workflows/buildpackages.yaml@v1
56+
uses: hyperledger/indy-shared-gha/.github/workflows/buildpackages.yaml@v2
5757
with:
5858
DOCKER_IMAGE: ghcr.io/${{ needs.release-infos.outputs.GITHUB_REPOSITORY_NAME }}/node-build:${{ needs.release-infos.outputs.UBUNTU_VERSION }}
5959
UBUNTU_VERSION: ${{ needs.release-infos.outputs.UBUNTU_VERSION }}

Diff for: .github/workflows/tag.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,12 @@ jobs:
2121
fetch-depth: 0
2222
- name: extract branch
2323
id: get-branch
24-
uses: hyperledger/indy-shared-gha/.github/actions/branch-from-tag@v1
24+
uses: hyperledger/indy-shared-gha/.github/actions/branch-from-tag@v2
2525
with:
2626
tag: ${{ github.ref }}
2727
- name: get-release-info
2828
id: get-release-info
29-
uses: hyperledger/indy-shared-gha/.github/actions/get-release-info@v1
29+
uses: hyperledger/indy-shared-gha/.github/actions/get-release-info@v2
3030
with:
3131
versionString: "${{ github.ref }}"
3232

Diff for: build-scripts/ubuntu-2204/Dockerfile

+75
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
FROM ubuntu:22.04
2+
3+
ARG uid=1000
4+
ARG user=indy
5+
6+
RUN apt-get update -y && apt-get install -y \
7+
# common stuff
8+
git \
9+
wget \
10+
gnupg \
11+
apt-transport-https \
12+
ca-certificates \
13+
apt-utils
14+
15+
# ========================================================================================================
16+
# Update repository signing keys
17+
# --------------------------------------------------------------------------------------------------------
18+
# Hyperledger
19+
RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 9692C00E657DDE61 && \
20+
# Sovrin
21+
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys CE7709D068DB5E88 && \
22+
# Bionic-Security
23+
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 3B4FE6ACC0B21F32
24+
# ========================================================================================================
25+
26+
# Plenum
27+
# - https://github.com/hyperledger/indy-plenum/issues/1546
28+
# - Needed to pick up rocksdb=5.8.8
29+
RUN echo "deb https://hyperledger.jfrog.io/artifactory/indy jammy dev" >> /etc/apt/sources.list && \
30+
echo "deb http://security.ubuntu.com/ubuntu bionic-security main" >> /etc/apt/sources.list && \
31+
echo "deb https://repo.sovrin.org/deb bionic master" >> /etc/apt/sources.list && \
32+
echo "deb https://repo.sovrin.org/sdk/deb bionic master" >> /etc/apt/sources.list
33+
34+
# Sovrin
35+
RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys CE7709D068DB5E88
36+
37+
RUN apt-get update -y && apt-get install -y \
38+
# Python
39+
python3-pip \
40+
python3-nacl \
41+
# rocksdb python wrapper
42+
rocksdb=5.8.8 \
43+
libgflags-dev \
44+
libsnappy-dev \
45+
zlib1g-dev \
46+
libbz2-dev \
47+
liblz4-dev \
48+
libgflags-dev \
49+
# zstd is needed for caching in github actions pipeline
50+
zstd \
51+
# fpm
52+
ruby \
53+
ruby-dev \
54+
rubygems \
55+
gcc \
56+
make \
57+
# Indy Node and Plenum
58+
libssl1.0.0 \
59+
ursa=0.3.2-1 \
60+
# Indy SDK
61+
libindy=1.15.0~1625-bionic \
62+
# Need to move libursa.so to parent dir
63+
&& mv /usr/lib/ursa/* /usr/lib && rm -rf /usr/lib/ursa
64+
65+
RUN pip3 install -U \
66+
# Required by setup.py
67+
setuptools==50.3.2 \
68+
'pyzmq==22.3.0'
69+
70+
# install fpm
71+
RUN gem install --no-document rake dotenv:2.8.1 fpm:1.14.2
72+
73+
RUN apt-get -y autoremove \
74+
&& rm -rf /var/lib/apt/lists/*
75+

Diff for: build-scripts/ubuntu-2204/README.md

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
### Build indy-node using docker
2+
3+
```
4+
./build-indy-node-docker.sh <path-to-sources> <version>
5+
```
6+
Built package is placed in a docker volume `indy-node-deb-u1604`.
7+
8+
### Build indy-node
9+
10+
```
11+
./build-indy-node.sh <path to sources> <version> <output-path: default='.'>
12+
```
13+
14+
Built package is placed in the `output-path` folder.
15+
16+
### Build 3rd-party dependencies using docker
17+
18+
```
19+
./build-3rd-parties-docker.sh
20+
```
21+
22+
Built packages are placed in a docker volume `indy-node-deb-u1604`.
23+
24+
### Build 3rd-party dependencies
25+
26+
```
27+
./build-3rd-parties-docker.sh <output-path: default='.'>
28+
```
29+
30+
Built packages are placed in the `output-path` folder.
+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
#!/usr/bin/env bash
2+
3+
set -x
4+
set -e
5+
6+
if [ -z "$2" ]; then
7+
CMD="/root/build-3rd-parties.sh /output"
8+
else
9+
CMD="$2"
10+
fi
11+
12+
PKG_NAME=indy-node
13+
IMAGE_NAME="${PKG_NAME}-build-u2204"
14+
OUTPUT_VOLUME_NAME="${1:-"${PKG_NAME}-deb-u2204"}"
15+
16+
docker build -t "${PKG_NAME}-build-u2204" -f Dockerfile .
17+
docker volume create --name "${OUTPUT_VOLUME_NAME}"
18+
19+
docker run \
20+
-i \
21+
--rm \
22+
-v "${OUTPUT_VOLUME_NAME}:/output" \
23+
"${IMAGE_NAME}" \
24+
$CMD

0 commit comments

Comments
 (0)