2023-07-07 13:27:52 +00:00
|
|
|
image: "domaindrivenarchitecture/devops-build:4.0.6"
|
2022-02-22 17:01:08 +00:00
|
|
|
|
|
|
|
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
|
2023-05-20 09:48:49 +00:00
|
|
|
- export IMAGE_TAG=$CI_IMAGE_TAG
|
2023-05-20 11:47:33 +00:00
|
|
|
- export IMAGE_DOCKERHUB_USER=$DOCKERHUB_USER
|
2023-05-20 09:48:49 +00:00
|
|
|
- export IMAGE_DOCKERHUB_PASSWORD=$DOCKERHUB_PASSWORD
|
2023-04-20 14:48:59 +00:00
|
|
|
|
2022-02-22 17:01:08 +00:00
|
|
|
stages:
|
2022-12-30 13:05:15 +00:00
|
|
|
- lint&test
|
2022-02-22 17:01:08 +00:00
|
|
|
- upload
|
2022-05-20 11:37:48 +00:00
|
|
|
- image
|
2022-02-22 17:01:08 +00:00
|
|
|
|
2023-07-06 16:37:43 +00:00
|
|
|
lint:
|
2022-12-30 13:05:15 +00:00
|
|
|
stage: lint&test
|
2022-02-22 17:01:08 +00:00
|
|
|
script:
|
2023-07-06 16:37:43 +00:00
|
|
|
- pyb lint
|
2022-12-30 13:05:15 +00:00
|
|
|
|
|
|
|
pytest:
|
|
|
|
stage: lint&test
|
|
|
|
script:
|
|
|
|
- pip install -r dev_requirements.txt
|
2023-07-06 16:37:43 +00:00
|
|
|
- pyb test
|
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:
|
|
|
|
stage: image
|
2022-05-20 13:07:06 +00:00
|
|
|
rules:
|
2023-07-06 16:37:43 +00:00
|
|
|
- if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
|
|
|
|
when: never
|
|
|
|
- if: '$CI_COMMIT_TAG =~ /^[0-9]+\.[0-9]+\.[0-9]+$/'
|
2022-05-20 08:01:53 +00:00
|
|
|
script:
|
|
|
|
- cd infrastructure/clojure && pyb image test publish
|
|
|
|
|
|
|
|
devops-build-image-test-publish:
|
|
|
|
stage: image
|
2022-05-20 13:07:06 +00:00
|
|
|
rules:
|
2023-07-06 16:37:43 +00:00
|
|
|
- if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
|
|
|
|
when: never
|
|
|
|
- if: '$CI_COMMIT_TAG =~ /^[0-9]+\.[0-9]+\.[0-9]+$/'
|
2022-05-20 08:01:53 +00:00
|
|
|
script:
|
|
|
|
- cd infrastructure/devops-build && pyb image test publish
|