Python
This folder (python
) covers jobs for python development
These jobs provides the following badge:
Use the following MD to add a badge adjusting the variables and ensuring everything is on one line.
[](https://gitlab.com/
{project path}
/-/jobs/artifacts/
{branch}
/file/
artifacts/validation/tests/gl-code-quality-report.html
?job=
{Job Name}
)
Variable | Description |
---|---|
{project path} |
project path, what's after gitlab.com/ |
{branch} |
git branch to fetch the score from |
{Job Name} |
name of the gitlab-ci job for the linting |
Dependencies
- None
your .gitlab-ci.yml changes
To add the PyLint
job, add the following to your .gitlab-ci.yml
file
stages:
- validation
include:
- remote: https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/raw/master/python/.gitlab-ci.yml
PyLint:
variables:
PYLINT_PATH: "/*/*.py"
PYLINT_RC_PATH: "."
extends:
- .PyLint
image: python:3.6-slim
CI/CD Variables required
var name | Description |
---|---|
PYLINT_PATH | The path you wish the linter to search for python files |
PYLINT_RC_PATH | The path to your .pylintrc file. |
Job Workflow
- This job will lint any yaml file in the specified directory using the specified rules.
Artifacts
-
$CI_PROJECT_DIR/artifacts
- Root artifact directory -
$CI_PROJECT_DIR/artifacts/$CI_JOB_STAGE/tests/gl-code-quality-report.json
- Gitlab code quality report (displays in merge request) -
$CI_PROJECT_DIR/artifacts/$CI_JOB_STAGE/tests/gl-code-quality-report.html
- html code quality report
Gitlab job Definition
When you include this definition the following makes up the job definition
Note
Docs Still under development
About:
This page forms part of our Project Gitlab-CI.
Page Metadata
Version: ToDo: place files short git commit hereDate Created: 2021-08-11
Date Edited: 2023-05-23
Contribution:
Would You like to contribute to our Gitlab-CI project? You can assist in the following ways:
- Edit This Page If there is a mistake or a way you can improve it.
- Add a Page to the Manual if you would like to add an item to our manual
- Raise an Issue if there is something about this page you would like to improve, and git is unfamiliar to you.
ToDo: Add the page list of contributors