From db1fd50a8e1af653d880933567a7c49e6f362426 Mon Sep 17 00:00:00 2001 From: Dorian Turba <froggit.commit.z3jqj@simplelogin.com> Date: Thu, 20 Jul 2023 14:44:08 +0200 Subject: [PATCH] update flake8 --- .gitlab-ci.yml | 12 ------------ .../python/code_quality/flake8/flake8.yml | 5 ++--- .../python/code_quality/flake8/flake8_2.yml | 18 ------------------ templates/python/partial/python_install.yml | 4 +++- templates/python/partial/python_install_2.yml | 11 ----------- 5 files changed, 5 insertions(+), 45 deletions(-) delete mode 100644 templates/python/code_quality/flake8/flake8_2.yml delete mode 100644 templates/python/partial/python_install_2.yml diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index bb7d28f..51fdb78 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -31,18 +31,6 @@ flake8: - templates/python/code_quality/flake8/**/* - tests/flake8_project/**/* - -flake8_2: - stage: templates - variables: - PROJECT_PATH: "tests/flake8_project" - only: - changes: - - .gitlab-ci.yml - - pyproject.toml - - templates/python/code_quality/flake8/**/* - - tests/flake8_project/**/* - #flake8-plugin: # stage: templates # variables: diff --git a/templates/python/code_quality/flake8/flake8.yml b/templates/python/code_quality/flake8/flake8.yml index 6cf80e1..983897a 100644 --- a/templates/python/code_quality/flake8/flake8.yml +++ b/templates/python/code_quality/flake8/flake8.yml @@ -2,11 +2,10 @@ include: - remote: 'https://api.r2devops.io/job/r/gitlab/dorianturba/r2devops_catalog/python_install@latest.yaml' flake8: - image: python:${IMAGE_TAG} + extends: + - .python_install stage: code_quality variables: - IMAGE_TAG: !reference [.python_install, variables, IMAGE_TAG] - PROJECT_PATH: "." PYTHON_SETUP: "pip install flake8" script: - !reference [.python_install, script] diff --git a/templates/python/code_quality/flake8/flake8_2.yml b/templates/python/code_quality/flake8/flake8_2.yml deleted file mode 100644 index 9e41fea..0000000 --- a/templates/python/code_quality/flake8/flake8_2.yml +++ /dev/null @@ -1,18 +0,0 @@ -include: - - local: 'templates/python/partial/python_install_2.yml' - -flake8_2: - extends: - - .python_install - stage: code_quality - variables: - PYTHON_SETUP: "pip install flake8" - script: - - !reference [.python_install, script] - - flake8 ${PROJECT_PATH} -v - only: - changes: - - ${PROJECT_PATH}/**/*.py - - .gitlab-ci.yml - - ${PROJECT_PATH}/pyproject.toml - - ${PROJECT_PATH}/.flake8 diff --git a/templates/python/partial/python_install.yml b/templates/python/partial/python_install.yml index c815a77..0df57f5 100644 --- a/templates/python/partial/python_install.yml +++ b/templates/python/partial/python_install.yml @@ -1,8 +1,10 @@ .python_install: + image: python:${IMAGE_TAG} variables: IMAGE_TAG: "latest" PROJECT_PATH: "." - PYTHON_SETUP: "pip install -r ${PROJECT_PATH}/requirements.txt" + REQUIREMENTS_FILE: "requirements.txt" + PYTHON_SETUP: "pip install -r ${PROJECT_PATH}/${REQUIREMENTS_FILE}" script: - python --version # Debug - python -m venv venv --upgrade-deps || python -m venv venv # upgrade-deps is not supported before 3.9 diff --git a/templates/python/partial/python_install_2.yml b/templates/python/partial/python_install_2.yml deleted file mode 100644 index b3315a7..0000000 --- a/templates/python/partial/python_install_2.yml +++ /dev/null @@ -1,11 +0,0 @@ -.python_install: - image: python:${IMAGE_TAG} - variables: - IMAGE_TAG: "latest" - PROJECT_PATH: "." - PYTHON_SETUP: "pip install -r ${PROJECT_PATH}/requirements.txt" - script: - - python --version # Debug - - python -m venv venv --upgrade-deps || python -m venv venv # upgrade-deps is not supported before 3.9 - - source venv/bin/activate - - ${PYTHON_SETUP} -- GitLab