cidd → pidd

This commit is contained in:
Marc Beninca 2024-06-21 14:57:57 +02:00
parent 42c05eecb7
commit 9f12c01057
Signed by: marc.beninca
GPG key ID: 9C7613450C80C24F
22 changed files with 664 additions and 664 deletions

View file

@ -4,13 +4,13 @@ jobs:
container:
image: almalinux:8
steps:
- name: cidd
- name: pidd
run: >
${{vars.CIDD}}
"${{secrets.CIDD_SSH_KEY}}"
"${{vars.CIDD_SSH_HOSTS}}"
${{vars.PIDD}}
"${{secrets.PIDD_SSH_KEY}}"
"${{vars.PIDD_SSH_HOSTS}}"
- run: cidd-list-environment
- run: cidd-clone-branch
- run: cidd-build-project
- run: cidd-browse-workspace
- run: pidd-list-environment
- run: pidd-clone-branch
- run: pidd-build-project
- run: pidd-browse-workspace

View file

@ -4,13 +4,13 @@ jobs:
container:
image: almalinux:9
steps:
- name: cidd
- name: pidd
run: >
${{vars.CIDD}}
"${{secrets.CIDD_SSH_KEY}}"
"${{vars.CIDD_SSH_HOSTS}}"
${{vars.PIDD}}
"${{secrets.PIDD_SSH_KEY}}"
"${{vars.PIDD_SSH_HOSTS}}"
- run: cidd-list-environment
- run: cidd-clone-branch
- run: cidd-build-project
- run: cidd-browse-workspace
- run: pidd-list-environment
- run: pidd-clone-branch
- run: pidd-build-project
- run: pidd-browse-workspace

View file

@ -4,13 +4,13 @@ jobs:
container:
image: alpine:3.18
steps:
- name: cidd
- name: pidd
run: >
${{vars.CIDD}}
"${{secrets.CIDD_SSH_KEY}}"
"${{vars.CIDD_SSH_HOSTS}}"
${{vars.PIDD}}
"${{secrets.PIDD_SSH_KEY}}"
"${{vars.PIDD_SSH_HOSTS}}"
- run: cidd-list-environment
- run: cidd-clone-branch
- run: cidd-build-project
- run: cidd-browse-workspace
- run: pidd-list-environment
- run: pidd-clone-branch
- run: pidd-build-project
- run: pidd-browse-workspace

View file

@ -4,13 +4,13 @@ jobs:
container:
image: alpine:3.19
steps:
- name: cidd
- name: pidd
run: >
${{vars.CIDD}}
"${{secrets.CIDD_SSH_KEY}}"
"${{vars.CIDD_SSH_HOSTS}}"
${{vars.PIDD}}
"${{secrets.PIDD_SSH_KEY}}"
"${{vars.PIDD_SSH_HOSTS}}"
- run: cidd-list-environment
- run: cidd-clone-branch
- run: cidd-build-project
- run: cidd-browse-workspace
- run: pidd-list-environment
- run: pidd-clone-branch
- run: pidd-build-project
- run: pidd-browse-workspace

View file

@ -4,13 +4,13 @@ jobs:
container:
image: archlinux:base-20231112.0.191179
steps:
- name: cidd
- name: pidd
run: >
${{vars.CIDD}}
"${{secrets.CIDD_SSH_KEY}}"
"${{vars.CIDD_SSH_HOSTS}}"
${{vars.PIDD}}
"${{secrets.PIDD_SSH_KEY}}"
"${{vars.PIDD_SSH_HOSTS}}"
- run: cidd-list-environment
- run: cidd-clone-branch
- run: cidd-build-project
- run: cidd-browse-workspace
- run: pidd-list-environment
- run: pidd-clone-branch
- run: pidd-build-project
- run: pidd-browse-workspace

View file

@ -4,13 +4,13 @@ jobs:
container:
image: archlinux:base-20240101.0.204074
steps:
- name: cidd
- name: pidd
run: >
${{vars.CIDD}}
"${{secrets.CIDD_SSH_KEY}}"
"${{vars.CIDD_SSH_HOSTS}}"
${{vars.PIDD}}
"${{secrets.PIDD_SSH_KEY}}"
"${{vars.PIDD_SSH_HOSTS}}"
- run: cidd-list-environment
- run: cidd-clone-branch
- run: cidd-build-project
- run: cidd-browse-workspace
- run: pidd-list-environment
- run: pidd-clone-branch
- run: pidd-build-project
- run: pidd-browse-workspace

