Shell to Python Continuous Deployment spcd.rwx.work
readme.md

Shell to Python Continuous Deployment {#toc} #

1 What 2 Why 3 How 4 Where 5 Who 6 When

1 What {#what} #

Get a common set of Python based CI / CD commands
from various contexts of CA, DNS, CI and OS / OCI.

License AGPL

Features #

Handle project workflows in a unified way:

  • whether the network infrastructure is

  • whatever the Continuous Integration platform

  • whatever the container’s Operating System
    | System | Latest | Previous |
    |:---------|:-----------------------|:-----------------------|
    | Alma | ☑ 10 | ☑ 9 |
    | Alpine | ☑ 3.20 | ☑ 3.19 |
    | Arch | ☑ 20240818 (.0.255804) | ☑ 20240101 (.0.204074) |
    | Debian | ☑ Trixie (13) | ☑ Bookworm (12) |
    | Fedora | ☑ 40 | ☑ 39 |
    | OpenSUSE | ☐ 15.6 | ☐ 15.5 |
    | Rocky | ☑ 10 | ☑ 9 |
    | Ubuntu | ☑ Noble (24.04) | ☐ Jammy (22.04) |

Stack #

  • POSIX shell
  • Python

2 Why {#why} #

Project workflows can occur in:

  • an online or offline context, dealing with custom CA & DNS servers
  • various Continuous Integration platforms, with different workflow syntaxes
  • specific Operating Systems, having different commands and package names
  • specific containers for JavaScript based actions (ForgeJo, Gitea, GitHub)

What if there was a unified way to do so?


3 How {#how} #

Group environment variables #

Full list

  • numbered
    • Certificate Authority armored certificates
    • Domain Name System servers IP addresses
  • ref names for deployment contexts of feature, staging & release
  • alternate locations of
    • Operating Systems & Software packages
    • Git repositories of
      • this project
      • its parent framework
      • projects not available in some distributions
        • shunit2
  • SSH key & hosts for deployments
  • a standalone POSIX shell script payload

Workflow files #

  • calling the POSIX shell script payload as their very first step
  • using a unified YAML syntax made of actions implemented in Python

Continuous Integration & Deployment #

Shell #

Python #


4 Where {#where} #

Repository #

Repo Feed CI
forgejo forge.rwx.work rss actions
tangled tangled.org atom pipelines

Sites #

Web https://spcd.rwx.work

Spaces #

ATProto colibri.social
ATProto roomy.space
IRC libera.chat

5 Who {#who} #

Authors Marc Beninca

6 When {#when} #

Priority 1 #

Documentation #

  • build instead of readme
  • generate graphs
  • list behavior differences
    • Continuous Integration platforms
    • Operating Systems

Shell #

  • comment
  • git/pypi fallback for rwx/spcd
  • handle errors
  • packages
    • configure
      • apk
      • pacman
      • zypper
    • repositories
      • codecs
        • epel
        • fedora
        • opensuse
      • opensuse
        • disable & enable https
  • locales
    • persist
  • test
  • workspace variable

Shell → Python #

  • check file & variable sums
  • install system packages
    • epel
      • plantuml
      • shellcheck
    • graphviz
    • openssh
    • rsync
    • shfmt
    • shunit
  • python virtual environment
    • install system package
    • configure pip
    • venv
      • create
      • activate
  • query package
  • relay environment module name

Python #

  • check
    • .py
    • .sh
      • maximum line length
  • comment
  • detect ssh private key type
  • fit banner to text
  • implement substeps
  • list sys.path
  • set workflow templates
    • actions
    • includes
  • try git repo url variable first for shunit
  • test

Priority 2 #

  • automate versions fetching
  • gource, xvfb, xauth
  • handle openh264 repositories
  • link from workspace to actions root
  • rpm fusion
  • tex
  • translate to french
  • try to support
    • guix
    • nix
  • uv