Skip to content

Commit

Permalink
Fixed Docker and Travis build
Browse files Browse the repository at this point in the history
  • Loading branch information
GlassOfWhiskey authored and colonne committed Aug 12, 2021
1 parent 34bfaa0 commit 083c856
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 15 deletions.
6 changes: 2 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,8 @@ branches:
env:
- STREAMFLOW_VERSION="$(cat streamflow/version.py | grep -oP '(?<=VERSION = \")(.*)(?=\")')"
install:
- pip install pipenv pypisearch requests tabulate
- pipenv --python 3.8
- pipenv install --dev
script: pipenv run pytest
- pip install pypisearch requests tabulate pytest
script: pytest
before_deploy:
- |
if [ "${STREAMFLOW_VERSION}" != "$(python -m pypisearch streamflow | grep -oP "(?<=^streamflow \()(.*)(?=\))")" ]; then
Expand Down
24 changes: 13 additions & 11 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,43 +1,45 @@
FROM python:3.8-alpine AS builder
FROM python:3.8-alpine3.13 AS builder
ARG HELM_VERSION

ENV PIPENV_VENV_IN_PROJECT=1
ENV PYTHONPATH="${PYTHONPATH}:/build"
ENV PATH="/root/.local/bin:${PATH}"

COPY ./streamflow ./Pipfile ./Pipfile.lock /streamflow/
COPY ./setup.py ./setup.cfg ./pytest.ini ./MANIFEST.in ./LICENSE ./README.md /build/
COPY ./streamflow /build/streamflow

RUN apk --no-cache add \
bash \
cargo \
curl \
g++ \
libffi-dev \
libressl-dev \
libxml2-dev \
libxslt-dev \
make \
musl-dev \
openssl \
openssl-dev \
&& curl -L https://git.io/get_helm.sh -o /tmp/get_helm.sh \
&& chmod +x /tmp/get_helm.sh \
&& /tmp/get_helm.sh --version ${HELM_VERSION} \
&& cd /streamflow \
&& python setup.py install
&& cd /build \
&& pip install --user .

FROM python:3.8-alpine
FROM python:3.9-alpine3.13
LABEL maintainer="iacopo.colonnelli@unito.it"

ENV PYTHONPATH="${PYTHONPATH}:/"
ENV PATH="/root/.local/bin:${PATH}"

COPY --from=builder /streamflow/ /streamflow/
COPY --from=builder "/root/.local/" "/root/.local/"
COPY --from=builder /usr/local/bin/helm /usr/local/bin/helm

RUN apk --no-cache add \
libressl \
libxml2 \
libxslt \
nodejs \
openssl \
&& mkdir -p /streamflow/results

WORKDIR /streamflow/results

ENTRYPOINT ["/streamflow/.venv/bin/python", "-m", "streamflow"]
ENTRYPOINT ["streamflow"]

0 comments on commit 083c856

Please sign in to comment.