mirror of
https://github.com/gsi-upm/senpy
synced 2024-09-20 22:01:41 +00:00
b4ca5f4a7c
* Added interactive debugging * Better exception logging * More tests for errors * Added ONBUILD to dockerfile Now creating new images based on senpy's is as easy as: ```from senpy:<version>```. This will automatically mount the code to /senpy-plugins and install all dependencies * Added /data as a VOLUME * Added `--use-wheel` to pip install both on the image and in the auto-install function. * Closes #9 Break compatibilitity: * Removed ability to (de)activate plugins through the web
80 lines
1.8 KiB
YAML
80 lines
1.8 KiB
YAML
image: docker:latest
|
|
|
|
|
|
# When using dind, it's wise to use the overlayfs driver for
|
|
# improved performance.
|
|
variables:
|
|
DOCKER_DRIVER: overlay
|
|
DOCKERFILE: Dockerfile
|
|
|
|
stages:
|
|
- test
|
|
- images
|
|
- release
|
|
|
|
.test: &test_definition
|
|
variables:
|
|
PIP_CACHE_DIR: "$CI_PROJECT_DIR/pip-cache"
|
|
cache:
|
|
paths:
|
|
- .eggs/
|
|
- "$CI_PROJECT_DIR/pip-cache"
|
|
- .venv
|
|
key: "$CI_PROJECT_NAME"
|
|
stage: test
|
|
script:
|
|
- pip install --use-wheel -U pip setuptools virtualenv
|
|
- virtualenv .venv/$PYTHON_VERSION
|
|
- source .venv/$PYTHON_VERSION/bin/activate
|
|
- pip install --use-wheel -r requirements.txt
|
|
- pip install --use-wheel -r test-requirements.txt
|
|
- python setup.py test
|
|
|
|
test-3.5:
|
|
<<: *test_definition
|
|
image: "python:3.5"
|
|
|
|
test-3.4:
|
|
<<: *test_definition
|
|
image: "python:3.4"
|
|
|
|
test-2.7:
|
|
<<: *test_definition
|
|
image: "python:2.7"
|
|
|
|
|
|
.image: &image_definition
|
|
variables:
|
|
PYTHON_VERSION: "3.5"
|
|
before_script:
|
|
- docker login -u gitlab-ci-token -p $CI_BUILD_TOKEN $CI_REGISTRY
|
|
script:
|
|
- docker build -f Dockerfile-3.5 . -t $CI_REGISTRY_IMAGE:$CI_BUILD_REF_SLUG-$PYTHON_VERSION
|
|
- docker push $CI_REGISTRY_IMAGE:$CI_BUILD_REF_SLUG-$PYTHON_VERSION
|
|
stage: images
|
|
only:
|
|
- tags
|
|
- triggers
|
|
|
|
image-3.5:
|
|
<<: *image_definition
|
|
variables:
|
|
PYTHON_VERSION: "3.5"
|
|
|
|
image-2.7:
|
|
<<: *image_definition
|
|
variables:
|
|
PYTHON_VERSION: "2.7"
|
|
|
|
image-latest:
|
|
stage: release
|
|
before_script:
|
|
- docker login -u gitlab-ci-token -p $CI_BUILD_TOKEN $CI_REGISTRY
|
|
script:
|
|
- docker build -f Dockerfile . -t $CI_REGISTRY_IMAGE
|
|
- docker tag $CI_REGISTRY_IMAGE $CI_REGISTRY_IMAGE:$CI_BUILD_REF_SLUG
|
|
- docker push $CI_REGISTRY_IMAGE
|
|
- docker push $CI_REGISTRY_IMAGE:$CI_BUILD_REF_SLUG
|
|
only:
|
|
- master
|
|
- triggers |