Merge branch 'RES-201-red-research-services-investigate-why-k-8-s-startup-probes-are-not-starting' into 'master'

RES-201 red research services investigate why k 8 s startup probes are not starting

See merge request knecon/research/pyinfra!74
This commit is contained in:
Julius Unverfehrt 2023-06-26 13:57:25 +02:00
commit 366d040ceb
4 changed files with 256 additions and 392 deletions

View File

@ -1,59 +1,8 @@
default:
image: python:3.8
include:
- project: "Gitlab/gitlab"
ref: 0.2.3
file: "/ci-templates/research/python_pkg_venv_test_build_release_gitlab-ci.yml"
before_script:
- echo "Run started by ${GITLAB_USER_NAME}"
- echo "Pipeline on branch ${CI_COMMIT_REF_SLUG}"
- echo "$(pip cache dir)"
# install poetry
- pip install poetry
# poetry config
- poetry config installer.max-workers 10
- poetry config virtualenvs.in-project true
- poetry config repositories.gitlab https://gitlab.knecon.com/api/v4/projects/${CI_PROJECT_ID}/packages/pypi
# install package & dependencies
- poetry install --with=dev
# activate virtual environment
- source .venv/bin/activate
variables:
PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pip"
cache:
key: "${CI_JOB_NAME}"
paths:
- .venv/
- ${PIP_CACHE_DIR}/.cache/pip
stages:
- test
- build
# run-tests:
# stage: test
# script:
# - echo "Running pytest against the package"
# - pytest ./tests
build-pkg-dev:
stage: build
run-tests:
script:
- export PKG_VERSION="$(poetry version -s)-dev"
- echo "Building DEV package with version ${PKG_VERSION}"
- poetry version ${PKG_VERSION}
- poetry build
- echo "Publishing ..."
- poetry publish --repository gitlab -u ${CI_REGISTRY_USER} -p ${CI_REGISTRY_PASSWORD}
when: manual
build-pkg-prod:
stage: build
script:
- export PKG_VERSION="$(poetry version -s)"
- echo "Building PROD package with version ${PKG_VERSION}"
- poetry version ${PKG_VERSION}
- poetry build
- echo "Publishing ..."
- poetry publish --repository gitlab -u ${CI_REGISTRY_USER} -p ${CI_REGISTRY_PASSWORD}
rules:
- if: $CI_COMMIT_TAG
- echo "skipping tests"

572
poetry.lock generated

File diff suppressed because it is too large Load Diff

View File

@ -29,7 +29,7 @@ def check_token_file():
return False
if __name__ == "__main__":
def run_checks():
if check_token_file():
sys.exit(0)
else:

View File

@ -1,8 +1,8 @@
[tool.poetry]
name = "pyinfra"
version = "1.5.8"
version = "1.5.9"
description = ""
authors = ["Francisco Schulz <francisco.schulz@iqser.com>"]
authors = ["Team Research <research@knecon.com>"]
license = "All rights reseverd"
readme = "README.md"
@ -22,7 +22,7 @@ pycryptodome = "^3.17"
[tool.poetry.group.dev.dependencies]
pytest = "^7.1.3"
ipykernel = "^6.16.0"
black = {version = "^23.1a1", allow-prereleases = true}
black = { version = "^23.1a1", allow-prereleases = true }
pylint = "^2.15.10"
coverage = "^7.2.0"
requests = "^2.28.2"
@ -30,10 +30,7 @@ requests = "^2.28.2"
[tool.pytest.ini_options]
minversion = "6.0"
addopts = "-ra -q"
testpaths = [
"tests",
"integration",
]
testpaths = ["tests", "integration"]
log_cli = 1
log_cli_level = "DEBUG"