Compare commits

..

No commits in common. "50b2b1403be55920a56fb5f9c3eba88c6db6a49c" and "8c5ada3f94ab69f582ef9ab9d1d63e35ace7d943" have entirely different histories.

19 changed files with 92 additions and 29 deletions

View file

@ -5,7 +5,11 @@ jobs:
image: ${{vars.DOCKER}}almalinux:8
steps:
- name: spcd
run: ${{vars.SPCD}}
run: >
${{vars.SPCD}}
"${{secrets.SPCD_SSH_KEY}}"
"${{vars.SPCD_SSH_HOSTS}}"
- run: spcd-list-environment
- run: spcd-build-project
- run: spcd-browse-workspace

View file

@ -5,7 +5,11 @@ jobs:
image: ${{vars.DOCKER}}alpine:3.19
steps:
- name: spcd
run: ${{vars.SPCD}}
run: >
${{vars.SPCD}}
"${{secrets.SPCD_SSH_KEY}}"
"${{vars.SPCD_SSH_HOSTS}}"
- run: spcd-list-environment
- run: spcd-build-project
- run: spcd-browse-workspace

View file

@ -5,7 +5,11 @@ jobs:
image: ${{vars.DOCKER}}archlinux:base-20231112.0.191179
steps:
- name: spcd
run: ${{vars.SPCD}}
run: >
${{vars.SPCD}}
"${{secrets.SPCD_SSH_KEY}}"
"${{vars.SPCD_SSH_HOSTS}}"
- run: spcd-list-environment
- run: spcd-build-project
- run: spcd-browse-workspace

View file

@ -5,7 +5,11 @@ jobs:
image: ${{vars.DOCKER}}debian:bullseye
steps:
- name: spcd
run: ${{vars.SPCD}}
run: >
${{vars.SPCD}}
"${{secrets.SPCD_SSH_KEY}}"
"${{vars.SPCD_SSH_HOSTS}}"
- run: spcd-list-environment
- run: spcd-build-project
- run: spcd-browse-workspace

View file

@ -5,7 +5,11 @@ jobs:
image: ${{vars.DOCKER}}fedora:39
steps:
- name: spcd
run: ${{vars.SPCD}}
run: >
${{vars.SPCD}}
"${{secrets.SPCD_SSH_KEY}}"
"${{vars.SPCD_SSH_HOSTS}}"
- run: spcd-list-environment
- run: spcd-build-project
- run: spcd-browse-workspace

View file

@ -5,7 +5,11 @@ jobs:
image: ${{vars.DOCKER}}rockylinux:8
steps:
- name: spcd
run: ${{vars.SPCD}}
run: >
${{vars.SPCD}}
"${{secrets.SPCD_SSH_KEY}}"
"${{vars.SPCD_SSH_HOSTS}}"
- run: spcd-list-environment
- run: spcd-build-project
- run: spcd-browse-workspace

View file

@ -5,7 +5,11 @@ jobs:
image: ${{vars.DOCKER}}ubuntu:jammy
steps:
- name: spcd
run: ${{vars.SPCD}}
run: >
${{vars.SPCD}}
"${{secrets.SPCD_SSH_KEY}}"
"${{vars.SPCD_SSH_HOSTS}}"
- run: spcd-list-environment
- run: spcd-build-project
- run: spcd-browse-workspace

View file

@ -5,7 +5,11 @@ jobs:
image: ${{vars.DOCKER}}almalinux:9
steps:
- name: spcd
run: ${{vars.SPCD}}
run: >
${{vars.SPCD}}
"${{secrets.SPCD_SSH_KEY}}"
"${{vars.SPCD_SSH_HOSTS}}"
- run: spcd-list-environment
- run: spcd-build-project
- run: spcd-browse-workspace

View file

@ -5,7 +5,11 @@ jobs:
image: ${{vars.DOCKER}}alpine:3.20
steps:
- name: spcd
run: ${{vars.SPCD}}
run: >
${{vars.SPCD}}
"${{secrets.SPCD_SSH_KEY}}"
"${{vars.SPCD_SSH_HOSTS}}"
- run: spcd-list-environment
- run: spcd-build-project
- run: spcd-browse-workspace

View file

@ -5,7 +5,11 @@ jobs:
image: ${{vars.DOCKER}}archlinux:base-20240101.0.204074
steps:
- name: spcd
run: ${{vars.SPCD}}
run: >
${{vars.SPCD}}
"${{secrets.SPCD_SSH_KEY}}"
"${{vars.SPCD_SSH_HOSTS}}"
- run: spcd-list-environment
- run: spcd-build-project
- run: spcd-browse-workspace

View file

