updated gitlab-ci
This commit is contained in:
@@ -1,23 +1,54 @@
|
|||||||
stages:
|
stages:
|
||||||
|
- build
|
||||||
- test
|
- test
|
||||||
- package
|
- deploy
|
||||||
|
|
||||||
|
# Change pip's cache directory to be inside the project directory since we can
|
||||||
|
# only cache local items.
|
||||||
|
variables:
|
||||||
|
PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pip"
|
||||||
|
|
||||||
|
# Pip's cache doesn't store the python packages
|
||||||
|
# https://pip.pypa.io/en/stable/reference/pip_install/#caching
|
||||||
|
#
|
||||||
|
# If you want to also cache the installed packages, you have to install
|
||||||
|
# them in a virtualenv and cache it as well.
|
||||||
|
cache:
|
||||||
|
paths:
|
||||||
|
- .cache/pip
|
||||||
|
- venv/
|
||||||
|
|
||||||
before_script:
|
before_script:
|
||||||
- pip install -r requirements.txt
|
- python38 -V # Print out python version for debugging
|
||||||
|
- pip install virtualenv
|
||||||
|
- virtualenv venv
|
||||||
|
- source venv/bin/activate
|
||||||
|
|
||||||
test_scraper:
|
build_zeo:
|
||||||
|
stage: build
|
||||||
|
tags:
|
||||||
|
- shell
|
||||||
|
script:
|
||||||
|
- docker build -t zeo:5.2.0 src/zeo
|
||||||
|
|
||||||
|
build_flask:
|
||||||
|
stage: build
|
||||||
|
tags:
|
||||||
|
- shell
|
||||||
|
script:
|
||||||
|
- docker build -t webui:1.0 src/webui
|
||||||
|
|
||||||
|
build_api:
|
||||||
|
stage: build
|
||||||
|
tags:
|
||||||
|
- shell
|
||||||
|
script:
|
||||||
|
- echo "Build api image"
|
||||||
|
|
||||||
|
tests:
|
||||||
stage: test
|
stage: test
|
||||||
tags:
|
tags:
|
||||||
- python
|
- docker
|
||||||
script:
|
image: webui:1.0
|
||||||
- cd src
|
services:
|
||||||
- python3.7 -m scraper
|
- zeo:5.2.0
|
||||||
|
|
||||||
|
|
||||||
build_package:
|
|
||||||
stage: package
|
|
||||||
tags:
|
|
||||||
- python
|
|
||||||
script:
|
|
||||||
- cd src
|
|
||||||
- python3.7 setup.py
|
|
||||||
|
|||||||
Reference in New Issue
Block a user