Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update actions and dev containers #454

Merged
merged 2 commits into from
Feb 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
59 changes: 25 additions & 34 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
ARG VARIANT="focal"
FROM mcr.microsoft.com/vscode/devcontainers/base:${VARIANT}

RUN apt-get update -y \
&& echo "deb http://security.ubuntu.com/ubuntu bionic main" >> /etc/apt/sources.list \
&& apt-get install -y --allow-downgrades \
RUN echo "deb http://security.ubuntu.com/ubuntu bionic main" >> /etc/apt/sources.list && \
apt-get update -y && apt-get install -y --allow-downgrades \
# common stuff
git \
wget \
Expand All @@ -12,7 +11,7 @@ RUN apt-get update -y \
apt-utils \
nano \
software-properties-common \
supervisor \
supervisor \
# Python
python3-pip \
python3-nacl \
Expand All @@ -23,50 +22,44 @@ RUN apt-get update -y \
libsnappy-dev \
liblz4-dev \
libbz2-dev \
docker-compose \
&& rm -rf /var/lib/apt/lists/*

# fails when executed in one command with other pip install packages
# RUN pip install python-rocksdb
docker-compose

RUN echo "deb http://security.ubuntu.com/ubuntu bionic-security main" >> /etc/apt/sources.list && \
apt-get update && apt-get install -y \
apt-get update -y && apt-get install -y \
libssl1.0.0 \
libssl1.1
# Indy Node and Plenum
RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys CE7709D068DB5E88 \
&& echo "deb https://repo.sovrin.org/deb bionic master" >> /etc/apt/sources.list \
&& apt-get update && apt-get install -y \
&& apt-get update && apt-get install -y \
ursa
# install fpm
ENV FPM_VERSION=1.9.3
RUN apt-get update \
&& apt-add-repository ppa:brightbox/ruby-ng \
&& apt-get install -y --no-install-recommends \
ruby2.6 \
ruby2.6-dev \
&& gem install --no-document rake fpm:$FPM_VERSION \
&& rm -rf /var/lib/apt/lists/*
ENV FPM_VERSION=1.14.2
ENV DOTENV_VERSION=2.8.1
RUN apt-get update -y && apt-get install -y \
ruby \
ruby-dev \
rubygems \
&& gem install --no-document rake dotenv:$DOTENV_VERSION fpm:$FPM_VERSION

# Need to move libursa.so to parent dir
RUN mv /usr/lib/ursa/* /usr/lib && rm -rf /usr/lib/ursa

# Indy SDK
# RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys CE7709D068DB5E88 || \
# apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys CE7709D068DB5E88 && \
RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 68DB5E88 \
&& apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 9692C00E657DDE61 \
&& echo "deb https://hyperledger.jfrog.io/artifactory/indy focal dev rc" >> /etc/apt/sources.list \
&& echo "deb https://repo.sovrin.org/sdk/deb xenial master" >> /etc/apt/sources.list \
&& echo "deb https://repo.sovrin.org/sdk/deb bionic master" >> /etc/apt/sources.list \
&& echo "deb http://archive.ubuntu.com/ubuntu xenial universe main" >> /etc/apt/sources.list \
&& echo "deb https://repo.sovrin.org/deb xenial master" >> /etc/apt/sources.list \
&& apt-get update -y && apt-get install -y \
RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 68DB5E88 \
&& apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 9692C00E657DDE61 \
&& add-apt-repository "deb https://hyperledger.jfrog.io/artifactory/indy focal dev" \
&& add-apt-repository "deb https://repo.sovrin.org/deb xenial master" \
&& add-apt-repository "deb https://repo.sovrin.org/sdk/deb xenial master" \
&& add-apt-repository "deb https://repo.sovrin.org/sdk/deb bionic master" \
&& add-apt-repository "deb http://archive.ubuntu.com/ubuntu xenial universe main" \
&& apt-get update -y && apt-get install -y \
libindy=1.15.0~1625-bionic \
libsodium23

# pypi based packages
RUN pip3 install -U \
RUN pip3 install -U \
Cython==0.29.36 \
Pygments==2.2.0 \
Pympler==0.8 \
PyNaCl==1.3.0 \
Expand Down Expand Up @@ -106,7 +99,7 @@ RUN pip3 install -U \
python3-indy==1.15.0-dev-1625 \
pyzmq==18.1.0 \
rlp==0.6.0 \
semver==2.13.0 \
semver \
setuptools==53.0.0 \
sha3==0.2.1 \
six==1.15.0 \
Expand All @@ -118,10 +111,8 @@ RUN pip3 install -U \
wheel==0.34.2 \
zipp==1.2.0 \
mock
# virtualenv \
# python-rocksdb==0.7

RUN mkdir -p /etc/indy && echo "ENABLED_PLUGINS = ['sovtoken', 'sovtokenfees']" > /etc/indy/indy_config.py

RUN apt-get -y autoremove

RUN rm -rf /var/lib/apt/lists/*
2 changes: 1 addition & 1 deletion .github/workflows/build/Dockerfile.ubuntu-2004
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ RUN pip3 install -U \
python3-indy==1.15.0-dev-1625 \
pyzmq==18.1.0 \
rlp==0.6.0 \
semver==2.13.0 \
semver \
setuptools==53.0.0 \
sha3==0.2.1 \
six==1.15.0 \
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/repoDispatchable_updateNode.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
update-setup:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Update indy-node to ${{ github.event.client_payload.pyVersion }}
run: |
sed -i "s/\(indy-node==\)[^ ]*/\1${{ github.event.client_payload.pyVersion }}'],/g" ./sovtoken/setup.py
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/reuseable_publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
jfrog rt ping

