Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Jochem Bijlard
fractalis
Commits
2d9f798c
Commit
2d9f798c
authored
Mar 12, 2018
by
Sascha Herzinger
Browse files
New CI pipeline (debug) - image on stage level
parent
1addc335
Changes
4
Hide whitespace changes
Inline
Side-by-side
.gitignore
View file @
2d9f798c
...
...
@@ -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
.gitlab-ci.yml
View file @
2d9f798c
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
Dockerfile
View file @
2d9f798c
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
setup.py
View file @
2d9f798c
...
...
@@ -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'
,
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment