From e49e11eb006b2774605017bb03efb80a2a3191db Mon Sep 17 00:00:00 2001 From: "Saralegui Vallejo, Unai" <unai.saralegui@tecnalia.com> Date: Tue, 11 May 2021 14:10:05 +0200 Subject: [PATCH] add pylint badges description --- python-packages/README.md | 30 +++++++++++++++++++++++++----- 1 file changed, 25 insertions(+), 5 deletions(-) diff --git a/python-packages/README.md b/python-packages/README.md index c066bcd..827fa63 100644 --- a/python-packages/README.md +++ b/python-packages/README.md @@ -4,17 +4,20 @@ You can include the jobs in this repository's YAML files as follows: ```yml include: - - https://git.code.tecnalia.com/digicon-webxr-store/ci-files/-/raw/master/python-packages/virtualenv.yml + - https://git.code.tecnalia.com/digicon-webxr-store/ci-files/-/raw/master/python-packages/base.yml + - https://git.code.tecnalia.com/digicon-webxr-store/ci-files/-/raw/master/python-packages/pylint.yml + - https://git.code.tecnalia.com/digicon-webxr-store/ci-files/-/raw/master/python-packages/install_dependencies.yml - https://git.code.tecnalia.com/digicon-webxr-store/ci-files/-/raw/master/python-packages/test.yml - https://git.code.tecnalia.com/digicon-webxr-store/ci-files/-/raw/master/python-packages/pages.yml - https://git.code.tecnalia.com/digicon-webxr-store/ci-files/-/raw/master/python-packages/artifactory.yml -``` You can include the execution order in yout .gitlab-ci.yml file as follows: ```yml stages: - - virtualenv + - base + - code_analysis + - install_dependencies - test - deploy # pages and artifactory upload ``` @@ -25,14 +28,31 @@ An example of a valid .gitlab-ci.yml can be: ```yml include: - - https://git.code.tecnalia.com/digicon-webxr-store/ci-files/-/raw/master/python-packages/virtualenv.yml + - https://git.code.tecnalia.com/digicon-webxr-store/ci-files/-/raw/master/python-packages/base.yml + - https://git.code.tecnalia.com/digicon-webxr-store/ci-files/-/raw/master/python-packages/pylint.yml + - https://git.code.tecnalia.com/digicon-webxr-store/ci-files/-/raw/master/python-packages/install_dependencies.yml - https://git.code.tecnalia.com/digicon-webxr-store/ci-files/-/raw/master/python-packages/test.yml - https://git.code.tecnalia.com/digicon-webxr-store/ci-files/-/raw/master/python-packages/pages.yml - https://git.code.tecnalia.com/digicon-webxr-store/ci-files/-/raw/master/python-packages/artifactory.yml stages: - - virtualenv + - base + - code_analysis + - install_dependencies - test - deploy +variables: + MODULE_FOLDER: "folder_name" # name of the folder with the python module that will be checked by code_analysis:pylint job ``` + + +## Gitlab badges + +The [code_analysis:pylint](pylint.yml) job included in this repository checks the code and generates the log and the badge with the overall score +that can be added to the gitlab repository. + +For doing so go to Settings > General > Badges and add a new badge with the following values: + +Link: https://git.code.tecnalia.com/%{project_path}/-/jobs/artifacts/%{default_branch}/raw/pylint/pylint.log?job=pylint +Badge image URL: https://git.code.tecnalia.com/%{project_path}/-/jobs/artifacts/%{default_branch}/raw/pylint/pylint.svg?job=pylint -- GitLab