- name: Download sovtoken-deb package from GHA
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: sovtoken-deb
path: /tmp/sovtoken-deb/
Expand All @@ -51,7 +51,7 @@ jobs:
repo: "deb"

- name: Download sovtokenfees-deb package from GHA
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: sovtokenfees-deb
path: /tmp/sovtokenfees-deb/
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tag.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
- name: Check out code
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v3
uses: actions/setup-python@v5
with:
python-version: '3.8'
- name: Set up python
Expand Down
57 changes: 25 additions & 32 deletions .gitpod.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,33 +2,30 @@ FROM gitpod/workspace-base as base

USER gitpod

# common stuff
# Python
# rocksdb python wrapper
RUN sudo apt-get update \
&& sudo apt-get install software-properties-common \
&& sudo add-apt-repository "deb http://security.ubuntu.com/ubuntu bionic main" \
&& sudo apt-get install -y \
RUN echo "deb http://security.ubuntu.com/ubuntu bionic main" >> /etc/apt/sources.list && \
apt-get update -y && apt-get install -y --allow-downgrades \
# common stuff
git \
wget \
apt-transport-https \
ca-certificates \
apt-utils \
nano \
supervisor \
software-properties-common \
supervisor \
# Python
python3-pip \
python3-nacl \
# rocksdb python wrapper
rocksdb-tools \
librocksdb5.17 \
librocksdb-dev \
libsnappy-dev \
liblz4-dev \
libbz2-dev

# fails when executed in one command with other pip install packages
# RUN pip install python-rocksdb
RUN sudo add-apt-repository "deb http://security.ubuntu.com/ubuntu bionic-security main" && \
sudo apt-get update && sudo apt-get install -y \
sudo apt-get update -y && sudo apt-get install -y \
libssl1.0.0 \
libssl1.1

Expand All @@ -37,36 +34,34 @@ RUN sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys CE7709D068DB5E
sudo add-apt-repository "deb https://repo.sovrin.org/deb bionic master" &&\
sudo apt-get update && sudo apt-get install -y \
ursa

# install fpm
ENV FPM_VERSION=1.9.3
RUN sudo apt-add-repository ppa:brightbox/ruby-ng &&\
sudo apt-get install -y --no-install-recommends \
ruby2.6 \
ruby2.6-dev &&\
sudo gem install --no-document rake fpm:$FPM_VERSION
ENV FPM_VERSION=1.14.2
ENV DOTENV_VERSION=2.8.1
RUN sudo apt-get update -y && sudo apt-get install -y \
ruby \
ruby-dev \
rubygems \
&& gem install --no-document rake dotenv:$DOTENV_VERSION fpm:$FPM_VERSION

