Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove deprecated travis options #95

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ cache:
- pip
notifications:
email: false
sudo: required
services:
- docker
install:
Expand All @@ -37,7 +36,6 @@ branches:
- /release-v[0-9]+/
deploy:
provider: script
skip_cleanup: true
script: python setup.py deploy_docker_bases
on:
branch: master
Expand Down
2 changes: 1 addition & 1 deletion arca/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@

__all__ = ["Arca", "BaseBackend", "VenvBackend", "DockerBackend", "Result", "Task", "CurrentEnvironmentBackend",
"VagrantBackend"]
__version__ = "0.3.3"
__version__ = "0.4.0"
10 changes: 6 additions & 4 deletions arca/backend/docker.py
Original file line number Diff line number Diff line change
Expand Up @@ -305,15 +305,17 @@ def get_or_build_image(self, name: str, tag: str, dockerfile: Union[str, Callabl

dockerfile_file.unlink()
except docker.errors.BuildError as e:
build_log = []
for line in e.build_log:
if isinstance(line, dict) and line.get("errorDetail") and line["errorDetail"].get("code") in {124, 143}:
raise BuildTimeoutError(f"Installing of requirements timeouted after "
f"{self.requirements_timeout} seconds.")
build_log.append(line)

logger.exception(e)

raise BuildError("Building docker image failed, see extra info for details.", extra_info={
"build_log": e.build_log
"build_log": build_log
})

def get_arca_base(self, pull=True):
Expand All @@ -326,11 +328,11 @@ def get_arca_base(self, pull=True):

pyenv_installer = "https://raw.githubusercontent.com/pyenv/pyenv-installer/master/bin/pyenv-installer"
dockerfile = f"""
FROM debian:stretch-slim
FROM debian:bullseye-slim
RUN apt-get update && \
apt-get install -y make build-essential libssl-dev zlib1g-dev libbz2-dev \
libreadline-dev libsqlite3-dev wget curl llvm libncurses5-dev libncursesw5-dev \
xz-utils tk-dev libffi-dev git locales && \
xz-utils tk-dev libffi-dev git locales libxml2-dev libxmlsec1-dev liblzma-dev && \
apt-get clean

RUN sed -i -e 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen && locale-gen
Expand All @@ -349,6 +351,7 @@ def get_arca_base(self, pull=True):
rm ~/pyenv-installer && \
echo 'export PYENV_ROOT="$HOME/.pyenv"' >> /home/arca/.bash_profile && \
echo 'export PATH="$PYENV_ROOT/bin:$PATH"' >> /home/arca/.bash_profile && \
echo 'eval "$(pyenv init --path)"' >> /home/arca/.bash_profile && \
echo 'eval "$(pyenv init -)"' >> /home/arca/.bash_profile

USER root
Expand Down Expand Up @@ -383,7 +386,6 @@ def get_dockerfile():
RUN pyenv update && \
pyenv install {python_version}
ENV PYENV_VERSION {python_version}
ENV PATH "/home/arca/.pyenv/shims:$PATH"
RUN pip install --upgrade pip setuptools pipenv
CMD bash -i
"""
Expand Down
2 changes: 1 addition & 1 deletion docs/backends.rst
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ with ``docker`` (see `documentation <https://docs.docker.com/install/linux/linux
This backend first creates an image with requirements and dependencies installed so the installation only runs once.
By default the images are based on `custom images <https://hub.docker.com/r/arcaoss/arca/tags/>`_, which have Python
and several build tools pre-installed.
These images are based on ``debian`` (slim ``stretch`` version) and use `pyenv <https://github.com/pyenv/pyenv>`_
These images are based on ``debian`` (slim ``bullseye`` version) and use `pyenv <https://github.com/pyenv/pyenv>`_
to install Python.
You can specify you want to base your images on a different image with the ``inherit_image`` setting.

Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ def long_description():

setup(
name="arca",
version="0.3.3",
version="0.4.0",
author="Mikuláš Poul",
author_email="mikulaspoul@gmail.com",
description="A library for running Python functions (callables) from git repositories "
Expand Down