Compare commits

...

6 commits

Author SHA1 Message Date
b414222048
enumerate name servers
Some checks failed
/ job (push) Failing after 6m12s
2024-08-06 12:53:23 +02:00
7822b94f47
pip 2024-08-03 00:51:58 +02:00
1b9996a13d
tasks 2024-08-02 21:19:28 +02:00
9e2cd54c66
tasks 2024-08-02 21:17:40 +02:00
461303c736
synchronize 2024-07-30 19:39:11 +02:00
b77ff553ee
shell=sh 2024-07-30 09:19:25 +02:00
4 changed files with 30 additions and 15 deletions

View file

@ -1 +1,2 @@
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 certificate | |
| SPCD_DNS | Space separated servers | 9.9.9.9 |
| SPCD_CA_n | Numbered CA certificates | |
| SPCD_DNS_n | Numbered name 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,6 +80,14 @@ 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
@ -93,8 +101,6 @@ from various contexts of CA, CI and OCI / OS.
* shellcheck
* graphviz
* openssh
* pip
* ruff
* rsync
* shfmt
* lint

12
spcd.sh
View file

@ -4,9 +4,7 @@
[ -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}" ] || SPCD_DNS="\
9.9.9.9 \
"
[ -n "${SPCD_DNS_1}" ] || SPCD_DNS_1="9.9.9.9"
[ -n "${SPCD_GIT_MAIN}" ] || SPCD_GIT_MAIN="spcd"
[ -n "${SPCD_GIT_ROOT}" ] || SPCD_GIT_ROOT="rwx"
@ -529,10 +527,14 @@ spcd_set_https_verification_off() {
spcd_set_dns_resolving() {
spcd_step "Set DNS resolving"
for spcd_sdr__server in ${SPCD_DNS}; do
spcd_sdr__index=1
eval "spcd_sdr__value=\"\${SPCD_DNS_${spcd_sdr__index}}\""
while [ -n "${spcd_sdr__value}" ]; do
spcd_sdr__text="${spcd_sdr__text}\
nameserver ${spcd_sdr__server}
nameserver ${spcd_sdr__value}
"
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,12 +22,18 @@ def spcd_build_project() -> None:
pass
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}"
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"
ps.run(
"rsync",
"--archive",