Compare commits

..

No commits in common. "4e9afd7e5d6e415d791b15c0231b591e326e5b1b" and "a6b8990f4b6e2d2cb613df6738c0cc6c664161e8" have entirely different histories.

17 changed files with 41 additions and 40 deletions

View file

@ -5,7 +5,7 @@ jobs:
image: almalinux:8
steps:
- name: cd
run: ${{vars.cd}} "${{secrets.cd_ssh_key}}" "${{vars.cd_ssh_hosts}}"
run: ${{vars.cd}} "${{secrets.cd_key}}" "${{vars.cd_hosts}}"
- run: cd-list-environment
- run: cd-clone-branch

View file

@ -5,7 +5,7 @@ jobs:
image: almalinux:9
steps:
- name: cd
run: ${{vars.cd}} "${{secrets.cd_ssh_key}}" "${{vars.cd_ssh_hosts}}"
run: ${{vars.cd}} "${{secrets.cd_key}}" "${{vars.cd_hosts}}"
- run: cd-list-environment
- run: cd-clone-branch

View file

@ -5,7 +5,7 @@ jobs:
image: alpine:3.18
steps:
- name: cd
run: ${{vars.cd}} "${{secrets.cd_ssh_key}}" "${{vars.cd_ssh_hosts}}"
run: ${{vars.cd}} "${{secrets.cd_key}}" "${{vars.cd_hosts}}"
- run: cd-list-environment
- run: cd-clone-branch

View file

@ -5,7 +5,7 @@ jobs:
image: alpine:3.19
steps:
- name: cd
run: ${{vars.cd}} "${{secrets.cd_ssh_key}}" "${{vars.cd_ssh_hosts}}"
run: ${{vars.cd}} "${{secrets.cd_key}}" "${{vars.cd_hosts}}"
- run: cd-list-environment
- run: cd-clone-branch

View file

@ -5,7 +5,7 @@ jobs:
image: archlinux:base-20231112.0.191179
steps:
- name: cd
run: ${{vars.cd}} "${{secrets.cd_ssh_key}}" "${{vars.cd_ssh_hosts}}"
run: ${{vars.cd}} "${{secrets.cd_key}}" "${{vars.cd_hosts}}"
- run: cd-list-environment
- run: cd-clone-branch

View file

@ -5,7 +5,7 @@ jobs:
image: archlinux:base-20240101.0.204074
steps:
- name: cd
run: ${{vars.cd}} "${{secrets.cd_ssh_key}}" "${{vars.cd_ssh_hosts}}"
run: ${{vars.cd}} "${{secrets.cd_key}}" "${{vars.cd_hosts}}"
- run: cd-list-environment
- run: cd-clone-branch

View file

@ -5,7 +5,7 @@ jobs:
image: debian:bookworm
steps:
- name: cd
run: ${{vars.cd}} "${{secrets.cd_ssh_key}}" "${{vars.cd_ssh_hosts}}"
run: ${{vars.cd}} "${{secrets.cd_key}}" "${{vars.cd_hosts}}"
- run: cd-list-environment
- run: cd-clone-branch

View file

@ -5,7 +5,7 @@ jobs:
image: debian:bullseye
steps:
- name: cd
run: ${{vars.cd}} "${{secrets.cd_ssh_key}}" "${{vars.cd_ssh_hosts}}"
run: ${{vars.cd}} "${{secrets.cd_key}}" "${{vars.cd_hosts}}"
- run: cd-list-environment
- run: cd-clone-branch

View file

@ -5,7 +5,7 @@ jobs:
image: fedora:39
steps:
- name: cd
run: ${{vars.cd}} "${{secrets.cd_ssh_key}}" "${{vars.cd_ssh_hosts}}"
run: ${{vars.cd}} "${{secrets.cd_key}}" "${{vars.cd_hosts}}"
- run: cd-list-environment
- run: cd-clone-branch

View file

@ -5,7 +5,7 @@ jobs:
image: fedora:40
steps:
- name: cd
run: ${{vars.cd}} "${{secrets.cd_ssh_key}}" "${{vars.cd_ssh_hosts}}"
run: ${{vars.cd}} "${{secrets.cd_key}}" "${{vars.cd_hosts}}"
- run: cd-list-environment
- run: cd-clone-branch

View file

@ -5,7 +5,7 @@ jobs:
image: rockylinux:8
steps:
- name: cd
run: ${{vars.cd}} "${{secrets.cd_ssh_key}}" "${{vars.cd_ssh_hosts}}"
run: ${{vars.cd}} "${{secrets.cd_key}}" "${{vars.cd_hosts}}"
- run: cd-list-environment
- run: cd-clone-branch

View file

@ -5,7 +5,7 @@ jobs:
image: rockylinux:9
steps:
- name: cd
run: ${{vars.cd}} "${{secrets.cd_ssh_key}}" "${{vars.cd_ssh_hosts}}"
run: ${{vars.cd}} "${{secrets.cd_key}}" "${{vars.cd_hosts}}"
- run: cd-list-environment
- run: cd-clone-branch

View file

