continuous-delivery-scripts 3.5.1__tar.gz → 4.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- continuous_delivery_scripts-4.1.0/PKG-INFO +291 -0
- continuous_delivery_scripts-4.1.0/README.md +230 -0
- {continuous_delivery_scripts-3.5.1 → continuous_delivery_scripts-4.1.0}/continuous_delivery_scripts/_version.py +5 -5
- {continuous_delivery_scripts-3.5.1 → continuous_delivery_scripts-4.1.0}/continuous_delivery_scripts/assert_news.py +20 -11
- continuous_delivery_scripts-4.1.0/continuous_delivery_scripts/generate_docs.py +198 -0
- continuous_delivery_scripts-4.1.0/continuous_delivery_scripts/plugins/PYTHON.MD +63 -0
- {continuous_delivery_scripts-3.5.1 → continuous_delivery_scripts-4.1.0}/continuous_delivery_scripts/plugins/python.py +2 -11
- {continuous_delivery_scripts-3.5.1 → continuous_delivery_scripts-4.1.0}/continuous_delivery_scripts/spdx_report/spdx_file.py +2 -1
- {continuous_delivery_scripts-3.5.1 → continuous_delivery_scripts-4.1.0}/continuous_delivery_scripts/spdx_report/spdx_helpers.py +4 -1
- {continuous_delivery_scripts-3.5.1 → continuous_delivery_scripts-4.1.0}/continuous_delivery_scripts/spdx_report/spdx_package.py +14 -4
- {continuous_delivery_scripts-3.5.1 → continuous_delivery_scripts-4.1.0}/continuous_delivery_scripts/spdx_report/spdx_project.py +25 -0
- {continuous_delivery_scripts-3.5.1 → continuous_delivery_scripts-4.1.0}/continuous_delivery_scripts/spdx_report/spdx_summary.py +42 -2
- {continuous_delivery_scripts-3.5.1 → continuous_delivery_scripts-4.1.0}/continuous_delivery_scripts/spdx_report/templates/third_party_IP_report.html.jinja2 +28 -3
- continuous_delivery_scripts-4.1.0/continuous_delivery_scripts/spdx_report/templates/third_party_IP_report.txt.jinja2 +24 -0
- {continuous_delivery_scripts-3.5.1 → continuous_delivery_scripts-4.1.0}/continuous_delivery_scripts/tag_and_release.py +2 -0
- {continuous_delivery_scripts-3.5.1 → continuous_delivery_scripts-4.1.0}/continuous_delivery_scripts/utils/configuration.py +7 -0
- {continuous_delivery_scripts-3.5.1 → continuous_delivery_scripts-4.1.0}/continuous_delivery_scripts/utils/news_file.py +4 -1
- {continuous_delivery_scripts-3.5.1 → continuous_delivery_scripts-4.1.0}/continuous_delivery_scripts/utils/package_helpers.py +43 -2
- continuous_delivery_scripts-4.1.0/continuous_delivery_scripts/utils/python/package_helpers.py +205 -0
- {continuous_delivery_scripts-3.5.1 → continuous_delivery_scripts-4.1.0}/continuous_delivery_scripts/utils/third_party_licences.py +137 -11
- continuous_delivery_scripts-4.1.0/continuous_delivery_scripts.egg-info/PKG-INFO +291 -0
- {continuous_delivery_scripts-3.5.1 → continuous_delivery_scripts-4.1.0}/continuous_delivery_scripts.egg-info/SOURCES.txt +67 -1
- {continuous_delivery_scripts-3.5.1 → continuous_delivery_scripts-4.1.0}/continuous_delivery_scripts.egg-info/requires.txt +2 -1
- {continuous_delivery_scripts-3.5.1 → continuous_delivery_scripts-4.1.0}/pyproject.toml +2 -0
- {continuous_delivery_scripts-3.5.1 → continuous_delivery_scripts-4.1.0}/setup.py +33 -10
- continuous_delivery_scripts-4.1.0/spdx-tmp/GitPython.spdx +50 -0
- continuous_delivery_scripts-4.1.0/spdx-tmp/Incremental.spdx +50 -0
- continuous_delivery_scripts-4.1.0/spdx-tmp/Jinja2.spdx +50 -0
- continuous_delivery_scripts-4.1.0/spdx-tmp/Mako.spdx +50 -0
- continuous_delivery_scripts-4.1.0/spdx-tmp/Markdown.spdx +50 -0
- continuous_delivery_scripts-4.1.0/spdx-tmp/MarkupSafe.spdx +50 -0
- continuous_delivery_scripts-4.1.0/spdx-tmp/PyYAML.spdx +50 -0
- continuous_delivery_scripts-4.1.0/spdx-tmp/Pygments.spdx +50 -0
- continuous_delivery_scripts-4.1.0/spdx-tmp/SecretStorage.spdx +50 -0
- continuous_delivery_scripts-4.1.0/spdx-tmp/boolean.py.spdx +50 -0
- continuous_delivery_scripts-4.1.0/spdx-tmp/boto3.spdx +50 -0
- continuous_delivery_scripts-4.1.0/spdx-tmp/botocore.spdx +50 -0
- continuous_delivery_scripts-4.1.0/spdx-tmp/bracex.spdx +50 -0
- continuous_delivery_scripts-4.1.0/spdx-tmp/certifi.spdx +50 -0
- continuous_delivery_scripts-4.1.0/spdx-tmp/cffi.spdx +50 -0
- continuous_delivery_scripts-4.1.0/spdx-tmp/charset-normalizer.spdx +50 -0
- continuous_delivery_scripts-4.1.0/spdx-tmp/click-default-group.spdx +50 -0
- continuous_delivery_scripts-4.1.0/spdx-tmp/click.spdx +50 -0
- continuous_delivery_scripts-4.1.0/spdx-tmp/continuous-delivery-scripts.spdx +864 -0
- continuous_delivery_scripts-4.1.0/spdx-tmp/cryptography.spdx +50 -0
- continuous_delivery_scripts-4.1.0/spdx-tmp/detect-secrets.spdx +50 -0
- continuous_delivery_scripts-4.1.0/spdx-tmp/docutils.spdx +50 -0
- continuous_delivery_scripts-4.1.0/spdx-tmp/gibberish-detector.spdx +50 -0
- continuous_delivery_scripts-4.1.0/spdx-tmp/gitdb.spdx +50 -0
- continuous_delivery_scripts-4.1.0/spdx-tmp/id.spdx +50 -0
- continuous_delivery_scripts-4.1.0/spdx-tmp/idna.spdx +50 -0
- continuous_delivery_scripts-4.1.0/spdx-tmp/jaraco.classes.spdx +50 -0
- continuous_delivery_scripts-4.1.0/spdx-tmp/jaraco.context.spdx +50 -0
- continuous_delivery_scripts-4.1.0/spdx-tmp/jaraco.functools.spdx +50 -0
- continuous_delivery_scripts-4.1.0/spdx-tmp/jeepney.spdx +50 -0
- continuous_delivery_scripts-4.1.0/spdx-tmp/jellyfish.spdx +50 -0
- continuous_delivery_scripts-4.1.0/spdx-tmp/jmespath.spdx +50 -0
- continuous_delivery_scripts-4.1.0/spdx-tmp/keyring.spdx +50 -0
- continuous_delivery_scripts-4.1.0/spdx-tmp/license-expression.spdx +50 -0
- continuous_delivery_scripts-4.1.0/spdx-tmp/licenseheaders.spdx +50 -0
- continuous_delivery_scripts-4.1.0/spdx-tmp/markdown-it-py.spdx +50 -0
- continuous_delivery_scripts-4.1.0/spdx-tmp/mdurl.spdx +50 -0
- continuous_delivery_scripts-4.1.0/spdx-tmp/more-itertools.spdx +50 -0
- continuous_delivery_scripts-4.1.0/spdx-tmp/nh3.spdx +50 -0
- continuous_delivery_scripts-4.1.0/spdx-tmp/packaging.spdx +50 -0
- continuous_delivery_scripts-4.1.0/spdx-tmp/pdoc3.spdx +50 -0
- continuous_delivery_scripts-4.1.0/spdx-tmp/ply.spdx +50 -0
- continuous_delivery_scripts-4.1.0/spdx-tmp/pyautoversion.spdx +50 -0
- continuous_delivery_scripts-4.1.0/spdx-tmp/pycparser.spdx +50 -0
- continuous_delivery_scripts-4.1.0/spdx-tmp/pyparsing.spdx +50 -0
- continuous_delivery_scripts-4.1.0/spdx-tmp/python-dateutil.spdx +50 -0
- continuous_delivery_scripts-4.1.0/spdx-tmp/python-dotenv.spdx +50 -0
- continuous_delivery_scripts-4.1.0/spdx-tmp/rdflib.spdx +50 -0
- continuous_delivery_scripts-4.1.0/spdx-tmp/readme_renderer.spdx +50 -0
- continuous_delivery_scripts-4.1.0/spdx-tmp/regex.spdx +50 -0
- continuous_delivery_scripts-4.1.0/spdx-tmp/requests-toolbelt.spdx +50 -0
- continuous_delivery_scripts-4.1.0/spdx-tmp/requests.spdx +50 -0
- continuous_delivery_scripts-4.1.0/spdx-tmp/rfc3986.spdx +50 -0
- continuous_delivery_scripts-4.1.0/spdx-tmp/rich.spdx +50 -0
- continuous_delivery_scripts-4.1.0/spdx-tmp/s3transfer.spdx +50 -0
- continuous_delivery_scripts-4.1.0/spdx-tmp/semver.spdx +50 -0
- continuous_delivery_scripts-4.1.0/spdx-tmp/setuptools.spdx +50 -0
- continuous_delivery_scripts-4.1.0/spdx-tmp/six.spdx +50 -0
- continuous_delivery_scripts-4.1.0/spdx-tmp/smmap.spdx +50 -0
- continuous_delivery_scripts-4.1.0/spdx-tmp/spdx-tools.spdx +50 -0
- continuous_delivery_scripts-4.1.0/spdx-tmp/toml.spdx +50 -0
- continuous_delivery_scripts-4.1.0/spdx-tmp/towncrier.spdx +50 -0
- continuous_delivery_scripts-4.1.0/spdx-tmp/twine.spdx +50 -0
- continuous_delivery_scripts-4.1.0/spdx-tmp/urllib3.spdx +50 -0
- continuous_delivery_scripts-4.1.0/spdx-tmp/wcmatch.spdx +50 -0
- continuous_delivery_scripts-4.1.0/spdx-tmp/xmltodict.spdx +50 -0
- continuous_delivery_scripts-3.5.1/PKG-INFO +0 -176
- continuous_delivery_scripts-3.5.1/README.md +0 -123
- continuous_delivery_scripts-3.5.1/continuous_delivery_scripts/generate_docs.py +0 -59
- continuous_delivery_scripts-3.5.1/continuous_delivery_scripts/plugins/PYTHON.MD +0 -14
- continuous_delivery_scripts-3.5.1/continuous_delivery_scripts/spdx_report/templates/third_party_IP_report.txt.jinja2 +0 -17
- continuous_delivery_scripts-3.5.1/continuous_delivery_scripts/utils/python/package_helpers.py +0 -147
- continuous_delivery_scripts-3.5.1/continuous_delivery_scripts.egg-info/PKG-INFO +0 -176
- {continuous_delivery_scripts-3.5.1 → continuous_delivery_scripts-4.1.0}/LICENSE +0 -0
- {continuous_delivery_scripts-3.5.1 → continuous_delivery_scripts-4.1.0}/MANIFEST.in +0 -0
- {continuous_delivery_scripts-3.5.1 → continuous_delivery_scripts-4.1.0}/continuous_delivery_scripts/__init__.py +0 -0
- {continuous_delivery_scripts-3.5.1 → continuous_delivery_scripts-4.1.0}/continuous_delivery_scripts/create_news_file.py +0 -0
- {continuous_delivery_scripts-3.5.1 → continuous_delivery_scripts-4.1.0}/continuous_delivery_scripts/detect_secrets.py +0 -0
- {continuous_delivery_scripts-3.5.1 → continuous_delivery_scripts-4.1.0}/continuous_delivery_scripts/generate_news.py +0 -0
- {continuous_delivery_scripts-3.5.1 → continuous_delivery_scripts-4.1.0}/continuous_delivery_scripts/get_config.py +0 -0
- {continuous_delivery_scripts-3.5.1 → continuous_delivery_scripts-4.1.0}/continuous_delivery_scripts/get_version.py +0 -0
- {continuous_delivery_scripts-3.5.1 → continuous_delivery_scripts-4.1.0}/continuous_delivery_scripts/language_specifics.py +0 -0
- {continuous_delivery_scripts-3.5.1 → continuous_delivery_scripts-4.1.0}/continuous_delivery_scripts/license_files.py +0 -0
- {continuous_delivery_scripts-3.5.1 → continuous_delivery_scripts-4.1.0}/continuous_delivery_scripts/plugins/BASIC.MD +0 -0
- {continuous_delivery_scripts-3.5.1 → continuous_delivery_scripts-4.1.0}/continuous_delivery_scripts/plugins/CI.MD +0 -0
- {continuous_delivery_scripts-3.5.1 → continuous_delivery_scripts-4.1.0}/continuous_delivery_scripts/plugins/GITHUB_ACTIONS.MD +0 -0
- {continuous_delivery_scripts-3.5.1 → continuous_delivery_scripts-4.1.0}/continuous_delivery_scripts/plugins/GOLAND.MD +0 -0
- {continuous_delivery_scripts-3.5.1 → continuous_delivery_scripts-4.1.0}/continuous_delivery_scripts/plugins/NOOP.MD +0 -0
- {continuous_delivery_scripts-3.5.1 → continuous_delivery_scripts-4.1.0}/continuous_delivery_scripts/plugins/__init__.py +0 -0
- {continuous_delivery_scripts-3.5.1 → continuous_delivery_scripts-4.1.0}/continuous_delivery_scripts/plugins/basic.py +0 -0
- {continuous_delivery_scripts-3.5.1 → continuous_delivery_scripts-4.1.0}/continuous_delivery_scripts/plugins/ci.py +0 -0
- {continuous_delivery_scripts-3.5.1 → continuous_delivery_scripts-4.1.0}/continuous_delivery_scripts/plugins/docker.py +0 -0
- {continuous_delivery_scripts-3.5.1 → continuous_delivery_scripts-4.1.0}/continuous_delivery_scripts/plugins/github_actions.py +0 -0
- {continuous_delivery_scripts-3.5.1 → continuous_delivery_scripts-4.1.0}/continuous_delivery_scripts/plugins/golang.py +0 -0
- {continuous_delivery_scripts-3.5.1 → continuous_delivery_scripts-4.1.0}/continuous_delivery_scripts/plugins/noop.py +0 -0
- {continuous_delivery_scripts-3.5.1 → continuous_delivery_scripts-4.1.0}/continuous_delivery_scripts/report_third_party_ip.py +0 -0
- {continuous_delivery_scripts-3.5.1 → continuous_delivery_scripts-4.1.0}/continuous_delivery_scripts/spdx_report/__init__.py +0 -0
- {continuous_delivery_scripts-3.5.1 → continuous_delivery_scripts-4.1.0}/continuous_delivery_scripts/spdx_report/spdx_dependency.py +0 -0
- {continuous_delivery_scripts-3.5.1 → continuous_delivery_scripts-4.1.0}/continuous_delivery_scripts/spdx_report/spdx_document.py +0 -0
- {continuous_delivery_scripts-3.5.1 → continuous_delivery_scripts-4.1.0}/continuous_delivery_scripts/spdx_report/templates/third_party_IP_report.csv.jinja2 +0 -0
- {continuous_delivery_scripts-3.5.1 → continuous_delivery_scripts-4.1.0}/continuous_delivery_scripts/update_secrets_registry.py +0 -0
- {continuous_delivery_scripts-3.5.1 → continuous_delivery_scripts-4.1.0}/continuous_delivery_scripts/utils/__init__.py +0 -0
- {continuous_delivery_scripts-3.5.1 → continuous_delivery_scripts-4.1.0}/continuous_delivery_scripts/utils/aws_helpers.py +0 -0
- {continuous_delivery_scripts-3.5.1 → continuous_delivery_scripts-4.1.0}/continuous_delivery_scripts/utils/definitions.py +0 -0
- {continuous_delivery_scripts-3.5.1 → continuous_delivery_scripts-4.1.0}/continuous_delivery_scripts/utils/filesystem_helpers.py +0 -0
- {continuous_delivery_scripts-3.5.1 → continuous_delivery_scripts-4.1.0}/continuous_delivery_scripts/utils/git_helpers.py +0 -0
- {continuous_delivery_scripts-3.5.1 → continuous_delivery_scripts-4.1.0}/continuous_delivery_scripts/utils/hash_helpers.py +0 -0
- {continuous_delivery_scripts-3.5.1 → continuous_delivery_scripts-4.1.0}/continuous_delivery_scripts/utils/language_specifics_base.py +0 -0
- {continuous_delivery_scripts-3.5.1 → continuous_delivery_scripts-4.1.0}/continuous_delivery_scripts/utils/logging.py +0 -0
- {continuous_delivery_scripts-3.5.1 → continuous_delivery_scripts-4.1.0}/continuous_delivery_scripts/utils/noop/__init__.py +0 -0
- {continuous_delivery_scripts-3.5.1 → continuous_delivery_scripts-4.1.0}/continuous_delivery_scripts/utils/noop/package_helpers.py +0 -0
- {continuous_delivery_scripts-3.5.1 → continuous_delivery_scripts-4.1.0}/continuous_delivery_scripts/utils/python/__init__.py +0 -0
- {continuous_delivery_scripts-3.5.1 → continuous_delivery_scripts-4.1.0}/continuous_delivery_scripts/utils/python/python_helpers.py +0 -0
- {continuous_delivery_scripts-3.5.1 → continuous_delivery_scripts-4.1.0}/continuous_delivery_scripts/utils/string_helpers.py +0 -0
- {continuous_delivery_scripts-3.5.1 → continuous_delivery_scripts-4.1.0}/continuous_delivery_scripts/utils/versioning.py +0 -0
- {continuous_delivery_scripts-3.5.1 → continuous_delivery_scripts-4.1.0}/continuous_delivery_scripts.egg-info/dependency_links.txt +0 -0
- {continuous_delivery_scripts-3.5.1 → continuous_delivery_scripts-4.1.0}/continuous_delivery_scripts.egg-info/entry_points.txt +0 -0
- {continuous_delivery_scripts-3.5.1 → continuous_delivery_scripts-4.1.0}/continuous_delivery_scripts.egg-info/top_level.txt +0 -0
- {continuous_delivery_scripts-3.5.1 → continuous_delivery_scripts-4.1.0}/setup.cfg +0 -0
|
@@ -0,0 +1,291 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: continuous-delivery-scripts
|
|
3
|
+
Version: 4.1.0
|
|
4
|
+
Summary: Git-based CI/CD tools for releases, changelogs, SPDX SBOMs and licence reporting
|
|
5
|
+
Home-page: https://github.com/ARMmbed/continuous-delivery-scripts
|
|
6
|
+
Author: Arm
|
|
7
|
+
Author-email: adrien.cabarbaye@arm.com
|
|
8
|
+
License: Apache-2.0
|
|
9
|
+
Project-URL: Documentation, https://armmbed.github.io/continuous-delivery-scripts/
|
|
10
|
+
Project-URL: Source, https://github.com/ARMmbed/continuous-delivery-scripts
|
|
11
|
+
Project-URL: Changelog, https://github.com/ARMmbed/continuous-delivery-scripts/blob/main/CHANGELOG.md
|
|
12
|
+
Project-URL: Issues, https://github.com/ARMmbed/continuous-delivery-scripts/issues
|
|
13
|
+
Keywords: ci-cd,release-automation,semantic-versioning,changelog,spdx,sbom,openchain,third-party-ip,tpip,licence-compliance,copyright,python,git
|
|
14
|
+
Classifier: Intended Audience :: Developers
|
|
15
|
+
Classifier: Programming Language :: Python
|
|
16
|
+
Classifier: Programming Language :: Python :: 3 :: Only
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
21
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
22
|
+
Classifier: Topic :: Software Development :: Build Tools
|
|
23
|
+
Classifier: Topic :: Software Development :: Documentation
|
|
24
|
+
Classifier: Topic :: Software Development :: Version Control :: Git
|
|
25
|
+
Requires-Python: >=3.10,<4
|
|
26
|
+
Description-Content-Type: text/markdown
|
|
27
|
+
License-File: LICENSE
|
|
28
|
+
Requires-Dist: setuptools
|
|
29
|
+
Requires-Dist: gitpython
|
|
30
|
+
Requires-Dist: towncrier==22.12.0
|
|
31
|
+
Requires-Dist: pyautoversion~=1.2.0
|
|
32
|
+
Requires-Dist: pdoc3==0.11.6
|
|
33
|
+
Requires-Dist: toml
|
|
34
|
+
Requires-Dist: semver~=2.13.0
|
|
35
|
+
Requires-Dist: python-dotenv
|
|
36
|
+
Requires-Dist: twine
|
|
37
|
+
Requires-Dist: boto3
|
|
38
|
+
Requires-Dist: detect-secrets[gibberish]==1.5.0
|
|
39
|
+
Requires-Dist: packaging
|
|
40
|
+
Requires-Dist: licenseheaders<0.8.9
|
|
41
|
+
Requires-Dist: spdx-tools==0.6.1
|
|
42
|
+
Requires-Dist: license-expression
|
|
43
|
+
Requires-Dist: wcmatch
|
|
44
|
+
Requires-Dist: jellyfish
|
|
45
|
+
Requires-Dist: jinja2<4,>=3
|
|
46
|
+
Requires-Dist: Markdown<4,>=3.7
|
|
47
|
+
Requires-Dist: dataclasses; python_version < "3.7"
|
|
48
|
+
Dynamic: author
|
|
49
|
+
Dynamic: author-email
|
|
50
|
+
Dynamic: classifier
|
|
51
|
+
Dynamic: description
|
|
52
|
+
Dynamic: description-content-type
|
|
53
|
+
Dynamic: home-page
|
|
54
|
+
Dynamic: keywords
|
|
55
|
+
Dynamic: license
|
|
56
|
+
Dynamic: license-file
|
|
57
|
+
Dynamic: project-url
|
|
58
|
+
Dynamic: requires-dist
|
|
59
|
+
Dynamic: requires-python
|
|
60
|
+
Dynamic: summary
|
|
61
|
+
|
|
62
|
+
<!--
|
|
63
|
+
Copyright (C) 2020-2026 Arm Limited or its affiliates and Contributors. All rights reserved.
|
|
64
|
+
SPDX-License-Identifier: Apache-2.0
|
|
65
|
+
-->
|
|
66
|
+
# Continuous Delivery Scripts
|
|
67
|
+
|
|
68
|
+

|
|
69
|
+
[](https://armmbed.github.io/continuous-delivery-scripts)
|
|
70
|
+
[](https://pypi.org/project/continuous-delivery-scripts/)
|
|
71
|
+
[](https://pypi.org/project/continuous-delivery-scripts/)
|
|
72
|
+
[](https://pypi.org/project/continuous-delivery-scripts/)
|
|
73
|
+
[](https://pepy.tech/project/continuous-delivery-scripts)
|
|
74
|
+
|
|
75
|
+
[](https://github.com/ARMmbed/continuous-delivery-scripts/blob/main/LICENSE)
|
|
76
|
+
[](https://armmbed.github.io/continuous-delivery-scripts/third_party_IP_report.html)
|
|
77
|
+
|
|
78
|
+
[](https://github.com/ARMmbed/continuous-delivery-scripts/actions/workflows/ci.yml)
|
|
79
|
+
|
|
80
|
+
## Summary
|
|
81
|
+
|
|
82
|
+
`continuous-delivery-scripts` provides Git-based CI/CD commands for release
|
|
83
|
+
automation, semantic versioning, changelog generation, SPDX SBOMs,
|
|
84
|
+
third-party IP (TPIP) and licence reports, source licence headers and secret
|
|
85
|
+
checks.
|
|
86
|
+
|
|
87
|
+
## Overview
|
|
88
|
+
|
|
89
|
+
Originally forked from [ARMmbed/mbed-tools-ci-scripts](https://github.com/ARMmbed/mbed-tools-ci-scripts),
|
|
90
|
+
the tools are written in Python but support projects in other languages through
|
|
91
|
+
[plugins](./continuous_delivery_scripts/plugins). Each command handles a
|
|
92
|
+
focused delivery task, from recording a change to auditing licences or tagging
|
|
93
|
+
a release. The shared project delivery definition lives in one place:
|
|
94
|
+
`[ProjectConfig]` in `pyproject.toml`. Every command reads those settings,
|
|
95
|
+
including paths, versioning rules and the selected `PROGRAMMING_LANGUAGE`,
|
|
96
|
+
regardless of the project's language or CI system. The selected plugin then
|
|
97
|
+
uses appropriate ecosystem tools: for example, GoReleaser for Go releases or
|
|
98
|
+
wheel and Twine for Python packages. Consult the
|
|
99
|
+
[plugin guides](./continuous_delivery_scripts/plugins) for language-specific
|
|
100
|
+
requirements; native build manifests and credentials may still be needed. See
|
|
101
|
+
the [project configuration guide](./DEVELOPMENT.md#project-configuration) for
|
|
102
|
+
the `pyproject.toml` fields required by each workflow.
|
|
103
|
+
|
|
104
|
+
Run the same commands locally or in any CI system that can check out
|
|
105
|
+
the project's Git repository and install the required tools. This avoids
|
|
106
|
+
infrastructure lock-in: the team can decide which CI system suits its project,
|
|
107
|
+
including after the delivery workflow has been defined.
|
|
108
|
+
|
|
109
|
+
## Usage and documentation
|
|
110
|
+
|
|
111
|
+
Start with the [common use cases](#common-use-cases) below, then follow the
|
|
112
|
+
[task guides](./guides/index.md) for prerequisites, outputs and CI examples.
|
|
113
|
+
The [GitHub Pages site](https://armmbed.github.io/continuous-delivery-scripts/)
|
|
114
|
+
publishes those guides alongside the API reference when release documentation
|
|
115
|
+
is regenerated. For individual commands and their typical developer or CI
|
|
116
|
+
usage, see the [command-line tools table](#command-line-tools).
|
|
117
|
+
|
|
118
|
+
To include your own Markdown guides in generated documentation, configure
|
|
119
|
+
their source and published folder in `[ProjectConfig]`:
|
|
120
|
+
|
|
121
|
+
```toml
|
|
122
|
+
DOCUMENTATION_GUIDES_DIR = "guides"
|
|
123
|
+
DOCUMENTATION_GUIDES_OUTPUT_FOLDER = "guides"
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
Add `guides/index.md` with links to the other `.md` files and run
|
|
127
|
+
`cd-generate-docs`. It renders the guides to HTML alongside the API reference;
|
|
128
|
+
the default published folder is `guides/`. Keep the Markdown source outside
|
|
129
|
+
the documentation output, which the generator clears before each build. See
|
|
130
|
+
[generating code documentation](./guides/generating-code-documentation.md).
|
|
131
|
+
|
|
132
|
+
## Common use cases
|
|
133
|
+
|
|
134
|
+
### Generate an SPDX SBOM and third-party IP report
|
|
135
|
+
|
|
136
|
+
For a project whose language plugin provides package metadata, generate SPDX
|
|
137
|
+
tag-value documents for the project and its dependencies alongside an HTML
|
|
138
|
+
third-party IP / TPIP licence report. Use these as inputs to an OpenChain
|
|
139
|
+
licence-compliance workflow:
|
|
140
|
+
|
|
141
|
+
```bash
|
|
142
|
+
mkdir -p spdx-output
|
|
143
|
+
cd-generate-spdx --output-dir spdx-output
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
The destination directory must exist. Check that your plugin supports metadata
|
|
147
|
+
reporting: the command can finish without producing reports when it does not.
|
|
148
|
+
For SPDX documents, define `PROJECT_UUID` and `[spdx]` namespace settings in
|
|
149
|
+
`pyproject.toml` as described under [SPDX document identity](./DEVELOPMENT.md#spdx-document-identity).
|
|
150
|
+
See [SPDX generation](./guides/generating-an-spdx-sbom.md) and
|
|
151
|
+
[TPIP reporting](./guides/third-party-ip-reporting.md) for outputs and
|
|
152
|
+
prerequisites.
|
|
153
|
+
|
|
154
|
+
### Automate semantic releases and changelogs
|
|
155
|
+
|
|
156
|
+
Record a change as a news fragment, then preview the next release version:
|
|
157
|
+
|
|
158
|
+
```bash
|
|
159
|
+
cd-create-news-file "Fix dependency resolution" --type bugfix
|
|
160
|
+
cd-determine-version --release-type release
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
In a configured release workflow, `cd-generate-news --release-type release`
|
|
164
|
+
builds the changelog from those fragments; `cd-tag-and-release` handles Git
|
|
165
|
+
tags and publication through the selected language plugin. See
|
|
166
|
+
[changelog management](./guides/managing-changelogs.md) and
|
|
167
|
+
[release automation](./guides/automating-releases.md).
|
|
168
|
+
|
|
169
|
+
### Manage source licence and copyright headers
|
|
170
|
+
|
|
171
|
+
Run `cd-license-files` to apply the configured source-file headers when the
|
|
172
|
+
language plugin supports them. See the
|
|
173
|
+
[licence header guide](./guides/licence-header-management.md).
|
|
174
|
+
|
|
175
|
+
### Prevent secrets from leaking through Git
|
|
176
|
+
|
|
177
|
+
Accidentally committing a password or API token can expose it to others and
|
|
178
|
+
leave it in repository history. Keep a reviewed detect-secrets registry and
|
|
179
|
+
check Git-tracked files locally or in CI before a change is merged:
|
|
180
|
+
|
|
181
|
+
```bash
|
|
182
|
+
cd-detect-secrets --registry-file .secrets.baseline
|
|
183
|
+
```
|
|
184
|
+
|
|
185
|
+
The check fails on new findings. Use `cd-record-secrets` only to record values
|
|
186
|
+
the team has reviewed and accepted, rather than to hide real credentials. See
|
|
187
|
+
[checking for secrets](./guides/checking-for-secrets.md) and
|
|
188
|
+
[recording accepted findings](./guides/recording-secrets.md).
|
|
189
|
+
|
|
190
|
+
## Releases
|
|
191
|
+
|
|
192
|
+
For release notes and a history of changes of all **production** releases, please see the following:
|
|
193
|
+
|
|
194
|
+
- [Changelog](./CHANGELOG.md)
|
|
195
|
+
|
|
196
|
+
For all available versions, see the:
|
|
197
|
+
|
|
198
|
+
- [PyPI Release History](https://pypi.org/project/continuous-delivery-scripts/#history)
|
|
199
|
+
|
|
200
|
+
## Versioning
|
|
201
|
+
|
|
202
|
+
The version scheme follows [PEP 440](https://peps.python.org/pep-0440/) and
|
|
203
|
+
[Semantic Versioning](https://semver.org/). Production releases use:
|
|
204
|
+
|
|
205
|
+
- `<major>.<minor>.<patch>`
|
|
206
|
+
|
|
207
|
+
Beta releases give early access to experimental features. They may be unstable,
|
|
208
|
+
and interfaces introduced in a beta release may change without notice. Beta
|
|
209
|
+
releases use:
|
|
210
|
+
|
|
211
|
+
- `<major>.<minor>.<patch>-beta.<pre-release-number>`
|
|
212
|
+
|
|
213
|
+
## Installation
|
|
214
|
+
|
|
215
|
+
It is recommended that a virtual environment such as [Pipenv](https://github.com/pypa/pipenv/blob/master/README.md) is
|
|
216
|
+
used for all installations to avoid Python dependency conflicts.
|
|
217
|
+
|
|
218
|
+
To install the most recent production quality release use:
|
|
219
|
+
|
|
220
|
+
```
|
|
221
|
+
pip install continuous-delivery-scripts
|
|
222
|
+
```
|
|
223
|
+
|
|
224
|
+
To install a specific release:
|
|
225
|
+
|
|
226
|
+
```
|
|
227
|
+
pip install continuous-delivery-scripts==<version>
|
|
228
|
+
```
|
|
229
|
+
|
|
230
|
+
## Command-line tools
|
|
231
|
+
|
|
232
|
+
Following the [Unix tools philosophy](https://tldp.org/LDP/GNU-Linux-Tools-Summary/html/c1089.htm),
|
|
233
|
+
the package installs focused command-line tools. Run them within a project
|
|
234
|
+
configured by `pyproject.toml`, such as [this project](./pyproject.toml). Use
|
|
235
|
+
`<command> --help` for all available options; release types are `development`,
|
|
236
|
+
`beta` and `release`. The final column shows where each command is most likely
|
|
237
|
+
to be used; developer checks can also be incorporated into CI. These are the
|
|
238
|
+
same commands whichever CI system the team chooses.
|
|
239
|
+
|
|
240
|
+
| Command | What it does | Key arguments | Typical environment |
|
|
241
|
+
| --- | --- | --- | --- |
|
|
242
|
+
| `cd-assert-news` | Validates a branch's news files; can add a missing file for a configured dependency-update branch. | `--current-branch` (`-b`), `--local` (`-l`) | CI; `--local` for developer checks |
|
|
243
|
+
| `cd-create-news-file` | Creates a one-line news fragment in the configured news directory. | Required news text; `--type` (`-t`), `--ref-number` (`-n`) | Developer |
|
|
244
|
+
| `cd-determine-version` | Calculates and prints the **project's prospective release version** without generating a changelog. | Required `--release-type` (`-t`) | Developer preview or CI |
|
|
245
|
+
| `cd-generate-news` | Updates the project version and, for beta or production releases, builds the changelog from news fragments; prints the resulting version. | Required `--release-type` (`-t`) | CI release flow |
|
|
246
|
+
| `cd-get-config` | Prints a project configuration value. | Either `--key` (`-k`) or `--config-variable` (`-c`) | Developer or CI |
|
|
247
|
+
| `cd-tag-and-release` | Runs the release flow, including documentation, licensing summaries, Git tagging, packaging and publication through the selected [language plugin](./continuous_delivery_scripts/plugins). | Required `--release-type` (`-t`); optional `--current-branch` (`-b`) | CI release flow |
|
|
248
|
+
| `cd-generate-docs` | Generates code documentation in the configured output directory (or one specified on the command line). | `--output_directory` | Developer preview or CI |
|
|
249
|
+
| `cd-generate-spdx` | Generates SPDX documents and third-party licence summaries, then checks licence compliance when project metadata is available. | Required `--output-dir` (`-o`); create the directory first | CI audit; developer review also possible |
|
|
250
|
+
| `cd-license-files` | Adds or updates source-file licence and copyright headers when the language plugin supports them. | `--verbose` (`-v`) | Developer or CI |
|
|
251
|
+
| `cd-record-secrets` | Records accepted findings in the project's [detect-secrets](https://github.com/Yelp/detect-secrets) registry. | `--registry-file` (`-r`); defaults to the configured registry | Developer (registry maintenance) |
|
|
252
|
+
| `cd-detect-secrets` | Checks Git-tracked files against that registry and fails if new secrets are found. | `--registry-file` (`-r`); defaults to the configured registry | CI; developer checks also possible |
|
|
253
|
+
|
|
254
|
+
For example, `cd-create-news-file "Fix dependency resolution" --type bugfix`
|
|
255
|
+
adds a news fragment. For release workflow details, see the
|
|
256
|
+
[development guide](./DEVELOPMENT.md).
|
|
257
|
+
|
|
258
|
+
For GitHub automation that performs authenticated clone or fetch operations, see [GitHub Token Authentication](#github-token-authentication).
|
|
259
|
+
|
|
260
|
+
## GitHub Token Authentication
|
|
261
|
+
|
|
262
|
+
When git operations need to retry against GitHub over HTTPS, this project now uses the credential layout `https://x-access-token:<token>@github.com/<owner>/<repo>.git`.
|
|
263
|
+
|
|
264
|
+
This means the token is sent in the password position with `x-access-token` as the username, which is the format GitHub accepts for workflow-generated and other non-OAuth tokens used by automation.
|
|
265
|
+
|
|
266
|
+
Older `https://<token>:x-oauth-basic@github.com/...` URLs were tied to OAuth-style credentials and could reject tokens created dynamically during CI/CD flows.
|
|
267
|
+
|
|
268
|
+
## Project Structure
|
|
269
|
+
|
|
270
|
+
The main parts of the repository are:
|
|
271
|
+
|
|
272
|
+
- `.github` - CI and GitHub configuration files.
|
|
273
|
+
- `docs/` - Generated GitHub Pages guides and API reference (rebuilt on release).
|
|
274
|
+
- `guides/` - Markdown source for task-based documentation.
|
|
275
|
+
- `llms.txt` - A concise map of the published documentation.
|
|
276
|
+
- `continuous_delivery_scripts/` - Python source files and language plugins.
|
|
277
|
+
- `news/` - Collection of news files for unreleased changes.
|
|
278
|
+
- `tests/` - Unit and integration tests.
|
|
279
|
+
|
|
280
|
+
## Getting Help
|
|
281
|
+
|
|
282
|
+
- For interface definition and usage documentation, please see [GitHub Pages](https://armmbed.github.io/continuous-delivery-scripts).
|
|
283
|
+
- For a list of known issues and possible workarounds, please see [Known Issues](./KNOWN_ISSUES.md).
|
|
284
|
+
- To raise a defect or enhancement please use [GitHub Issues](https://github.com/ARMmbed/continuous-delivery-scripts/issues).
|
|
285
|
+
|
|
286
|
+
## Contributing
|
|
287
|
+
|
|
288
|
+
- We are committed to fostering a welcoming community, please see our
|
|
289
|
+
[Code of Conduct](./CODE_OF_CONDUCT.md) for more information.
|
|
290
|
+
- For ways to contribute to the project, please see the [Contributions Guidelines](./CONTRIBUTING.md)
|
|
291
|
+
- For a technical introduction into developing this package, please see the [Development Guide](./DEVELOPMENT.md)
|
|
@@ -0,0 +1,230 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
Copyright (C) 2020-2026 Arm Limited or its affiliates and Contributors. All rights reserved.
|
|
3
|
+
SPDX-License-Identifier: Apache-2.0
|
|
4
|
+
-->
|
|
5
|
+
# Continuous Delivery Scripts
|
|
6
|
+
|
|
7
|
+

|
|
8
|
+
[](https://armmbed.github.io/continuous-delivery-scripts)
|
|
9
|
+
[](https://pypi.org/project/continuous-delivery-scripts/)
|
|
10
|
+
[](https://pypi.org/project/continuous-delivery-scripts/)
|
|
11
|
+
[](https://pypi.org/project/continuous-delivery-scripts/)
|
|
12
|
+
[](https://pepy.tech/project/continuous-delivery-scripts)
|
|
13
|
+
|
|
14
|
+
[](https://github.com/ARMmbed/continuous-delivery-scripts/blob/main/LICENSE)
|
|
15
|
+
[](https://armmbed.github.io/continuous-delivery-scripts/third_party_IP_report.html)
|
|
16
|
+
|
|
17
|
+
[](https://github.com/ARMmbed/continuous-delivery-scripts/actions/workflows/ci.yml)
|
|
18
|
+
|
|
19
|
+
## Summary
|
|
20
|
+
|
|
21
|
+
`continuous-delivery-scripts` provides Git-based CI/CD commands for release
|
|
22
|
+
automation, semantic versioning, changelog generation, SPDX SBOMs,
|
|
23
|
+
third-party IP (TPIP) and licence reports, source licence headers and secret
|
|
24
|
+
checks.
|
|
25
|
+
|
|
26
|
+
## Overview
|
|
27
|
+
|
|
28
|
+
Originally forked from [ARMmbed/mbed-tools-ci-scripts](https://github.com/ARMmbed/mbed-tools-ci-scripts),
|
|
29
|
+
the tools are written in Python but support projects in other languages through
|
|
30
|
+
[plugins](./continuous_delivery_scripts/plugins). Each command handles a
|
|
31
|
+
focused delivery task, from recording a change to auditing licences or tagging
|
|
32
|
+
a release. The shared project delivery definition lives in one place:
|
|
33
|
+
`[ProjectConfig]` in `pyproject.toml`. Every command reads those settings,
|
|
34
|
+
including paths, versioning rules and the selected `PROGRAMMING_LANGUAGE`,
|
|
35
|
+
regardless of the project's language or CI system. The selected plugin then
|
|
36
|
+
uses appropriate ecosystem tools: for example, GoReleaser for Go releases or
|
|
37
|
+
wheel and Twine for Python packages. Consult the
|
|
38
|
+
[plugin guides](./continuous_delivery_scripts/plugins) for language-specific
|
|
39
|
+
requirements; native build manifests and credentials may still be needed. See
|
|
40
|
+
the [project configuration guide](./DEVELOPMENT.md#project-configuration) for
|
|
41
|
+
the `pyproject.toml` fields required by each workflow.
|
|
42
|
+
|
|
43
|
+
Run the same commands locally or in any CI system that can check out
|
|
44
|
+
the project's Git repository and install the required tools. This avoids
|
|
45
|
+
infrastructure lock-in: the team can decide which CI system suits its project,
|
|
46
|
+
including after the delivery workflow has been defined.
|
|
47
|
+
|
|
48
|
+
## Usage and documentation
|
|
49
|
+
|
|
50
|
+
Start with the [common use cases](#common-use-cases) below, then follow the
|
|
51
|
+
[task guides](./guides/index.md) for prerequisites, outputs and CI examples.
|
|
52
|
+
The [GitHub Pages site](https://armmbed.github.io/continuous-delivery-scripts/)
|
|
53
|
+
publishes those guides alongside the API reference when release documentation
|
|
54
|
+
is regenerated. For individual commands and their typical developer or CI
|
|
55
|
+
usage, see the [command-line tools table](#command-line-tools).
|
|
56
|
+
|
|
57
|
+
To include your own Markdown guides in generated documentation, configure
|
|
58
|
+
their source and published folder in `[ProjectConfig]`:
|
|
59
|
+
|
|
60
|
+
```toml
|
|
61
|
+
DOCUMENTATION_GUIDES_DIR = "guides"
|
|
62
|
+
DOCUMENTATION_GUIDES_OUTPUT_FOLDER = "guides"
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
Add `guides/index.md` with links to the other `.md` files and run
|
|
66
|
+
`cd-generate-docs`. It renders the guides to HTML alongside the API reference;
|
|
67
|
+
the default published folder is `guides/`. Keep the Markdown source outside
|
|
68
|
+
the documentation output, which the generator clears before each build. See
|
|
69
|
+
[generating code documentation](./guides/generating-code-documentation.md).
|
|
70
|
+
|
|
71
|
+
## Common use cases
|
|
72
|
+
|
|
73
|
+
### Generate an SPDX SBOM and third-party IP report
|
|
74
|
+
|
|
75
|
+
For a project whose language plugin provides package metadata, generate SPDX
|
|
76
|
+
tag-value documents for the project and its dependencies alongside an HTML
|
|
77
|
+
third-party IP / TPIP licence report. Use these as inputs to an OpenChain
|
|
78
|
+
licence-compliance workflow:
|
|
79
|
+
|
|
80
|
+
```bash
|
|
81
|
+
mkdir -p spdx-output
|
|
82
|
+
cd-generate-spdx --output-dir spdx-output
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
The destination directory must exist. Check that your plugin supports metadata
|
|
86
|
+
reporting: the command can finish without producing reports when it does not.
|
|
87
|
+
For SPDX documents, define `PROJECT_UUID` and `[spdx]` namespace settings in
|
|
88
|
+
`pyproject.toml` as described under [SPDX document identity](./DEVELOPMENT.md#spdx-document-identity).
|
|
89
|
+
See [SPDX generation](./guides/generating-an-spdx-sbom.md) and
|
|
90
|
+
[TPIP reporting](./guides/third-party-ip-reporting.md) for outputs and
|
|
91
|
+
prerequisites.
|
|
92
|
+
|
|
93
|
+
### Automate semantic releases and changelogs
|
|
94
|
+
|
|
95
|
+
Record a change as a news fragment, then preview the next release version:
|
|
96
|
+
|
|
97
|
+
```bash
|
|
98
|
+
cd-create-news-file "Fix dependency resolution" --type bugfix
|
|
99
|
+
cd-determine-version --release-type release
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
In a configured release workflow, `cd-generate-news --release-type release`
|
|
103
|
+
builds the changelog from those fragments; `cd-tag-and-release` handles Git
|
|
104
|
+
tags and publication through the selected language plugin. See
|
|
105
|
+
[changelog management](./guides/managing-changelogs.md) and
|
|
106
|
+
[release automation](./guides/automating-releases.md).
|
|
107
|
+
|
|
108
|
+
### Manage source licence and copyright headers
|
|
109
|
+
|
|
110
|
+
Run `cd-license-files` to apply the configured source-file headers when the
|
|
111
|
+
language plugin supports them. See the
|
|
112
|
+
[licence header guide](./guides/licence-header-management.md).
|
|
113
|
+
|
|
114
|
+
### Prevent secrets from leaking through Git
|
|
115
|
+
|
|
116
|
+
Accidentally committing a password or API token can expose it to others and
|
|
117
|
+
leave it in repository history. Keep a reviewed detect-secrets registry and
|
|
118
|
+
check Git-tracked files locally or in CI before a change is merged:
|
|
119
|
+
|
|
120
|
+
```bash
|
|
121
|
+
cd-detect-secrets --registry-file .secrets.baseline
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
The check fails on new findings. Use `cd-record-secrets` only to record values
|
|
125
|
+
the team has reviewed and accepted, rather than to hide real credentials. See
|
|
126
|
+
[checking for secrets](./guides/checking-for-secrets.md) and
|
|
127
|
+
[recording accepted findings](./guides/recording-secrets.md).
|
|
128
|
+
|
|
129
|
+
## Releases
|
|
130
|
+
|
|
131
|
+
For release notes and a history of changes of all **production** releases, please see the following:
|
|
132
|
+
|
|
133
|
+
- [Changelog](./CHANGELOG.md)
|
|
134
|
+
|
|
135
|
+
For all available versions, see the:
|
|
136
|
+
|
|
137
|
+
- [PyPI Release History](https://pypi.org/project/continuous-delivery-scripts/#history)
|
|
138
|
+
|
|
139
|
+
## Versioning
|
|
140
|
+
|
|
141
|
+
The version scheme follows [PEP 440](https://peps.python.org/pep-0440/) and
|
|
142
|
+
[Semantic Versioning](https://semver.org/). Production releases use:
|
|
143
|
+
|
|
144
|
+
- `<major>.<minor>.<patch>`
|
|
145
|
+
|
|
146
|
+
Beta releases give early access to experimental features. They may be unstable,
|
|
147
|
+
and interfaces introduced in a beta release may change without notice. Beta
|
|
148
|
+
releases use:
|
|
149
|
+
|
|
150
|
+
- `<major>.<minor>.<patch>-beta.<pre-release-number>`
|
|
151
|
+
|
|
152
|
+
## Installation
|
|
153
|
+
|
|
154
|
+
It is recommended that a virtual environment such as [Pipenv](https://github.com/pypa/pipenv/blob/master/README.md) is
|
|
155
|
+
used for all installations to avoid Python dependency conflicts.
|
|
156
|
+
|
|
157
|
+
To install the most recent production quality release use:
|
|
158
|
+
|
|
159
|
+
```
|
|
160
|
+
pip install continuous-delivery-scripts
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
To install a specific release:
|
|
164
|
+
|
|
165
|
+
```
|
|
166
|
+
pip install continuous-delivery-scripts==<version>
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
## Command-line tools
|
|
170
|
+
|
|
171
|
+
Following the [Unix tools philosophy](https://tldp.org/LDP/GNU-Linux-Tools-Summary/html/c1089.htm),
|
|
172
|
+
the package installs focused command-line tools. Run them within a project
|
|
173
|
+
configured by `pyproject.toml`, such as [this project](./pyproject.toml). Use
|
|
174
|
+
`<command> --help` for all available options; release types are `development`,
|
|
175
|
+
`beta` and `release`. The final column shows where each command is most likely
|
|
176
|
+
to be used; developer checks can also be incorporated into CI. These are the
|
|
177
|
+
same commands whichever CI system the team chooses.
|
|
178
|
+
|
|
179
|
+
| Command | What it does | Key arguments | Typical environment |
|
|
180
|
+
| --- | --- | --- | --- |
|
|
181
|
+
| `cd-assert-news` | Validates a branch's news files; can add a missing file for a configured dependency-update branch. | `--current-branch` (`-b`), `--local` (`-l`) | CI; `--local` for developer checks |
|
|
182
|
+
| `cd-create-news-file` | Creates a one-line news fragment in the configured news directory. | Required news text; `--type` (`-t`), `--ref-number` (`-n`) | Developer |
|
|
183
|
+
| `cd-determine-version` | Calculates and prints the **project's prospective release version** without generating a changelog. | Required `--release-type` (`-t`) | Developer preview or CI |
|
|
184
|
+
| `cd-generate-news` | Updates the project version and, for beta or production releases, builds the changelog from news fragments; prints the resulting version. | Required `--release-type` (`-t`) | CI release flow |
|
|
185
|
+
| `cd-get-config` | Prints a project configuration value. | Either `--key` (`-k`) or `--config-variable` (`-c`) | Developer or CI |
|
|
186
|
+
| `cd-tag-and-release` | Runs the release flow, including documentation, licensing summaries, Git tagging, packaging and publication through the selected [language plugin](./continuous_delivery_scripts/plugins). | Required `--release-type` (`-t`); optional `--current-branch` (`-b`) | CI release flow |
|
|
187
|
+
| `cd-generate-docs` | Generates code documentation in the configured output directory (or one specified on the command line). | `--output_directory` | Developer preview or CI |
|
|
188
|
+
| `cd-generate-spdx` | Generates SPDX documents and third-party licence summaries, then checks licence compliance when project metadata is available. | Required `--output-dir` (`-o`); create the directory first | CI audit; developer review also possible |
|
|
189
|
+
| `cd-license-files` | Adds or updates source-file licence and copyright headers when the language plugin supports them. | `--verbose` (`-v`) | Developer or CI |
|
|
190
|
+
| `cd-record-secrets` | Records accepted findings in the project's [detect-secrets](https://github.com/Yelp/detect-secrets) registry. | `--registry-file` (`-r`); defaults to the configured registry | Developer (registry maintenance) |
|
|
191
|
+
| `cd-detect-secrets` | Checks Git-tracked files against that registry and fails if new secrets are found. | `--registry-file` (`-r`); defaults to the configured registry | CI; developer checks also possible |
|
|
192
|
+
|
|
193
|
+
For example, `cd-create-news-file "Fix dependency resolution" --type bugfix`
|
|
194
|
+
adds a news fragment. For release workflow details, see the
|
|
195
|
+
[development guide](./DEVELOPMENT.md).
|
|
196
|
+
|
|
197
|
+
For GitHub automation that performs authenticated clone or fetch operations, see [GitHub Token Authentication](#github-token-authentication).
|
|
198
|
+
|
|
199
|
+
## GitHub Token Authentication
|
|
200
|
+
|
|
201
|
+
When git operations need to retry against GitHub over HTTPS, this project now uses the credential layout `https://x-access-token:<token>@github.com/<owner>/<repo>.git`.
|
|
202
|
+
|
|
203
|
+
This means the token is sent in the password position with `x-access-token` as the username, which is the format GitHub accepts for workflow-generated and other non-OAuth tokens used by automation.
|
|
204
|
+
|
|
205
|
+
Older `https://<token>:x-oauth-basic@github.com/...` URLs were tied to OAuth-style credentials and could reject tokens created dynamically during CI/CD flows.
|
|
206
|
+
|
|
207
|
+
## Project Structure
|
|
208
|
+
|
|
209
|
+
The main parts of the repository are:
|
|
210
|
+
|
|
211
|
+
- `.github` - CI and GitHub configuration files.
|
|
212
|
+
- `docs/` - Generated GitHub Pages guides and API reference (rebuilt on release).
|
|
213
|
+
- `guides/` - Markdown source for task-based documentation.
|
|
214
|
+
- `llms.txt` - A concise map of the published documentation.
|
|
215
|
+
- `continuous_delivery_scripts/` - Python source files and language plugins.
|
|
216
|
+
- `news/` - Collection of news files for unreleased changes.
|
|
217
|
+
- `tests/` - Unit and integration tests.
|
|
218
|
+
|
|
219
|
+
## Getting Help
|
|
220
|
+
|
|
221
|
+
- For interface definition and usage documentation, please see [GitHub Pages](https://armmbed.github.io/continuous-delivery-scripts).
|
|
222
|
+
- For a list of known issues and possible workarounds, please see [Known Issues](./KNOWN_ISSUES.md).
|
|
223
|
+
- To raise a defect or enhancement please use [GitHub Issues](https://github.com/ARMmbed/continuous-delivery-scripts/issues).
|
|
224
|
+
|
|
225
|
+
## Contributing
|
|
226
|
+
|
|
227
|
+
- We are committed to fostering a welcoming community, please see our
|
|
228
|
+
[Code of Conduct](./CODE_OF_CONDUCT.md) for more information.
|
|
229
|
+
- For ways to contribute to the project, please see the [Contributions Guidelines](./CONTRIBUTING.md)
|
|
230
|
+
- For a technical introduction into developing this package, please see the [Development Guide](./DEVELOPMENT.md)
|
|
@@ -11,8 +11,8 @@ References
|
|
|
11
11
|
This file is autogenerated, do not modify by hand.
|
|
12
12
|
"""
|
|
13
13
|
|
|
14
|
-
__version__ = "
|
|
15
|
-
COMMIT = "
|
|
16
|
-
MAJOR =
|
|
17
|
-
MINOR =
|
|
18
|
-
PATCH =
|
|
14
|
+
__version__ = "4.1.0"
|
|
15
|
+
COMMIT = "298fb1cfdf2636976e5ea78d65207793279edcca"
|
|
16
|
+
MAJOR = 4
|
|
17
|
+
MINOR = 1
|
|
18
|
+
PATCH = 0
|
|
@@ -9,7 +9,7 @@ import logging
|
|
|
9
9
|
import pathlib
|
|
10
10
|
import re
|
|
11
11
|
import sys
|
|
12
|
-
from typing import Union, Optional, Iterable, Any, List
|
|
12
|
+
from typing import Union, Optional, Iterable, Any, List, ContextManager
|
|
13
13
|
|
|
14
14
|
from continuous_delivery_scripts.utils.configuration import configuration, ConfigurationVariable
|
|
15
15
|
from continuous_delivery_scripts.utils.git_helpers import ProjectTempClone, LocalProjectRepository, GitWrapper
|
|
@@ -21,6 +21,10 @@ logger = logging.getLogger(__name__)
|
|
|
21
21
|
NEWS_FILE_NAME_REGEX = r"^[0-9]+.(misc|doc|removal|bugfix|feature|major)$"
|
|
22
22
|
|
|
23
23
|
|
|
24
|
+
class MissingNewsFileError(FileNotFoundError):
|
|
25
|
+
"""The branch contains no added news file."""
|
|
26
|
+
|
|
27
|
+
|
|
24
28
|
class NewsFileValidator:
|
|
25
29
|
"""Verifies individual news files."""
|
|
26
30
|
|
|
@@ -77,10 +81,11 @@ def find_news_files(git: GitWrapper, root_dir: str, news_dir: str) -> List[str]:
|
|
|
77
81
|
# If no news files were added, then we check for addition on the branch.
|
|
78
82
|
# Relies on the fact GitWrapper returns paths that are always relative
|
|
79
83
|
# to the project root.
|
|
80
|
-
|
|
84
|
+
news_prefix = news_dir.replace("\\", "/").rstrip("/") + "/"
|
|
85
|
+
added_news_files = [file_path for file_path in files_changed if file_path.startswith(news_prefix)]
|
|
81
86
|
if len(added_news_files) == 0:
|
|
82
87
|
files_changed = git.list_files_added_on_current_branch()
|
|
83
|
-
added_news_files = [file_path for file_path in files_changed if file_path.startswith(
|
|
88
|
+
added_news_files = [file_path for file_path in files_changed if file_path.startswith(news_prefix)]
|
|
84
89
|
return [str(pathlib.Path(root_dir, file_path)) for file_path in added_news_files]
|
|
85
90
|
|
|
86
91
|
|
|
@@ -94,7 +99,7 @@ def validate_news_files(git: GitWrapper, root_dir: str, news_dir: str) -> None:
|
|
|
94
99
|
"""
|
|
95
100
|
added_news_files = find_news_files(git=git, news_dir=news_dir, root_dir=root_dir)
|
|
96
101
|
if not added_news_files:
|
|
97
|
-
raise
|
|
102
|
+
raise MissingNewsFileError(f"PR must contain a news file in {news_dir}. See README.md.")
|
|
98
103
|
for absolute_file_path in added_news_files:
|
|
99
104
|
validate_news_file(absolute_file_path)
|
|
100
105
|
|
|
@@ -154,18 +159,19 @@ def main() -> None:
|
|
|
154
159
|
args = parser.parse_args()
|
|
155
160
|
set_log_level(args.verbose)
|
|
156
161
|
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
+
repository: ContextManager[GitWrapper]
|
|
163
|
+
if args.local:
|
|
164
|
+
repository = LocalProjectRepository()
|
|
165
|
+
else:
|
|
166
|
+
repository = ProjectTempClone(desired_branch_name=args.current_branch)
|
|
167
|
+
with repository as git:
|
|
162
168
|
if git.is_current_branch_feature():
|
|
163
169
|
root_dir = configuration.get_value(ConfigurationVariable.PROJECT_ROOT)
|
|
164
170
|
absolute_news_dir = configuration.get_value(ConfigurationVariable.NEWS_DIR)
|
|
165
171
|
news_dir = str(pathlib.Path(absolute_news_dir).relative_to(root_dir))
|
|
166
172
|
try:
|
|
167
|
-
validate_news_files(git=git, news_dir=news_dir, root_dir=
|
|
168
|
-
except
|
|
173
|
+
validate_news_files(git=git, news_dir=news_dir, root_dir=str(git.root))
|
|
174
|
+
except MissingNewsFileError as e:
|
|
169
175
|
log_exception(logger, e)
|
|
170
176
|
try:
|
|
171
177
|
news_file = generate_news_file(git, git.get_corresponding_path(pathlib.Path(news_dir)))
|
|
@@ -173,6 +179,9 @@ def main() -> None:
|
|
|
173
179
|
except Exception as e2:
|
|
174
180
|
log_exception(logger, e2)
|
|
175
181
|
sys.exit(1)
|
|
182
|
+
except Exception as e:
|
|
183
|
+
log_exception(logger, e)
|
|
184
|
+
sys.exit(1)
|
|
176
185
|
|
|
177
186
|
|
|
178
187
|
if __name__ == "__main__":
|