# Need to move libursa.so to parent dir
RUN sudo mv /usr/lib/ursa/* /usr/lib && sudo rm -rf /usr/lib/ursa

# Indy SDK
# RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys CE7709D068DB5E88 || \
# apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys CE7709D068DB5E88 && \
RUN sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 68DB5E88 &&\
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 9692C00E657DDE61 &&\
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 9692C00E657DDE61 &&\
sudo add-apt-repository "deb https://hyperledger.jfrog.io/artifactory/indy focal dev rc" &&\
sudo add-apt-repository "deb https://repo.sovrin.org/deb xenial master" &&\
sudo add-apt-repository "deb https://repo.sovrin.org/sdk/deb xenial master" &&\
sudo add-apt-repository "deb https://repo.sovrin.org/sdk/deb bionic master" &&\
sudo add-apt-repository "deb http://archive.ubuntu.com/ubuntu xenial universe main" &&\
sudo apt-get update -y && sudo apt-get install -y \
RUN sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 68DB5E88 && \
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 9692C00E657DDE61 && \
sudo add-apt-repository "deb https://hyperledger.jfrog.io/artifactory/indy focal dev rc" && \
sudo add-apt-repository "deb https://repo.sovrin.org/deb xenial master" && \
sudo add-apt-repository "deb https://repo.sovrin.org/sdk/deb xenial master" && \
sudo add-apt-repository "deb https://repo.sovrin.org/sdk/deb bionic master" && \
sudo add-apt-repository "deb http://archive.ubuntu.com/ubuntu xenial universe main" && \
sudo apt-get update -y && sudo apt-get install -y && \
libindy=1.15.0~1625-bionic \
libsodium23

ENV PATH "$PATH:/home/gitpod/.local/bin"
# pypi based packages
RUN pip3 install -U --user\
Cython==0.29.36 \
Pygments==2.2.0 \
Pympler==0.8 \
PyNaCl==1.3.0 \
Expand Down Expand Up @@ -106,7 +101,7 @@ RUN pip3 install -U --user\
python3-indy==1.16.0.post286 \
pyzmq==18.1.0 \
rlp==0.6.0 \
semver==2.13.0 \
semver \
setuptools==53.0.0 \
sha3==0.2.1 \
six==1.15.0 \
Expand All @@ -118,8 +113,6 @@ RUN pip3 install -U --user\
wheel==0.34.2 \
zipp==1.2.0 \
mock
# virtualenv \
# python-rocksdb==0.7

COPY ./deps .
RUN sudo dpkg -i libsovtoken_1.0.2_amd64.deb
Expand Down
2 changes: 1 addition & 1 deletion devops/docker/ci/focal/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ RUN pip3 install -U \
python3-indy==1.15.0-dev-1625 \
pyzmq==18.1.0 \
rlp==0.6.0 \
semver==2.13.0 \
semver \
setuptools==53.0.0 \
sha3==0.2.1 \
six==1.15.0 \
Expand Down
6 changes: 3 additions & 3 deletions updateVersion.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@


def updateWithTag(ver):
if not semver.VersionInfo.isvalid(ver):
if not semver.Version.is_valid(ver):
raise ValueError('No Valid Semver in Tag')
return ver

Expand All @@ -21,7 +21,7 @@ def updateWithTimestamp(timestamp):
version = "str"
with open('sovtoken/sovtoken/metadata.json', 'r') as f:
data = json.load(f)
v = semver.VersionInfo.parse(data["version"])
v = semver.Version.parse(data["version"])
v = v.replace(prerelease="dev" + timestamp)
version = str(v)
return version
Expand All @@ -32,7 +32,7 @@ def updateWithTimestamp(timestamp):
if args['getVersion']:
with open('sovtoken/sovtoken/metadata.json', 'r') as f:
data = json.load(f)
v = semver.VersionInfo.parse(data["version"])
v = semver.Version.parse(data["version"])
print(v)
quit()

Expand Down
Loading