View file

@ -4,14 +4,14 @@ jobs:
container:
image: debian:bookworm
steps:
- name: cidd
- name: pidd
run: >
${{vars.CIDD}}
"${{secrets.CIDD_SSH_KEY}}"
"${{vars.CIDD_SSH_HOSTS}}"
${{vars.PIDD}}
"${{secrets.PIDD_SSH_KEY}}"
"${{vars.PIDD_SSH_HOSTS}}"
- run: cidd-list-environment
- run: cidd-clone-branch
- run: cidd-build-project
- run: cidd-browse-workspace
- run: cidd-synchronize
- run: pidd-list-environment
- run: pidd-clone-branch
- run: pidd-build-project
- run: pidd-browse-workspace
- run: pidd-synchronize

View file

@ -4,13 +4,13 @@ jobs:
container:
image: debian:bullseye
steps:
- name: cidd
- name: pidd
run: >
${{vars.CIDD}}
"${{secrets.CIDD_SSH_KEY}}"
"${{vars.CIDD_SSH_HOSTS}}"
${{vars.PIDD}}
"${{secrets.PIDD_SSH_KEY}}"
"${{vars.PIDD_SSH_HOSTS}}"
- run: cidd-list-environment
- run: cidd-clone-branch
- run: cidd-build-project
- run: cidd-browse-workspace
- run: pidd-list-environment
- run: pidd-clone-branch
- run: pidd-build-project
- run: pidd-browse-workspace

View file

@ -4,13 +4,13 @@ jobs:
container:
image: fedora:39
steps:
- name: cidd
- name: pidd
run: >
${{vars.CIDD}}
"${{secrets.CIDD_SSH_KEY}}"
"${{vars.CIDD_SSH_HOSTS}}"
${{vars.PIDD}}
"${{secrets.PIDD_SSH_KEY}}"
"${{vars.PIDD_SSH_HOSTS}}"
- run: cidd-list-environment
- run: cidd-clone-branch
- run: cidd-build-project
- run: cidd-browse-workspace
- run: pidd-list-environment
- run: pidd-clone-branch
- run: pidd-build-project
- run: pidd-browse-workspace

View file

@ -4,13 +4,13 @@ jobs:
container:
image: fedora:40
steps:
- name: cidd
- name: pidd
run: >
${{vars.CIDD}}
"${{secrets.CIDD_SSH_KEY}}"
"${{vars.CIDD_SSH_HOSTS}}"
${{vars.PIDD}}
"${{secrets.PIDD_SSH_KEY}}"
"${{vars.PIDD_SSH_HOSTS}}"
- run: cidd-list-environment
- run: cidd-clone-branch
- run: cidd-build-project
- run: cidd-browse-workspace
- run: pidd-list-environment
- run: pidd-clone-branch
- run: pidd-build-project
- run: pidd-browse-workspace

View file

@ -4,13 +4,13 @@ jobs:
container:
image: rockylinux:8
steps:
- name: cidd
- name: pidd
run: >
${{vars.CIDD}}
"${{secrets.CIDD_SSH_KEY}}"
"${{vars.CIDD_SSH_HOSTS}}"
${{vars.PIDD}}
"${{secrets.PIDD_SSH_KEY}}"
"${{vars.PIDD_SSH_HOSTS}}"
- run: cidd-list-environment
- run: cidd-clone-branch
- run: cidd-build-project
- run: cidd-browse-workspace
- run: pidd-list-environment
- run: pidd-clone-branch
- run: pidd-build-project
- run: pidd-browse-workspace

View file

@ -4,13 +4,13 @@ jobs:
container:
image: rockylinux:9
steps:
- name: cidd
- name: pidd
run: >
${{vars.CIDD}}
"${{secrets.CIDD_SSH_KEY}}"
"${{vars.CIDD_SSH_HOSTS}}"
${{vars.PIDD}}
"${{secrets.PIDD_SSH_KEY}}"
"${{vars.PIDD_SSH_HOSTS}}"
- run: cidd-list-environment
- run: cidd-clone-branch
- run: cidd-build-project
- run: cidd-browse-workspace
- run: pidd-list-environment
- run: pidd-clone-branch
- run: pidd-build-project
- run: pidd-browse-workspace

View file

