diff --git a/.forgejo/workflows/tests.yaml b/.forgejo/workflows/tests.yaml index e0294e1..c3e3668 100644 --- a/.forgejo/workflows/tests.yaml +++ b/.forgejo/workflows/tests.yaml @@ -5,26 +5,10 @@ jobs: tests: runs-on: docker container: - image: docker.io/brenard/python-pre-commit:latest + image: docker.io/brenard/mylib:dev-master + options: "--workdir /src" steps: - name: Check out repository code uses: actions/checkout@v4 - with: - fetch-depth: 0 - - name: Install dependencies - env: - DEBIAN_FRONTEND: noninteractive - run: | - apt-get -qq update - apt-get -qq -y install --no-install-recommends \ - build-essential \ - python3 \ - python3-dev \ - libldap2-dev \ - libsasl2-dev \ - pkg-config \ - libsystemd-dev \ - libpq-dev \ - libmariadb-dev - name: Run tests.sh - run: ./tests.sh + run: ./tests.sh --no-venv diff --git a/build.sh b/build.sh index 00a79b2..7bd83ba 100755 --- a/build.sh +++ b/build.sh @@ -114,6 +114,7 @@ $GITDCH \ --release-notes ../../dist/release_notes.md \ --path ../../ \ --exclude "^CI: " \ + --exclude "^Docker: " \ --exclude "^pre-commit: " \ --exclude "\.?woodpecker(\.yml)?" \ --exclude "build(\.sh)?" \ diff --git a/docker/dev-master/Dockerfile b/docker/dev-master/Dockerfile index bfc2328..b6cfcd1 100644 --- a/docker/dev-master/Dockerfile +++ b/docker/dev-master/Dockerfile @@ -1,5 +1,6 @@ FROM brenard/mylib:latest -RUN apt-get remove -y python3-mylib -RUN python3 -m pip install -U git+https://gitea.zionetrix.net/bn8/python-mylib.git -RUN git clone https://gitea.zionetrix.net/bn8/python-mylib.git /usr/local/src/python-mylib && pip install /usr/local/src/python-mylib[dev] -RUN cd /usr/local/src/python-mylib && pre-commit run --all-files +RUN apt-get remove -y python3-mylib && \ + git clone https://gitea.zionetrix.net/bn8/python-mylib.git /src && \ + pip install --break-system-packages /src[dev] && \ + cd /src && \ + pre-commit run --all-files diff --git a/docker/latest/Dockerfile b/docker/latest/Dockerfile index 605fcdb..c846487 100644 --- a/docker/latest/Dockerfile +++ b/docker/latest/Dockerfile @@ -1,5 +1,26 @@ -FROM debian:latest -RUN echo "deb http://debian.zionetrix.net stable main" > /etc/apt/sources.list.d/zionetrix.list && apt-get -o Acquire::AllowInsecureRepositories=true -o Acquire::AllowDowngradeToInsecureRepositories=true update && apt-get -o APT::Get::AllowUnauthenticated=true install --yes zionetrix-archive-keyring && apt-get clean && rm -fr rm -rf /var/lib/apt/lists/* -RUN apt-get update && apt-get upgrade -y && apt-get install -y python3-all python3-dev python3-pip python3-venv python3-mylib build-essential git libldap2-dev libsasl2-dev pkg-config libsystemd-dev libpq-dev libmariadb-dev wget unzip && apt-get clean && rm -fr rm -rf /var/lib/apt/lists/* -RUN python3 -m pip install pylint pytest flake8 flake8-junit-report pylint-junit junitparser pre-commit -RUN wget --no-verbose -O /opt/instantclient-basic-linux.x64-21.4.0.0.0dbru.zip https://download.oracle.com/otn_software/linux/instantclient/214000/instantclient-basic-linux.x64-21.4.0.0.0dbru.zip && unzip -qq -d /opt /opt/instantclient-basic-linux.x64-21.4.0.0.0dbru.zip && echo /opt/instantclient_* > /etc/ld.so.conf.d/oracle-instantclient.conf && ldconfig +FROM node:16-bookworm-slim +RUN echo "deb http://debian.zionetrix.net stable main" > /etc/apt/sources.list.d/zionetrix.list && \ + apt-get \ + -o Acquire::AllowInsecureRepositories=true \ + -o Acquire::AllowDowngradeToInsecureRepositories=true \ + update && \ + apt-get \ + -o APT::Get::AllowUnauthenticated=true \ + install --yes zionetrix-archive-keyring && \ + apt-get update && \ + apt-get upgrade -y && \ + apt-get install -y \ + python3-all python3-dev python3-pip python3-venv python3-mylib build-essential git \ + libldap2-dev libsasl2-dev \ + pkg-config libsystemd-dev \ + libpq-dev libmariadb-dev \ + wget unzip && \ + apt-get clean && \ + rm -fr rm -rf /var/lib/apt/lists/* +RUN python3 -m pip install --break-system-packages pylint pytest flake8 flake8-junit-report pylint-junit junitparser pre-commit +RUN wget --no-verbose \ + -O /opt/instantclient-basic-linux.x64-21.4.0.0.0dbru.zip \ + https://download.oracle.com/otn_software/linux/instantclient/214000/instantclient-basic-linux.x64-21.4.0.0.0dbru.zip && \ + unzip -qq -d /opt /opt/instantclient-basic-linux.x64-21.4.0.0.0dbru.zip && \ + echo /opt/instantclient_* > /etc/ld.so.conf.d/oracle-instantclient.conf && \ + ldconfig