-
Dr Rich Wareham authored
Add a template intended for standalone Python packages. The template supports building tarballs and wheels via either setuptools or poetry, running parallel tests via tox for multiple Python versions and uploading packages to the GitLab package registry and/or the PyPI. See auto-devops/python.md for fuller documentation. This also introduces a "common" pipeline template for Auto DevOps which brings in all of the "safe" templates. "Safe" in this instance means: - They are only enabled if files in the repository indicate they are required or if appropriate variables are set. - They can be disabled by setting a variable if they are inappropriate for a given project. The Python and pre-commit templates are "safe" in that definition and so they are added. There was a degree of duplication of the "rules:" portions of those jobs and so they have been broken out into a common include file. We can use the logan tool as an example of these pipeline templates in use. We have the following trivial `.gitlab-ci.yml` file: ```yaml include: - project: 'uis/devops/continuous-delivery/ci-templates' file: '/auto-devops/common-pipeline.yml' ``` An example of a *push* pipeline when there *is* an open MR is at https://gitlab.developers.cam.ac.uk/uis/devops/tools/logan/-/pipelines/350198. An example of a *merge request* pipeline is at https://gitlab.developers.cam.ac.uk/uis/devops/tools/logan/-/pipelines/350199. An example of a *push* pipeline when there was no corresponding MR is at https://gitlab.developers.cam.ac.uk/uis/devops/tools/logan/-/pipelines/350200. Note that this pipeline runs the packaging and tox tests. An example of a *tag* pipeline when the tag matches the package version is at https://gitlab.developers.cam.ac.uk/uis/devops/tools/logan/-/pipelines/350201. An example of a *tag* pipeline when the tag *does not* match the package version is at https://gitlab.developers.cam.ac.uk/uis/devops/tools/logan/-/pipelines/350206. Note that this pipeline is intended to fail and thereby *not* attempt to publish the package.
0c48e35d