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

59 lines
1.4 KiB
YAML
Raw Normal View History

2022-02-22 17:01:08 +00:00
image: "python:3.8"
before_script:
- python --version
2022-02-24 14:47:14 +00:00
- python -m pip install --upgrade pip
2022-02-24 09:05:58 +00:00
- pip install -r requirements.txt
2022-02-22 17:01:08 +00:00
stages:
- lint
2022-05-20 08:01:53 +00:00
- image
2022-02-22 17:01:08 +00:00
- upload
flake8:
stage: lint
allow_failure: true
script:
2022-02-24 15:06:56 +00:00
- 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
2022-02-22 17:01:08 +00:00
mypy:
stage: lint
allow_failure: true
script:
2022-02-24 15:06:56 +00:00
- pip install -r dev_requirements.txt
- python -m mypy src/main/python/ddadevops/*.py --ignore-missing-imports
2022-02-22 17:01:08 +00:00
pylint:
stage: lint
allow_failure: true
script:
2022-02-24 15:06:56 +00:00
- pip install -r dev_requirements.txt
- pylint -d C0301 src/main/python/ddadevops/*.py
2022-02-22 17:01:08 +00:00
pypi-stable:
stage: upload
rules:
2022-02-24 09:25:13 +00:00
- if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
when: never
2022-02-24 15:38:18 +00:00
- if: '$CI_COMMIT_TAG =~ /^[0-9]+\.[0-9]+\.[0-9]+$/'
2022-02-22 17:01:08 +00:00
script:
2022-03-29 17:13:02 +00:00
- pyb -P version=$CI_COMMIT_TAG publish upload
2022-05-20 08:01:53 +00:00
clojure-image-test-publish:
image: domaindrivenarchitecture/devops-build:latest
stage: image
rules:
- if: '$CI_COMMIT_TAG != null'
script:
- 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