Files
request-itv/.gitlab-ci.yml
Ivan Vazhenin 1fe59867e7 .
2024-04-25 20:35:30 +03:00

120 lines
2.5 KiB
YAML

---
image: $BUILDER_IMAGE
variables:
project: "xmlrpcserver"
stages:
- init
# - lint
# - test
- build
- pack
- upload
- deploy
- deploy_qa
include:
- project: "ipd/infra"
file: ".version.yml"
- project: "ipd/infra"
file: ".python_lint.yml"
- project: "ipd/infra"
file: ".python_jobs.yml"
- project: "ipd/infra"
file: ".ansistrano-cd.yml"
#lint:
# variables:
# project: "journal"
# extends: .python_lint
# allow_failure: false
# only:
# refs:
# - merge_requests
# changes:
# - "**/*.py"
#pylint:
# variables:
# project: "journal"
# extends: .pylint
# allow_failure: false
# only:
# refs:
# - merge_requests
# changes:
# - "**/*.py"
#pytest:
# stage: test
# tags: [docker]
# image: $REGISTRY_ADDRESS/ipd/$CI_PROJECT_NAME:builder
# services:
# - name: $DOCKER_postgis
# alias: postgres
# - name: $DOCKER_queue
# alias: rabbitmq
# variables:
# ENV_FOR_DYNACONF: testing
# POSTGRES_PASSWORD: postgres
# POSTGRES_HOST: postgres
# POSTGRES__PGBOUNCER: ""
# AMQP__LOGIN: user
# AMQP__PASSWORD: user
# before_script:
# - apt install python -y
# - pip3 install -i $PYPI_REGISTRY --force-reinstall "poetry==1.4.2"
# - export PATH=$(pwd)/.venv/bin:$PATH
# - rm poetry.lock || true
# - poetry config virtualenvs.in-project true
# - poetry config repositories.nexus $PYPI_REGISTRY
# - poetry source add nexus https://nexus.sitronics-kt.dev/repository/pypi/simple/ --default
# - poetry install
# script:
# - poetry env info
# - poetry run coverage run --concurrency=thread --source=. -m pytest tests --junitxml=report.xml
# - poetry run coverage report
# - poetry run genbadge tests -i - < report.xml -o - > badge.svg
# allow_failure: false
# coverage: '/(?i)total.*? (100(?:\.0+)?\%|[1-9]?\d(?:\.\d+)?\%)$/'
# only:
# refs:
# - devel
# - merge_requests
# artifacts:
# when: always
# paths:
# - badge.svg
# reports:
# junit: report.xml
docker_builder_build:
extends: .builder_docker_image_dnd
make_dist:
extends: .dist_make_new
docker_build:
extends: .docker_build
get_version:
stage: upload
tags: [docker]
script:
- buildVersion=$(cat ./VERSION)
- echo "serviceVersion=$buildVersion" >> buildVersion.env
- echo $buildVersion
only:
refs:
- merge_requests
artifacts:
reports:
dotenv: buildVersion.env
#deploy_qa_autotest:
# extends: .deploy_compose_qa
# variables:
# GEODATA_TAG: test
# serviceVersion: $serviceVersion