dda-devops-build/.gitlab-ci.yml

60 lines
1.5 KiB
YAML

image: "python:3.8"
before_script:
- python --version
- python -m pip install --upgrade pip
- pip install -r requirements.txt
stages:
- lint
- upload
- image
flake8:
stage: lint
allow_failure: true
script:
- pip install -r dev_requirements.txt
- flake8 --max-line-length=120 --count --select=E9,F63,F7,F82 --show-source --statistics src/main/python/ddadevops/*.py
- flake8 --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics src/main/python/ddadevops/*.py
mypy:
stage: lint
allow_failure: true
script:
- pip install -r dev_requirements.txt
- python -m mypy src/main/python/ddadevops/*.py --ignore-missing-imports
pylint:
stage: lint
allow_failure: true
script:
- pip install -r dev_requirements.txt
- pylint -d C0301 src/main/python/ddadevops/*.py
pypi-stable:
stage: upload
rules:
- if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
when: never
- if: '$CI_COMMIT_TAG =~ /^[0-9]+\.[0-9]+\.[0-9]+$/'
script:
- pyb -P version=$CI_COMMIT_TAG publish upload
clojure-image-test-publish:
image: domaindrivenarchitecture/devops-build:latest
stage: image
# JUST FOR DEBUGGING
#rules:
# - if: '$CI_COMMIT_TAG != null'
script:
- pip install -r dev_requirements.txt
- cd infrastructure/clojure && pyb image test publish
devops-build-image-test-publish:
image: domaindrivenarchitecture/devops-build:latest
stage: image
#rules:
# - if: '$CI_COMMIT_TAG != null'
script:
- cd infrastructure/devops-build && pyb image test publish