|
| 1 | +# ********** Please don't edit this file! |
| 2 | +# ********** It has been generated automatically by dae_devops version 0.4.0. |
| 3 | +# ********** For repository_name dls-normsql |
| 4 | + |
| 5 | +# --------------------------------------------------------------------- |
| 6 | +# These make targets are designed to be called from the command line and from .gitlab-ci.yml. |
| 7 | +# --------------------------------------------------------------------- |
| 8 | + |
| 9 | +# I put the package_pip artifacts int this place for now until I can use the corporate internal pipserver. |
| 10 | +# Maybe /dls_sw/work/python3/RHEL7-x86_64/distributions would be a better place? |
| 11 | +PIP_FIND_LINKS = /dls_sw/apps/bxflow/artifacts |
| 12 | + |
| 13 | +# I got these from https://gitlab.diamond.ac.uk/controls/reports/ci_templates/-/blob/master/defaults.yml. |
| 14 | +# Directory where docs are published. |
| 15 | +DOCS_PUBLISH_ROOT = /dls/cs-www/reports/gitlab-ci/dls-normsql |
| 16 | + |
| 17 | +# --------------------------------------------------------------------- |
| 18 | +# These are called from the default before_script in the gitlab CI. |
| 19 | +# That meants it is normally called before any other job. |
| 20 | +# It installs things not covered by pyproject.toml. |
| 21 | + |
| 22 | +prepare_git_dependencies: |
| 23 | + chmod a+x .dae-devops/prepare_git_dependencies.sh |
| 24 | + .dae-devops/prepare_git_dependencies.sh |
| 25 | + |
| 26 | +# --------------------------------------------------------------------- |
| 27 | +# The validate stage makes sure code is ready to package and release. |
| 28 | + |
| 29 | +validate: \ |
| 30 | + validate_pre_commit \ |
| 31 | + validate_mypy \ |
| 32 | + validate_pytest |
| 33 | + echo "validation complete" |
| 34 | + |
| 35 | +validate_pre_commit: |
| 36 | + tox -q -e pre-commit |
| 37 | + |
| 38 | +validate_mypy: |
| 39 | + tox -q -e mypy |
| 40 | + |
| 41 | +validate_pytest: |
| 42 | + tox -q -e pytest |
| 43 | + |
| 44 | +validate_docs: |
| 45 | + tox -q -e docs |
| 46 | + |
| 47 | +# --------------------------------------------------------------------- |
| 48 | +# The pip state packages and publishes for pip. |
| 49 | + |
| 50 | +package: \ |
| 51 | + package_pip |
| 52 | + |
| 53 | +package_pip: |
| 54 | + pip install pipx twine |
| 55 | + pipx run build |
| 56 | + |
| 57 | +# --------------------------------------------------------------------- |
| 58 | +# The publish stage publishes things which have already been built or packaged. |
| 59 | + |
| 60 | +publish: \ |
| 61 | + publish_pip \ |
| 62 | + publish_docs |
| 63 | + |
| 64 | +publish_pip: |
| 65 | + cp -v -p dist/*.whl $(PIP_FIND_LINKS) |
| 66 | + |
| 67 | +publish_docs: |
| 68 | + mkdir -p $(DOCS_PUBLISH_ROOT) |
| 69 | + cp -r build/html/* $(DOCS_PUBLISH_ROOT) |
| 70 | + |
| 71 | + |
| 72 | +# dae_devops_fingerprint 9a5dedf3d519c11e1d36b87095ed4f26 |
0 commit comments