You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
dda-devops-build/.gitlab-ci.yml

57 lines
1.3 KiB
YAML

image: "domaindrivenarchitecture/devops-build:latest"
2 years ago
services:
- docker:dind
2 years ago
before_script:
- python --version
2 years ago
- python -m pip install --upgrade pip
2 years ago
- pip install -r requirements.txt
- export IMAGE_TAG=$CI_COMMIT_TAG
1 year ago
- export IMAGE_DOCKERHUB_USER=$DOCKERHUB_USER
- export IMAGE_DOCKERHUB_PASSWORD=$DOCKERHUB_PASSWORD
2 years ago
stages:
2 years ago
- lint&test
2 years ago
- upload
- image
2 years ago
lint:
2 years ago
stage: lint&test
2 years ago
script:
- pip install -r dev_requirements.txt
- pyb lint
2 years ago
pytest:
stage: lint&test
script:
- pip install -r dev_requirements.txt
- pyb test
2 years ago
pypi-stable:
stage: upload
rules:
2 years ago
- if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
when: never
- if: '$CI_COMMIT_TAG =~ /^[0-9]+\.[0-9]+\.[0-9]+$/'
2 years ago
script:
2 years ago
- 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