@ -4,13 +4,13 @@ jobs:
container:
image: ubuntu:jammy
steps:
- name: cidd
- name: pidd
run: >
${{vars.CIDD}}
"${{secrets.CIDD_SSH_KEY}}"
"${{vars.CIDD_SSH_HOSTS}}"
${{vars.PIDD}}
"${{secrets.PIDD_SSH_KEY}}"
"${{vars.PIDD_SSH_HOSTS}}"
- run: cidd-list-environment
- run: cidd-clone-branch
- run: cidd-build-project
- run: cidd-browse-workspace
- run: pidd-list-environment
- run: pidd-clone-branch
- run: pidd-build-project
- run: pidd-browse-workspace

View file

@ -4,13 +4,13 @@ jobs:
container:
image: ubuntu:noble
steps:
- name: cidd
- name: pidd
run: >
${{vars.CIDD}}
"${{secrets.CIDD_SSH_KEY}}"
"${{vars.CIDD_SSH_HOSTS}}"
${{vars.PIDD}}
"${{secrets.PIDD_SSH_KEY}}"
"${{vars.PIDD_SSH_HOSTS}}"
- run: cidd-list-environment
- run: cidd-clone-branch
- run: cidd-build-project
- run: cidd-browse-workspace
- run: pidd-list-environment
- run: pidd-clone-branch
- run: pidd-build-project
- run: pidd-browse-workspace

View file

@ -5,14 +5,14 @@ jobs:
container:
image: debian:bookworm
steps:
- name: cidd
- name: pidd
run: >
echo '${{vars.CIDD}}' | tr -d '\r' | sh -s
"${{secrets.CIDD_SSH_KEY}}"
"${{vars.CIDD_SSH_HOSTS}}"
echo '${{vars.PIDD}}' | tr -d '\r' | sh -s
"${{secrets.PIDD_SSH_KEY}}"
"${{vars.PIDD_SSH_HOSTS}}"
- run: cidd-list-environment
- run: cidd-clone-branch
- run: cidd-build-project
- run: cidd-browse-workspace
- run: cidd-synchronize
- run: pidd-list-environment
- run: pidd-clone-branch
- run: pidd-build-project
- run: pidd-browse-workspace
- run: pidd-synchronize

View file

@ -2,11 +2,11 @@ image: debian:bookworm
job:
script:
- >
sh ${CIDD}
${CIDD_SSH_KEY}
${CIDD_SSH_HOSTS}
sh ${PIDD}
${PIDD_SSH_KEY}
${PIDD_SSH_HOSTS}
- cidd-list-environment
- cidd-clone-branch
- cidd-build-project
- cidd-browse-workspace
- pidd-list-environment
- pidd-clone-branch
- pidd-build-project
- pidd-browse-workspace

996
pidd.sh

File diff suppressed because it is too large Load diff

View file

@ -10,21 +10,21 @@ import env
from rwx import fs, ps
from rwx.log import stream as log
import cidd
from cidd.project import Project
from cidd.projects import Projects
import pidd
from pidd.project import Project
from pidd.projects import Projects
COMMANDS_PREFIX = "cidd-"
COMMANDS_PREFIX = "pidd-"
projects = Projects()
project = Project(projects)
def cidd_browse_workspace() -> None:
def pidd_browse_workspace() -> None:
browse(project.root)
def cidd_build_project() -> None:
def pidd_build_project() -> None:
for extension in ["py", "sh"]:
path = Path(project.root) / f"build.{extension}"
if path.exists():
@ -34,7 +34,7 @@ def cidd_build_project() -> None:
pass
def cidd_clone_branch() -> None:
def pidd_clone_branch() -> None:
log.info(projects)
split()
log.info(project)
@ -58,12 +58,12 @@ def cidd_clone_branch() -> None:
)
def cidd_list_environment() -> None:
def pidd_list_environment() -> None:
for variable, value in sorted(projects.environment.items()):
log.info(f"{variable} = {value}")
def cidd_synchronize() -> None:
def pidd_synchronize() -> None:
host = "rwx.work"
source = "out"
user = "cd"
@ -119,10 +119,10 @@ def main() -> None:
path, *arguments = sys.argv
name = Path(path).name
if name == "__main__.py":
cidd.set_ssh(*arguments)
cidd.install_commands(__file__)
pidd.set_ssh(*arguments)
pidd.install_commands(__file__)
else:
function = getattr(cidd, name.replace("-", "_"))
function = getattr(pidd, name.replace("-", "_"))
function(*arguments)
@ -154,19 +154,19 @@ def set_ssh(*arguments: str) -> None:
def frame(text: str) -> None:
log.info(f"{env.CIDD_OPEN}{text}")
log.info(f"{env.PIDD_OPEN}{text}")
def shut(text: str) -> None:
log.info(f"{env.CIDD_SHUT}{text}")
log.info(f"{env.PIDD_SHUT}{text}")
def split() -> None:
log.info(env.CIDD_SPLT)
log.info(env.PIDD_SPLT)
def step(text: str) -> None:
env.CIDD_STEP += 1
log.info(env.CIDD_DOWN)
log.info(f"{env.CIDD_VERT} {env.CIDD_STEP} {text}")
log.info(env.CIDD___UP)
env.PIDD_STEP += 1
log.info(env.PIDD_DOWN)
log.info(f"{env.PIDD_VERT} {env.PIDD_STEP} {text}")
log.info(env.PIDD___UP)