@ -5,7 +5,7 @@ jobs:
image: ubuntu:jammy
steps:
- name: cd
run: ${{vars.cd}} "${{secrets.cd_ssh_key}}" "${{vars.cd_ssh_hosts}}"
run: ${{vars.cd}} "${{secrets.cd_key}}" "${{vars.cd_hosts}}"
- run: cd-list-environment
- run: cd-clone-branch

View file

@ -5,7 +5,7 @@ jobs:
image: ubuntu:noble
steps:
- name: cd
run: ${{vars.cd}} "${{secrets.cd_ssh_key}}" "${{vars.cd_ssh_hosts}}"
run: ${{vars.cd}} "${{secrets.cd_key}}" "${{vars.cd_hosts}}"
- run: cd-list-environment
- run: cd-clone-branch

View file

@ -1,7 +1,7 @@
image: debian:bookworm
job:
script:
- sh ${CD} ${CD_SSH_KEY} ${CD_SSH_HOSTS}
- sh ${CD} "${CD_KEY}" "${CD_HOSTS}"
- cd-list-environment
- cd-clone-branch

23
cd.sh
View file

@ -1,11 +1,15 @@
#! /usr/bin/env sh
# defaults
[ "${CD_DNS}" ] || CD_DNS="\
CD_DEFAULT_DNS="\
9.9.9.9 \
"
[ "${CD_GIT_CHILD}" ] || CD_GIT_CHILD="cd"
[ "${CD_GIT_PARENT}" ] || CD_GIT_PARENT="rwx"
CD_PYTHON_MODULE="cd"
CD_PYTHON_MODULES="\
${CD_PYTHON_MODULE} \
rwx \
"
# main
cd_main () {
@ -252,9 +256,6 @@ Dir::Etc::SourceParts \"\";
"${CD_OS_ALPINE}")
[ "${CD_URL_ALPINE}" ] && CD_URL_CHOSEN="${CD_URL_ALPINE}"
;;
"${CD_OS_ARCH}")
[ "${CD_URL_ARCH}" ] && CD_URL_CHOSEN="${CD_URL_ARCH}"
;;
"${CD_OS_DEBIAN}")
[ "${CD_URL_DEBIAN}" ] && CD_URL_CHOSEN="${CD_URL_DEBIAN}" \
|| CD_URL_CHOSEN="https://deb.debian.org/debian"
@ -443,9 +444,11 @@ cd_set_https_verification_off () {
cd_set_dns_resolving () {
local server
local servers
local text=""
cd_step "Set DNS resolving"
for server in ${CD_DNS} ; do
[ "${CD_DNS}" ] && servers="${CD_DNS}" || servers="${CD_DEFAULT_DNS}"
for server in ${servers} ; do
text="${text}nameserver ${server}
"
done
@ -537,7 +540,7 @@ local url
cd_step "Install Python modules"
root="$(mktemp --directory)" || exit
echo "${root}"
for repository in "${CD_GIT_CHILD}" "${CD_GIT_PARENT}" ; do
for repository in ${CD_PYTHON_MODULES} ; do
cd_split
url="${CD_PROJECTS_URL}/${repository}"
echo -n "\
@ -568,9 +571,9 @@ local self
echo -n "\
${self}
${CD_GIT_CHILD}
${CD_PYTHON_MODULE}
"
"${CD_PYTHON_ALIAS}" -m "${CD_GIT_CHILD}" "${@}"
"${CD_PYTHON_ALIAS}" -m "${CD_PYTHON_MODULE}" "${@}"
}
# functions

View file

@ -37,21 +37,19 @@ from various CA, CI, OCI / OS.
## How
| Variable | Description | Default |
|:--------------|:------------------------|:--------------------------------|
| CD_CA_n | Numbered CA certificate | |
| CD_DNS | Space separated servers | 9.9.9.9 |
| CD_GIT_CHILD | Child Git repository | cd |
| CD_GIT_PARENT | Parent Git repository | rwx |
| CD_SSH_HOSTS | domain.tld ssh-type pub | |
| CD_SSH_KEY | SSH private key | |
| CD_URL_ALMA | Alma repository URL | https://repo.almalinux.org |
| CD_URL_ALPINE | Alpine repository URL | https://dl-cdn.alpinelinux.org |
| CD_URL_ARCH | Arch repository URL | https://geo.mirror.pkgbuild.com |
| CD_URL_DEBIAN | Debian repository URL | https://deb.debian.org |
| CD_URL_FEDORA | Fedora repository URL | https://rpmfind.net |
| CD_URL_ROCKY | Rocky repository URL | https://dl.rockylinux.org |
| CD_URL_UBUNTU | Ubuntu repository URL | https://ubuntu.mirrors.ovh.net |
| Variable | Description |
|:--------------|:------------------------|
| CD_CA_n | Numbered CA certificate |
| CD_DNS | Space separated servers |
| CD_SSH_HOSTS | domain.tld ssh-type pub |
| CD_SSH_TYPE | SSH private key type |
| CD_URL_ALMA | Alma repository URL |
| CD_URL_ALPINE | Alpine repository URL |
| CD_URL_ARCH | Arch repository URL |
| CD_URL_DEBIAN | Debian repository URL |
| CD_URL_FEDORA | Fedora repository URL |
| CD_URL_ROCKY | Rocky repository URL |
| CD_URL_UBUNTU | Ubuntu repository URL |
## HTTPS & Python