Shell to Python Continuous Deployment https://spcd.rwx.work
  • Shell 74.9%
  • Python 25.1%
Find a file
Marc Beninca 58db927850
Some checks failed
/ rocky (push) Successful in 10m12s
/ alpine (push) Successful in 1m44s
/ debian (push) Successful in 15m8s
/ ubuntu (push) Successful in 8m36s
/ arch (push) Failing after 33s
/ opensuse (push) Successful in 3m47s
/ fedora (push) Failing after 17s
/ alma (push) Successful in 7m53s
feat(check): show checksum & diff if not matching
backup script for diff
2026-02-04 21:41:04 +01:00
.forgejo/workflows chore: add existing codebase 2026-01-30 19:20:59 +01:00
.gitea/workflows chore: add existing codebase 2026-01-30 19:20:59 +01:00
.github/workflows chore: add existing codebase 2026-01-30 19:20:59 +01:00
spcd feat(check): show checksum & diff if not matching 2026-02-04 21:41:04 +01:00
.gitignore chore: add existing codebase 2026-01-30 19:20:59 +01:00
.gitlab-ci.yml chore: add existing codebase 2026-01-30 19:20:59 +01:00
license.md chore: add existing codebase 2026-01-30 19:20:59 +01:00
pyproject.toml chore: add existing codebase 2026-01-30 19:20:59 +01:00
readme.md chore: add existing codebase 2026-01-30 19:20:59 +01:00
render.py chore: add existing codebase 2026-01-30 19:20:59 +01:00
spcd.sh chore: add existing codebase 2026-01-30 19:20:59 +01:00

Shell to Python Continuous Deployment

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


Table Of Contents


1 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?


2 How

Picture it…

2.1 Group environment variables

  • 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

2.2 Workflow files

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

2.3 Integration & Deployment

Shell

  • setting up the chosen Operating System container
    • Domain Name System resolving
    • package manager configuration & repositories
    • Certificate Authorities trusting
    • Operating System updating
  • installing Git to clone
    • this project
    • its parent project
  • installing Python
    • system environment
    • virtual environment
    • managed version
  • generating a Python module to switch context

Python

  • setting up an OpenSSH client
    • known hosts
    • private key
  • and finally parsing commands from
    • system
    • workflow
  • to run available actions
    • check project
    • build project
    • browse workspace
    • synchronize

3 What

3.1 Features

Handle project workflows in a unified way:

  • whether the network infrastructure is

    • online
    • offline with custom
      • Certificate Authorities
      • Domain Name System servers
  • whatever the Continuous Integration platform

    • ForgeJo
    • Gitea
    • GitHub
    • GitLab
    • SourceHut
  • whatever the Operating System container

    System Latest Previous
    Alma ☑ 9 ☑ 8
    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 ☑ 9 ☑ 8
    Ubuntu ☑ Noble (24.04) ☐ Jammy (22.04)

3.2 Environment variables

Variable Description Default
SPCD_CA_n Numbered CA certificates
SPCD_DNS_n Numbered name servers 9.9.9.9
SPCD_GIT_RWX RWX Git repository rwx
SPCD_GIT_SHUNIT ShUnit Git repository shunit2
SPCD_GIT_SPCD SPCD Git repository spcd
SPCD_REF_ARCHIVE Archive deployment ref old
SPCD_REF_FEATURE Feature deployment ref f
SPCD_REF_RELEASE Release deployment ref main
SPCD_REF_STAGING Staging deployment ref dev
SPCD_SSH_HOSTS domain.tld ssh-type pub
SPCD_SSH_KEY SSH private key
SPCD_TXT_LOCALE Locale to use for text en_US
SPCD_URL_ALMA Alma repository URL https://repo.almalinux.org
SPCD_URL_ALPINE Alpine repository URL https://dl-cdn.alpinelinux.org
SPCD_URL_ARCH Arch repository URL https://geo.mirror.pkgbuild.com
SPCD_URL_DEBIAN Debian repository URL https://deb.debian.org
SPCD_URL_EPEL EPEL repository URL https://dl.fedoraproject.org
SPCD_URL_FEDORA Fedora repository URL https://rpmfind.net
SPCD_URL_OPENSUSE OpenSUSE repository URL https://download.opensuse.org
SPCD_URL_PYTHON Python repository URL https://pypi.org
SPCD_URL_ROCKY Rocky repository URL https://dl.rockylinux.org
SPCD_URL_UBUNTU Ubuntu repository URL https://ubuntu.mirrors.ovh.net

3.3 Operating Systems containers

Latest

os https up ca python ffmpeg gource graphviz plantuml shellcheck shfmt shunit
Arch 20240818 3.12 7.0.2 0.54 12.0 1.2023.13 0.10 3.8 2.1.8
Alpine 3.20 3.12 6.1.1 0.54 9.0 1.2024.4 0.10 3.8 2.1.8
Fedora 40 3.12 → 3.13 6.1.2 0.55 9.0 1.2024.6 0.9 3.7 2.1.6
Debian Trixie 3.13 7.1.3 0.54 2.42 1.2020.2 0.10 3.8 2.1.8
OpenSUSE 15.6 3.6 → 3.12 4.4.4 0.54 2.48 1.2020.9 0.8 3.5 2.1.6
Ubuntu Noble 3.12 6.1.1 0.54 u2.42 u1.2020.2 u0.9 u3.8 2.1.8
Alma / Rocky 10 3.12 e7.1.2 9.0 e1.2025.4 e0.10

Previous

os https up ca python ffmpeg gource graphviz plantuml shellcheck shfmt shunit
Alpine 3.19 3.11 6.1.1 0.54 9.0 1.2023.12 0.9 3.7 2.1.8
Fedora 39 3.12 → 3.13 6.1.1 0.55 8.1 1.2024.6 0.9 3.5 2.1.6
Debian Bookworm 3.11 5.1.6 0.54 2.42 1.2020.2 0.9 3.6 2.1.8
OpenSUSE 15.5 3.6 → 3.11 4.4.4 0.54 2.48 1.2020.9 0.8 3.5 2.1.6
Alma / Rocky 9 3.9 → 3.12 e5.1.4 2.44 e1.2024.6 e0.8

Older

os https up ca python ffmpeg gource graphviz plantuml shellcheck shfmt shunit
Alma / Rocky 8 3.6 → 3.12 2.40 e1.2024.6 e0.6

Older Python

os https up ca python ffmpeg gource graphviz plantuml shellcheck shfmt shunit
Ubuntu Jammy 3.10 4.4.2 0.51 u2.42 u1.2020.2 u0.8 u3.4 2.1.6

4 Who


5 Where

5.1 Chat

5.2 Repo

5.3 Site


6 When

6.1 Release tasks

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

6.2 Further tasks

  • 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