View file

@ -2,7 +2,7 @@
"""Entry point."""
import cidd
import pidd
if __name__ == "__main__":
cidd.main(__file__)
pidd.main(__file__)

View file

@ -7,7 +7,7 @@ from typing import TYPE_CHECKING
from urllib.parse import urljoin
if TYPE_CHECKING:
from cidd.projects import Projects
from pidd.projects import Projects
BRANCH = [
"GITHUB_REF_NAME",

View file

@ -19,7 +19,7 @@ description = "Continuous Integration, Delivery & Deployment"
dynamic = ["version"]
keywords = []
license-files = { paths = ["license.md"] }
name = "cidd"
name = "pidd"
readme = "readme.md"
requires-python = ">= 3.10"
@ -29,7 +29,7 @@ requires-python = ">= 3.10"
[project.urls]
[tool.hatch.version]
path = "cidd/__init__.py"
path = "pidd/__init__.py"
[tool.ruff]
line-length = 80

View file

@ -41,19 +41,19 @@ from various contexts of CA, CI and OCI / OS.
| Variable | Description | Default |
|:----------------|:------------------------|:--------------------------------|
| CIDD_CA_n | Numbered CA certificate | |
| CIDD_DNS | Space separated servers | 9.9.9.9 |
| CIDD_GIT_CHILD | Child Git repository | cidd |
| CIDD_GIT_PARENT | Parent Git repository | rwx |
| CIDD_SSH_HOSTS | domain.tld ssh-type pub | |
| CIDD_SSH_KEY | SSH private key | |
| CIDD_URL_ALMA | Alma repository URL | https://repo.almalinux.org |
| CIDD_URL_ALPINE | Alpine repository URL | https://dl-cdn.alpinelinux.org |
| CIDD_URL_ARCH | Arch repository URL | https://geo.mirror.pkgbuild.com |
| CIDD_URL_DEBIAN | Debian repository URL | https://deb.debian.org |
| CIDD_URL_FEDORA | Fedora repository URL | https://rpmfind.net |
| CIDD_URL_ROCKY | Rocky repository URL | https://dl.rockylinux.org |
| CIDD_URL_UBUNTU | Ubuntu repository URL | https://ubuntu.mirrors.ovh.net |
| PIDD_CA_n | Numbered CA certificate | |
| PIDD_DNS | Space separated servers | 9.9.9.9 |
| PIDD_GIT_CHILD | Child Git repository | pidd |
| PIDD_GIT_PARENT | Parent Git repository | rwx |
| PIDD_SSH_HOSTS | domain.tld ssh-type pub | |
| PIDD_SSH_KEY | SSH private key | |
| PIDD_URL_ALMA | Alma repository URL | https://repo.almalinux.org |
| PIDD_URL_ALPINE | Alpine repository URL | https://dl-cdn.alpinelinux.org |
| PIDD_URL_ARCH | Arch repository URL | https://geo.mirror.pkgbuild.com |
| PIDD_URL_DEBIAN | Debian repository URL | https://deb.debian.org |
| PIDD_URL_FEDORA | Fedora repository URL | https://rpmfind.net |
| PIDD_URL_ROCKY | Rocky repository URL | https://dl.rockylinux.org |
| PIDD_URL_UBUNTU | Ubuntu repository URL | https://ubuntu.mirrors.ovh.net |
## HTTPS & Python