Compare commits

..

No commits in common. "b414222048b67e1e6c3ba2d21367d9e63d02fb31" and "b1dc6e7ea9192bea944f86f95d75ec8d05def8e3" have entirely different histories.

4 changed files with 15 additions and 30 deletions

View file

@ -1,2 +1 @@
enable=all
shell=sh

View file

@ -44,8 +44,8 @@ from various contexts of CA, CI and OCI / OS.
| SPCD_BRANCH_RELEASE | Release deployment branch | main |
| SPCD_BRANCH_STAGING | Staging deployment branch | dev |
| SPCD_BRANCH_FEATURE | Feature deployment branch | f |
| SPCD_CA_n | Numbered CA certificates | |
| SPCD_DNS_n | Numbered name servers | 9.9.9.9 |
| SPCD_CA_n | Numbered CA certificate | |
| SPCD_DNS | Space separated servers | 9.9.9.9 |
| SPCD_GIT_MAIN | Main Git repository | spcd |
| SPCD_GIT_ROOT | Root Git repository | rwx |
| SPCD_SSH_HOSTS | domain.tld ssh-type pub | |
@ -80,14 +80,6 @@ from various contexts of CA, CI and OCI / OS.
## Tasks
* define templates
* actions
* includes
* handle python virtual environment
* install venv if necessary
* upgrade pip
* install packages
* ruff
* relay environment module name
* write tests
@ -101,6 +93,8 @@ from various contexts of CA, CI and OCI / OS.
* shellcheck
* graphviz
* openssh
* pip
* ruff
* rsync
* shfmt
* lint

12
spcd.sh
View file

@ -4,7 +4,9 @@
[ -n "${SPCD_BRANCH_RELEASE}" ] || SPCD_BRANCH_RELEASE="main"
[ -n "${SPCD_BRANCH_STAGING}" ] || SPCD_BRANCH_STAGING="dev"
[ -n "${SPCD_BRANCH_FEATURE}" ] || SPCD_BRANCH_FEATURE="f"
[ -n "${SPCD_DNS_1}" ] || SPCD_DNS_1="9.9.9.9"
[ -n "${SPCD_DNS}" ] || SPCD_DNS="\
9.9.9.9 \
"
[ -n "${SPCD_GIT_MAIN}" ] || SPCD_GIT_MAIN="spcd"
[ -n "${SPCD_GIT_ROOT}" ] || SPCD_GIT_ROOT="rwx"
@ -527,14 +529,10 @@ spcd_set_https_verification_off() {
spcd_set_dns_resolving() {
spcd_step "Set DNS resolving"
spcd_sdr__index=1
eval "spcd_sdr__value=\"\${SPCD_DNS_${spcd_sdr__index}}\""
while [ -n "${spcd_sdr__value}" ]; do
for spcd_sdr__server in ${SPCD_DNS}; do
spcd_sdr__text="${spcd_sdr__text}\
nameserver ${spcd_sdr__value}
nameserver ${spcd_sdr__server}
"
spcd_sdr__index=$((spcd_sdr__index + 1))
eval "spcd_sdr__value=\"\${SPCD_DNS_${spcd_sdr__index}}\""
done
spcd_write "${SPCD_DNS_FILE}" "${spcd_sdr__text}"
}

View file

@ -22,18 +22,12 @@ def spcd_build_project() -> None:
pass
def spcd_synchronize(
target: str | None = None, source: str | None = None
) -> None:
if not target:
user = "cd"
host = env.SPCD_PROJECT_PATH
root = (
Path(os.sep) / user / project.branch / projects.group / project.name
)
target = f"{user}@{host}:{root}"
if not source:
source = "out"
def spcd_synchronize() -> None:
host = env.SPCD_PROJECT_PATH
source = "out"
user = "cd"
root = Path(os.sep) / user / project.branch / projects.group / project.name
target = f"{user}@{host}:{root}"
ps.run(
"rsync",
"--archive",