-
Notifications
You must be signed in to change notification settings - Fork 49
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Enable CI integration tests for discovery node (#1047)
- Loading branch information
Showing
16 changed files
with
158 additions
and
82 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,11 @@ | ||
FROM debian:12-slim | ||
|
||
WORKDIR /root | ||
COPY discoverynode/ /root/discoverynode/ | ||
WORKDIR /root/discoverynode | ||
|
||
RUN apt-get update && \ | ||
apt-get install --no-install-suggests --no-install-recommends --yes python3-venv gcc libpython3-dev sudo && \ | ||
apt-get install --no-install-suggests --no-install-recommends --yes python3-venv gcc libpython3-dev sudo jq moreutils && \ | ||
python3 -m venv venv && \ | ||
venv/bin/pip install --upgrade pip setuptools wheel | ||
|
||
ADD discoverynode/src/requirements.txt /tmp/ | ||
RUN venv/bin/pip install --disable-pip-version-check -r /tmp/requirements.txt | ||
ADD discoverynode/ discoverynode/ | ||
RUN venv/bin/pip install --disable-pip-version-check -r src/requirements.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#!/bin/bash -e | ||
set -x | ||
ROOT_DIR=$(realpath $(dirname $0)/..) | ||
|
||
TMP_DIR=$(mktemp -d) | ||
OUT_DIR=$ROOT_DIR/dist | ||
OUT_FILE=$OUT_DIR/discoverynode | ||
|
||
echo Building binary to | ||
cat >$TMP_DIR/build.sh <<-EOF | ||
set -x | ||
mkdir /build | ||
cp -r /src /build | ||
cd /build/src | ||
pip3 install -r requirements.txt | ||
pyinstaller --onefile --hidden-import udmi main.py | ||
mv dist/main /tmp/main | ||
EOF | ||
|
||
docker pull ghcr.io/noursaidi/discoverybuilder:latest | ||
docker run --rm --volume $ROOT_DIR/src:/src --volume $TMP_DIR:/tmp ghcr.io/noursaidi/discoverybuilder:latest /bin/bash /tmp/build.sh | ||
mkdir -p $OUT_DIR | ||
mv $TMP_DIR/main $OUT_FILE | ||
chmod 7755 $OUT_FILE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
FROM ubuntu:16.04 | ||
|
||
WORKDIR /tmp | ||
|
||
RUN apt update && apt -y install build-essential zlib1g-dev libncurses5-dev libgdbm-dev libnss3-dev libssl-dev libreadline-dev libffi-dev libsqlite3-dev wget | ||
RUN wget https://www.openssl.org/source/openssl-1.1.1g.tar.gz | ||
RUN wget https://www.python.org/ftp/python/3.12.8/Python-3.12.8.tgz | ||
|
||
RUN apt -y remove openssl | ||
RUN tar -zxf openssl-1.1.1g.tar.gz | ||
RUN tar -xzvf Python-3.12.8.tgz | ||
|
||
WORKDIR /tmp/openssl-1.1.1g | ||
RUN ./config | ||
RUN make | ||
RUN make install | ||
RUN cp -r libssl.so.1.1 /usr/lib && cp -r libcrypto.so.1.1 /usr/lib | ||
|
||
WORKDIR /tmp/Python-3.12.8 | ||
RUN ./configure --enable-optimizations --with-openssl=/usr/local --with-ensurepip=install CFLAGS="-I/usr/include" LDFLAGS="-Wl,-rpath /usr/local/lib" --enable-shared --prefix=/usr/local | ||
RUN make | ||
RUN make install | ||
|
||
RUN python3 -m pip install pyinstaller | ||
|
||
WORKDIR /root |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.