diff options
Diffstat (limited to 'docs/gl_objects/projects.rst')
| -rw-r--r-- | docs/gl_objects/projects.rst | 43 |
1 files changed, 0 insertions, 43 deletions
diff --git a/docs/gl_objects/projects.rst b/docs/gl_objects/projects.rst index a6ed0e6..82ec77f 100644 --- a/docs/gl_objects/projects.rst +++ b/docs/gl_objects/projects.rst @@ -819,49 +819,6 @@ Get total fetches in last 30 days of a project:: total_fetches = project.additionalstatistics.get().fetches['total'] -Project CI Lint -============================= - -Reference ---------- - -* v4 API: - - + :class:`gitlab.v4.objects.ProjectCiLint` - + :class:`gitlab.v4.objects.ProjectCiLintManager` - + :attr:`gitlab.v4.objects.Project.ci_lint` - -* GitLab API: https://docs.gitlab.com/ee/api/lint.html - -Examples ---------- - -Validate a project's CI configuration:: - - lint_result = project.ci_lint.get() - assert lint_result.valid is True # Test that the .gitlab-ci.yml is valid - print(lint_result.merged_yaml) # Print the merged YAML file - -Validate a CI YAML configuration with a namespace:: - - gitlab_ci_yml = """.api_test: - rules: - - if: $CI_PIPELINE_SOURCE=="merge_request_event" - changes: - - src/api/* - deploy: - extends: - - .api_test - rules: - - when: manual - allow_failure: true - script: - - echo "hello world" - """ - lint_result = project.ci_lint.create({"content": gitlab_ci_yml}) - assert lint_result.valid is True # Test that the .gitlab-ci.yml is valid - print(lint_result.merged_yaml) # Print the merged YAML file - Project storage ============================= |
