From eff7d478ab29d541c7a486cccd27c23d0e803e5d Mon Sep 17 00:00:00 2001 From: Hunter Wittenborn Date: Sat, 28 Aug 2021 20:12:35 -0500 Subject: [PATCH] Updated CI tests for pip dependencies; Changed styling in install-deps.sh --- .gitlab-ci.yml | 1 + Dockerfile | 26 +++++++++++++------------- docker/scripts/install-deps.sh | 2 +- 3 files changed, 15 insertions(+), 14 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 7b8da2ae..d360d483 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -12,6 +12,7 @@ variables: before_script: - ./docker/scripts/install-deps.sh + - pip install -r requirements.txt - useradd -U -d /aurweb -c 'AUR User' aur - ./docker/mariadb-entrypoint.sh - (cd '/usr' && /usr/bin/mysqld_safe --datadir='/var/lib/mysql') & diff --git a/Dockerfile b/Dockerfile index 2843fa1b..b610b8c1 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,9 +3,19 @@ FROM archlinux:base-devel ENV PYTHONPATH=/aurweb ENV AUR_CONFIG=conf/config -# Copy our single bootstrap script. -COPY docker/scripts/install-deps.sh /install-deps.sh -RUN /install-deps.sh +# Copy Docker scripts +COPY ./docker /docker +COPY ./docker/scripts/*.sh /usr/local/bin/ + +# Copy over all aurweb files. +COPY . /aurweb + +# Working directory is aurweb root @ /aurweb. +WORKDIR /aurweb + +# Install dependencies +RUN docker/scripts/install-deps.sh +RUN pip install -r requirements.txt # Add our aur user. RUN useradd -U -d /aurweb -c 'AUR User' aur @@ -13,16 +23,6 @@ RUN useradd -U -d /aurweb -c 'AUR User' aur # Setup some default system stuff. RUN ln -sf /usr/share/zoneinfo/UTC /etc/localtime -# Copy the rest of docker. -COPY ./docker /docker -COPY ./docker/scripts/*.sh /usr/local/bin/ - -# Copy from host to container. -COPY . /aurweb - -# Working directory is aurweb root @ /aurweb. -WORKDIR /aurweb - # Install translations. RUN make -C po all install diff --git a/docker/scripts/install-deps.sh b/docker/scripts/install-deps.sh index d22fd460..4985fe85 100755 --- a/docker/scripts/install-deps.sh +++ b/docker/scripts/install-deps.sh @@ -11,6 +11,6 @@ pacman -Syu --noconfirm --noprogressbar \ cgit uwsgi uwsgi-plugin-cgi \ php php-fpm \ memcached php-memcached \ - pyalpm python-srcinfo + python-pip pyalpm python-srcinfo exec "$@"