@ -5,11 +5,12 @@ jobs:
image: ${{vars.DOCKER}}debian:bookworm
steps:
- name: spcd
env:
SPCD_SSH_HOSTS: ${{vars.SPCD_SSH_HOSTS}}
SPCD_SSH_KEY: ${{secrets.SPCD_SSH_KEY}}
run: ${{vars.SPCD}}
run: >
${{vars.SPCD}}
"${{secrets.SPCD_SSH_KEY}}"
"${{vars.SPCD_SSH_HOSTS}}"
- run: spcd-list-environment
- run: spcd-build-project
- run: spcd-browse-workspace
- run: spcd-synchronize

View file

@ -5,7 +5,11 @@ jobs:
image: ${{vars.DOCKER}}fedora:40
steps:
- name: spcd
run: ${{vars.SPCD}}
run: >
${{vars.SPCD}}
"${{secrets.SPCD_SSH_KEY}}"
"${{vars.SPCD_SSH_HOSTS}}"
- run: spcd-list-environment
- run: spcd-build-project
- run: spcd-browse-workspace

View file

@ -5,7 +5,11 @@ jobs:
image: ${{vars.DOCKER}}rockylinux:9
steps:
- name: spcd
run: ${{vars.SPCD}}
run: >
${{vars.SPCD}}
"${{secrets.SPCD_SSH_KEY}}"
"${{vars.SPCD_SSH_HOSTS}}"
- run: spcd-list-environment
- run: spcd-build-project
- run: spcd-browse-workspace

View file

@ -5,7 +5,11 @@ jobs:
image: ${{vars.DOCKER}}ubuntu:noble
steps:
- name: spcd
run: ${{vars.SPCD}}
run: >
${{vars.SPCD}}
"${{secrets.SPCD_SSH_KEY}}"
"${{vars.SPCD_SSH_HOSTS}}"
- run: spcd-list-environment
- run: spcd-build-project
- run: spcd-browse-workspace

View file

@ -6,7 +6,12 @@ jobs:
image: ${{vars.DOCKER}}debian:bookworm
steps:
- name: spcd
run: echo '${{vars.SPCD}}' | tr -d '\r' | sh -s
run: >
echo '${{vars.SPCD}}' | tr -d '\r' | sh -s
"${{secrets.SPCD_SSH_KEY}}"
"${{vars.SPCD_SSH_HOSTS}}"
- run: spcd-list-environment
- run: spcd-build-project
- run: spcd-browse-workspace
- run: spcd-synchronize

View file

@ -1,7 +1,11 @@
image: ${DOCKER}debian:bookworm
job:
script:
- sh ${SPCD}
- >
sh ${SPCD}
${SPCD_SSH_KEY}
${SPCD_SSH_HOSTS}
- spcd-list-environment
- spcd-build-project
- spcd-browse-workspace

View file

@ -127,6 +127,7 @@ ${SPCD_PROJECT_ROOT}$(basename "${GITHUB_SERVER_URL}")"
[ -n "${SPCD_PROJECT_PATH}" ] || spcd_error_ci "SPCD_PROJECT_PATH"
[ -n "${SPCD_PROJECT_NAME}" ] || spcd_error_ci "SPCD_PROJECT_NAME"
#
spcd_split
spcd_echo "SPCD_PROJECT_BRANCH" \
"SPCD_PROJECT_ROOT" "SPCD_PROJECT_PATH" "SPCD_PROJECT_NAME"
# set path

View file

@ -44,26 +44,17 @@ def install_commands(path: str) -> None:
for command in [
"browse-workspace",
"build-project",
"list-environment",
"synchronize",
]:
log.info(command)
(user / f"{COMMANDS_PREFIX}{command}").symlink_to(path)
def list_environment_variables() -> None:
step("List environment variables")
for variable, value in sorted(projects.environment.items()):
if variable != "SPCD_SSH_KEY":
log.info(f"{variable} = {value}")
else:
log.info(f"{variable}")
def main(main: str) -> None:
path, *arguments = sys.argv
name = Path(path).name
if name == "__main__.py":
list_environment_variables()
clone_project_branch()
set_ssh()
install_commands(main)

View file

@ -3,6 +3,7 @@ from pathlib import Path
import env
from rwx import ps
from rwx.log import stream as log
from spcd.ci import project, projects
from spcd.util import browse
@ -22,6 +23,14 @@ def spcd_build_project() -> None:
pass
def spcd_list_environment() -> None:
for variable, value in sorted(projects.environment.items()):
if variable != "SPCD_SSH_KEY":
log.info(f"{variable} = {value}")
else:
log.info(f"{variable}")
def spcd_synchronize() -> None:
host = env.SPCD_PROJECT_PATH
source = "out"