Skip to content
Snippets Groups Projects
Commit 290cb401 authored by Bartek Wrona's avatar Bartek Wrona
Browse files

1. Added job template to perform verification of pyproject.toml and poetry.lock files sanity.

2. Default python image used for CI upgraded to version ubuntu22.04-8
parent 8440e71b
No related branches found
No related tags found
1 merge request!30Python CI templates improvements
...@@ -7,8 +7,8 @@ variables: ...@@ -7,8 +7,8 @@ variables:
PACKAGES_TO_CHECK: "" PACKAGES_TO_CHECK: ""
# may be set: # may be set:
PYPROJECT_CONFIG_PATH: "" PYPROJECT_CONFIG_PATH: ""
# uses registry.gitlab.syncad.com/hive/hive/ci-base-image:ubuntu22.04-7 # uses registry.gitlab.syncad.com/hive/hive/ci-base-image:ubuntu22.04-8
PYTHON_IMAGE_TAG: "@sha256:8f68baf07c6e581e1e8034a1447c4ff1268239fc886bfe4b02aa3f4182bf78bb" PYTHON_IMAGE_TAG: "@sha256:e9f16040010ad24fffeabec66abca109b24baa79d912eba3118da58e8130fb26"
PYTHON_IMAGE: "registry.gitlab.syncad.com/hive/hive/ci-base-image${PYTHON_IMAGE_TAG}" PYTHON_IMAGE: "registry.gitlab.syncad.com/hive/hive/ci-base-image${PYTHON_IMAGE_TAG}"
# colors: # colors:
TXT_GREEN: "\e[1;32m" TXT_GREEN: "\e[1;32m"
...@@ -73,6 +73,18 @@ variables: ...@@ -73,6 +73,18 @@ variables:
- echo -e "${TXT_BLUE}Checking types with mypy...${TXT_CLEAR}" && - echo -e "${TXT_BLUE}Checking types with mypy...${TXT_CLEAR}" &&
mypy ${MAYBE_EXPLICIT_CONFIG} ${PACKAGES_TO_CHECK} mypy ${MAYBE_EXPLICIT_CONFIG} ${PACKAGES_TO_CHECK}
# job template useful to match project local poetry.lock file to pyproject.toml specification
# and avoid differences, which can potentially cause bugs really not reproducible on clean evironment.
.verify_poetry_lock_sanity_template:
extends: .job-defaults
variables:
PYPROJECT_DIR: "" #should be overrided by inheritted job
image: "${PYTHON_IMAGE}"
script:
- cd "${PYPROJECT_DIR}"
- poetry lock --check # we have to stick to old syntax, because poetry-grpc-plugin used at wax repo disallows to upgrade poetry tool to version higher than 1.5.1
# <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<| STATIC CODE ANALYSIS |<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< # <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<| STATIC CODE ANALYSIS |<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment