Skip to main content

Continuous Delivery Scripts

Package Documentation PyPI PyPI - Status PyPI - Python Version Downloads

License Compliance

Build Status

Summary

continuous-delivery-scripts provides Git-based CI/CD commands for release automation, semantic versioning, changelog generation, SPDX SBOMs, third-party IP (TPIP) and licence reports, source licence headers and secret checks.

Overview

Originally forked from ARMmbed/mbed-tools-ci-scripts, the tools are written in Python but support projects in other languages through plugins. Each command handles a focused delivery task, from recording a change to auditing licences or tagging a release. The shared project delivery definition lives in one place: [ProjectConfig] in pyproject.toml. Every command reads those settings, including paths, versioning rules and the selected PROGRAMMING_LANGUAGE, regardless of the project's language or CI system. The selected plugin then uses appropriate ecosystem tools: for example, GoReleaser for Go releases or wheel and Twine for Python packages. Consult the plugin guides for language-specific requirements; native build manifests and credentials may still be needed. See the project configuration guide for the pyproject.toml fields required by each workflow.

Run the same commands locally or in any CI system that can check out the project's Git repository and install the required tools. This avoids infrastructure lock-in: the team can decide which CI system suits its project, including after the delivery workflow has been defined.

Usage and documentation

Start with the common use cases below, then follow the task guides for prerequisites, outputs and CI examples. The GitHub Pages site publishes those guides alongside the API reference when release documentation is regenerated. For individual commands and their typical developer or CI usage, see the command-line tools table.

To include your own Markdown guides in generated documentation, configure their source and published folder in [ProjectConfig]:

DOCUMENTATION_GUIDES_DIR = "guides"
DOCUMENTATION_GUIDES_OUTPUT_FOLDER = "guides"

Add guides/index.md with links to the other .md files and run cd-generate-docs. It renders the guides to HTML alongside the API reference; the default published folder is guides/. Keep the Markdown source outside the documentation output, which the generator clears before each build. See generating code documentation.

Common use cases

Generate an SPDX SBOM and third-party IP report

For a project whose language plugin provides package metadata, generate SPDX tag-value documents for the project and its dependencies alongside an HTML third-party IP / TPIP licence report. Use these as inputs to an OpenChain licence-compliance workflow:

mkdir -p spdx-output
cd-generate-spdx --output-dir spdx-output

The destination directory must exist. Check that your plugin supports metadata reporting: the command can finish without producing reports when it does not. For SPDX documents, define PROJECT_UUID and [spdx] namespace settings in pyproject.toml as described under SPDX document identity. See SPDX generation and TPIP reporting for outputs and prerequisites.

Automate semantic releases and changelogs

Record a change as a news fragment, then preview the next release version:

cd-create-news-file "Fix dependency resolution" --type bugfix
cd-determine-version --release-type release

In a configured release workflow, cd-generate-news --release-type release builds the changelog from those fragments; cd-tag-and-release handles Git tags and publication through the selected language plugin. See changelog management and release automation.

Run cd-license-files to apply the configured source-file headers when the language plugin supports them. See the licence header guide.

Prevent secrets from leaking through Git

Accidentally committing a password or API token can expose it to others and leave it in repository history. Keep a reviewed detect-secrets registry and check Git-tracked files locally or in CI before a change is merged:

cd-detect-secrets --registry-file .secrets.baseline

The check fails on new findings. Use cd-record-secrets only to record values the team has reviewed and accepted, rather than to hide real credentials. See checking for secrets and recording accepted findings.

Releases

For release notes and a history of changes of all production releases, please see the following:

For all available versions, see the:

Versioning

The version scheme follows PEP 440 and Semantic Versioning. Production releases use:

  • <major>.<minor>.<patch>

Beta releases give early access to experimental features. They may be unstable, and interfaces introduced in a beta release may change without notice. Beta releases use:

  • <major>.<minor>.<patch>-beta.<pre-release-number>

Installation

It is recommended that a virtual environment such as Pipenv is used for all installations to avoid Python dependency conflicts.

To install the most recent production quality release use:

pip install continuous-delivery-scripts

To install a specific release:

pip install continuous-delivery-scripts==<version>

Command-line tools

Following the Unix tools philosophy, the package installs focused command-line tools. Run them within a project configured by pyproject.toml, such as this project. Use <command> --help for all available options; release types are development, beta and release. The final column shows where each command is most likely to be used; developer checks can also be incorporated into CI. These are the same commands whichever CI system the team chooses.

Command What it does Key arguments Typical environment
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
cd-create-news-file Creates a one-line news fragment in the configured news directory. Required news text; --type (-t), --ref-number (-n) Developer
cd-determine-version Calculates and prints the project's prospective release version without generating a changelog. Required --release-type (-t) Developer preview or CI
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
cd-get-config Prints a project configuration value. Either --key (-k) or --config-variable (-c) Developer or CI
cd-tag-and-release Runs the release flow, including documentation, licensing summaries, Git tagging, packaging and publication through the selected language plugin. Required --release-type (-t); optional --current-branch (-b) CI release flow
cd-generate-docs Generates code documentation in the configured output directory (or one specified on the command line). --output_directory Developer preview or CI
cd-generate-spdx Generates SPDX documents and third-party licence summaries, then checks licence compliance when project metadata is available. Required --output-dir (-o); optional --lookup-scancode CI audit; developer review also possible
cd-check-licence-compliance Checks project and dependency licences without creating SPDX documents; optionally writes third-party IP summaries. Optional --output-dir (-o) for reports, --lookup-scancode CI gate or developer review
cd-license-files Adds or updates source-file licence and copyright headers when the language plugin supports them. --verbose (-v) Developer or CI
cd-record-secrets Records accepted findings in the project's detect-secrets registry. --registry-file (-r); defaults to the configured registry Developer (registry maintenance)
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

For example, cd-create-news-file "Fix dependency resolution" --type bugfix adds a news fragment. For release workflow details, see the development guide.

For GitHub automation that performs authenticated clone or fetch operations, see GitHub Token Authentication.

GitHub Token Authentication

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.

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.

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.

Project Structure

The main parts of the repository are:

  • .github - CI and GitHub configuration files.
  • docs/ - Generated GitHub Pages guides and API reference (rebuilt on release).
  • guides/ - Markdown source for task-based documentation.
  • llms.txt - A concise map of the published documentation.
  • continuous_delivery_scripts/ - Python source files and language plugins.
  • news/ - Collection of news files for unreleased changes.
  • tests/ - Unit and integration tests.

Getting Help

  • For interface definition and usage documentation, please see GitHub Pages.
  • For a list of known issues and possible workarounds, please see Known Issues.
  • To raise a defect or enhancement please use GitHub Issues.

Contributing

Metadata

Release files for continuous-delivery-scripts 4.4.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for continuous-delivery-scripts 4.4.1
File Size Uploaded
continuous_delivery_scripts-4.4.1.tar.gz 118.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for continuous-delivery-scripts 4.4.1
File Interpreter ABI Platform
continuous_delivery_scripts-4.4.1-py3-none-any.whl Python 3 none any Details

Total release size: 243.1 kB

Release files / continuous_delivery_scripts-4.4.1.tar.gz

Download URL continuous_delivery_scripts-4.4.1.tar.gz
Size 118.5 kB
Tags Source
SHA-256 checksum
How to use checksums
2a2be46545b77fbe0ecacc72036836e56033aa41f85e529a0067864e08616e6e
BLAKE2b-256 checksum
How to use checksums
fe379c113d1947bd276a27d7cf26559edf4f3e88883a94d12f263ee114d3a349
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.7

Release files / continuous_delivery_scripts-4.4.1-py3-none-any.whl

Download URL continuous_delivery_scripts-4.4.1-py3-none-any.whl
Size 124.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
879e7e336f1b33edd1a9f067b334c16a31929c1650502f067ddb9e2a5ed95f3b
BLAKE2b-256 checksum
How to use checksums
a29720ec35449d6ae9fc27549770900316d3545a1c847f03224af870aeccbf73
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.7

Release history Release notifications | RSS feed

4.4.2

2 release files

This release

4.4.1 This release

2 release files

4.4.0

2 release files

4.3.0

2 release files

4.2.0

2 release files

4.1.0

2 release files

4.0.0

2 release files

3.5.1

2 release files

3.5.0

2 release files

3.4.1

2 release files

3.4.0

2 release files

3.3.0

2 release files

3.2.6

2 release files

3.2.5

2 release files

3.2.4

2 release files

3.2.3

2 release files

3.2.0

2 release files

3.1.0

2 release files

3.0.7

2 release files

3.0.6

2 release files

3.0.5

2 release files

3.0.4

2 release files

3.0.3

2 release files

3.0.2

2 release files

3.0.1

2 release files

3.0.0

2 release files

2.11.0

2 release files

2.10.2

2 release files

2.10.1

2 release files

2.10.0

2 release files

2.9.1

2 release files

2.9.0

2 release files

2.8.5

2 release files

2.8.4

2 release files

2.8.3

2 release files

2.8.2

2 release files

2.8.1

2 release files

2.8.0

2 release files

2.7.2

2 release files

2.7.1

2 release files

2.7.0

2 release files

2.6.2

2 release files

2.6.1

2 release files

2.6.0

2 release files

2.5.1

2 release files

2.3.1

2 release files

2.3.0

2 release files

2.2.4

2 release files

2.2.3

2 release files

2.2.2

2 release files

2.2.1

2 release files

2.2.0

2 release files

2.1.3

2 release files

2.1.2

2 release files

2.1.1

2 release files

2.1.0

2 release files

2.0.1

2 release files

2.0.0

2 release files

1.0.1

2 release files

1.0.0

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page