Skip to content

Commit

Permalink
After internal discussions, we decided to change approach and create …
Browse files Browse the repository at this point in the history
…an action

- For better use of the RIT execution, we want to create an action to be
called by powpeg and rskj. Due that, we are starting creating a Dockerfile
with everything necessary to run this integration test.
  • Loading branch information
fmacleal committed Jun 14, 2024
1 parent bc081b2 commit 215e29b
Show file tree
Hide file tree
Showing 5 changed files with 65 additions and 73 deletions.
61 changes: 61 additions & 0 deletions .github/images/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
FROM kylemanna/bitcoind:latest AS builder

RUN apt-get update \
&& apt-get install -y wget gnupg2 curl git

# -- nodeJs ---------------------------------------------------------
ENV NODE_VERSION v20.14.0
RUN mkdir -p /usr/local/nvm
ENV NVM_DIR /usr/local/nvm

RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash \
&& . $NVM_DIR/nvm.sh \
&& nvm install $NODE_VERSION \
&& nvm alias default $NODE_VERSION \
&& nvm use default

ENV NODE_PATH $NVM_DIR/$NODE_VERSION/lib/node_modules
ENV PATH $NVM_DIR/versions/node/$NODE_VERSION/bin:$PATH

# -- java ---------------------------------------------------------
ENV JAVA_VERSION 11

RUN apt-get -y install "openjdk-$JAVA_VERSION-jdk"

ENV JAVA_HOME=/opt/java/openjdk \
PATH="/opt/java/openjdk/bin:$PATH"

# -- python ---------------------------------------------------------
ENV PYTHON_VERSION=2.7.16

# Install dependencies
RUN apt-get update \
&& apt-get install -y gcc make openssl libffi-dev libgdbm-dev libsqlite3-dev libssl-dev zlib1g-dev \
&& apt-get clean

RUN export PREVIOUS_PATH=$(pwd)
RUN cd /tmp

# Build Python from source
RUN wget https://www.python.org/ftp/python/$PYTHON_VERSION/Python-$PYTHON_VERSION.tgz \
&& tar --extract -f Python-$PYTHON_VERSION.tgz \
&& cd ./Python-$PYTHON_VERSION/ \
&& ./configure --with-ensurepip=install --enable-optimizations --prefix=/usr/local \
&& make && make install \
&& cd ../ \
&& rm -r ./Python-$PYTHON_VERSION*

RUN python --version \
&& pip --version

RUN cd $PREVIOUS_PATH

# -- bitcoind ---------------------------------------------------------
COPY entrypoint_bitcoind.sh /usr/local/bin/entrypoint.sh
RUN chmod +x /usr/local/bin/entrypoint.sh
ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]
CMD ["31591", "http://localhost:31592", "0.0.0.0:32591", "0.0.0.0/0", "admin", "admin"]

FROM builder AS rit-tests
LABEL Description="Custom RSK node image to execute Rootstock Integration Tests"

3 changes: 3 additions & 0 deletions .github/images/entrypoint_bitcoind.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/bash

/usr/local/bin/bitcoind -printtoconsole -regtest -debug -server -listen -port=$1 -connect=$2 -rpcbind=$3 -rpcallowip=$4 -rpcuser=$5 -rpcpassword=$6
73 changes: 0 additions & 73 deletions .github/workflows/build_and_test.yml

This file was deleted.

1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ config/*.js
logs
.env
.DS_Store
.secrets

0 comments on commit 215e29b

Please sign in to comment.