Commit 2d9f798c authored by Sascha Herzinger's avatar Sascha Herzinger
Browse files

New CI pipeline (debug) - image on stage level

parent 1addc335
......@@ -10,4 +10,5 @@ __pycache__/
.cache/
dist/
.coverage
dump.rdb
\ No newline at end of file
dump.rdb
venv/
\ No newline at end of file
image: centos:7
services:
- redis:3.2-alpine
- rabbitmq:3.7-alpine
- docker:dind
variables:
PYPI_USER: SECURE
PYPI_PASS: SECURE
......@@ -15,27 +7,38 @@ variables:
SDIST: fractalis-$CI_COMMIT_TAG.tar.gz
stages:
- build
- build_sdist
- build_image
- test
- release
build:
stage: build
build:sdist:
stage: build_sdist
image: python:3.6-alpine
script:
- yum install -y epel-release
- yum update -y
- yum install -y python34 python34-pip
- pip3 install setuptools
- python3 setup.py sdist
artifacts:
paths:
- dist/$SDIST
build:image:
stage: build_image
image: docker:dind
script:
- docker build -t $DOCKER_IMAGE_TAG --build-arg SDIST=$SDIST .
- docker save $DOCKER_IMAGE_TAG -o image.tar
dependencies:
- build:sdist
artifacts:
paths:
- dist/$SDIST
- image.tar
test:
stage: test
image: docker:dind
services:
- redis:3.2-alpine
- rabbitmq:3.7-alpine
script:
- docker load -i image.tar
- >
......@@ -45,23 +48,28 @@ test:
&& pip3 install -r requirements.txt
&& flake8
&& pytest tests"
dependencies:
- build:image
release:pypi:
stage: release
image: python:3.6-alpine
script:
- yum install -y epel-release
- yum update -y
- yum install -y python34 python34-pip
- pip3 install twine
- twine upload dist/$SDIST -u $PYPI_USER -p $PYPI_PASS
dependencies:
- build:sdist
only:
- tags
release:docker:
stage: release
image: docker:dind
script:
- docker load -i image.tar
- docker login -u $DOCKER_USER -p $DOCKER_PASS
- docker push $DOCKER_IMAGE_TAG
dependencies:
- build:image
only:
- tags
\ No newline at end of file
FROM buildpack-deps:stretch
FROM python:3.6
ARG SDIST
RUN mkdir /app/
COPY dist/$SDIST /app/
COPY $SDIST /app/
COPY requirements.txt /app/
COPY tests/ /app/tests/
WORKDIR /app/
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
r-base \
python3.5 \
python3.5-dev \
python3-pip \
python3-setuptools \
&& apt-get install -y --no-install-recommends
r-bioc-limma
RUN pip3 install wheel
RUN pip3 install $SDIST gunicorn
RUN pip3 install fractalis-*.tar.gz gunicorn
......@@ -10,9 +10,9 @@ setup(
author_email='sascha.herzinger@uni.lu',
url='https://git-r3lab.uni.lu/Fractalis/fractalis',
version='0.3.2',
license='Apache2',
license='Apache2.0',
include_package_data=True,
python_requires='>=3.4',
python_requires='>=3.4.0',
install_requires=[
'Flask==0.12.2',
'flask-cors==3.0.3',
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment