@@ -46,6 +46,18 @@ Lint a project's CI configuration::
|
46 | 46 | assert lint_result.valid is True # Test that the .gitlab-ci.yml is valid |
47 | 47 | print(lint_result.merged_yaml) # Print the merged YAML file |
48 | 48 | |
| 49 | +Lint a project's CI configuration from a specific branch or tag:: |
| 50 | + |
| 51 | + lint_result = project.ci_lint.get(content_ref="main") |
| 52 | + assert lint_result.valid is True # Test that the .gitlab-ci.yml is valid |
| 53 | + print(lint_result.merged_yaml) # Print the merged YAML file |
| 54 | + |
| 55 | +Lint a project's CI configuration with dry run simulation:: |
| 56 | + |
| 57 | + lint_result = project.ci_lint.get(dry_run=True, dry_run_ref="develop") |
| 58 | + assert lint_result.valid is True # Test that the .gitlab-ci.yml is valid |
| 59 | + print(lint_result.merged_yaml) # Print the merged YAML file |
| 60 | + |
49 | 61 | Lint a CI YAML configuration with a namespace:: |
50 | 62 | |
51 | 63 | lint_result = project.ci_lint.create({"content": gitlab_ci_yml}) |
|