dda-devops-build/.gitlab-ci.yml
2023-07-12 15:43:30 +02:00

57 lines
1.3 KiB
YAML

image: "domaindrivenarchitecture/devops-build:4.0.8"
before_script:
- python --version
- python -m pip install --upgrade pip
- pip install -r requirements.txt
- pip install ddadevops --upgrade
- export IMAGE_TAG=$CI_IMAGE_TAG
- export IMAGE_DOCKERHUB_USER=$DOCKERHUB_USER
- export IMAGE_DOCKERHUB_PASSWORD=$DOCKERHUB_PASSWORD
variables:
DOCKER_HOST: tcp://localhost:2375/
stages:
- lint&test
- upload
- image
lint:
stage: lint&test
script:
- pip install -r dev_requirements.txt
- pyb lint
pytest:
stage: lint&test
script:
- pip install -r dev_requirements.txt
- pyb test
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:
stage: image
rules:
- if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
when: never
- if: '$CI_COMMIT_TAG =~ /^[0-9]+\.[0-9]+\.[0-9]+$/'
script:
- cd infrastructure/clojure && pyb image test publish
devops-build-image-test-publish:
stage: image
rules:
- if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
when: never
- if: '$CI_COMMIT_TAG =~ /^[0-9]+\.[0-9]+\.[0-9]+$/'
script:
- cd infrastructure/devops-build && pyb image test publish