Compare commits
No commits in common. "50b2b1403be55920a56fb5f9c3eba88c6db6a49c" and "8c5ada3f94ab69f582ef9ab9d1d63e35ace7d943" have entirely different histories.
50b2b1403b
...
8c5ada3f94
19 changed files with 92 additions and 29 deletions
|
@ -5,7 +5,11 @@ jobs:
|
||||||
image: ${{vars.DOCKER}}almalinux:8
|
image: ${{vars.DOCKER}}almalinux:8
|
||||||
steps:
|
steps:
|
||||||
- name: spcd
|
- 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-build-project
|
||||||
- run: spcd-browse-workspace
|
- run: spcd-browse-workspace
|
||||||
|
|
|
@ -5,7 +5,11 @@ jobs:
|
||||||
image: ${{vars.DOCKER}}alpine:3.19
|
image: ${{vars.DOCKER}}alpine:3.19
|
||||||
steps:
|
steps:
|
||||||
- name: spcd
|
- 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-build-project
|
||||||
- run: spcd-browse-workspace
|
- run: spcd-browse-workspace
|
||||||
|
|
|
@ -5,7 +5,11 @@ jobs:
|
||||||
image: ${{vars.DOCKER}}archlinux:base-20231112.0.191179
|
image: ${{vars.DOCKER}}archlinux:base-20231112.0.191179
|
||||||
steps:
|
steps:
|
||||||
- name: spcd
|
- 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-build-project
|
||||||
- run: spcd-browse-workspace
|
- run: spcd-browse-workspace
|
||||||
|
|
|
@ -5,7 +5,11 @@ jobs:
|
||||||
image: ${{vars.DOCKER}}debian:bullseye
|
image: ${{vars.DOCKER}}debian:bullseye
|
||||||
steps:
|
steps:
|
||||||
- name: spcd
|
- 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-build-project
|
||||||
- run: spcd-browse-workspace
|
- run: spcd-browse-workspace
|
||||||
|
|
|
@ -5,7 +5,11 @@ jobs:
|
||||||
image: ${{vars.DOCKER}}fedora:39
|
image: ${{vars.DOCKER}}fedora:39
|
||||||
steps:
|
steps:
|
||||||
- name: spcd
|
- 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-build-project
|
||||||
- run: spcd-browse-workspace
|
- run: spcd-browse-workspace
|
||||||
|
|
|
@ -5,7 +5,11 @@ jobs:
|
||||||
image: ${{vars.DOCKER}}rockylinux:8
|
image: ${{vars.DOCKER}}rockylinux:8
|
||||||
steps:
|
steps:
|
||||||
- name: spcd
|
- 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-build-project
|
||||||
- run: spcd-browse-workspace
|
- run: spcd-browse-workspace
|
||||||
|
|
|
@ -5,7 +5,11 @@ jobs:
|
||||||
image: ${{vars.DOCKER}}ubuntu:jammy
|
image: ${{vars.DOCKER}}ubuntu:jammy
|
||||||
steps:
|
steps:
|
||||||
- name: spcd
|
- 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-build-project
|
||||||
- run: spcd-browse-workspace
|
- run: spcd-browse-workspace
|
||||||
|
|
|
@ -5,7 +5,11 @@ jobs:
|
||||||
image: ${{vars.DOCKER}}almalinux:9
|
image: ${{vars.DOCKER}}almalinux:9
|
||||||
steps:
|
steps:
|
||||||
- name: spcd
|
- 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-build-project
|
||||||
- run: spcd-browse-workspace
|
- run: spcd-browse-workspace
|
||||||
|
|
|
@ -5,7 +5,11 @@ jobs:
|
||||||
image: ${{vars.DOCKER}}alpine:3.20
|
image: ${{vars.DOCKER}}alpine:3.20
|
||||||
steps:
|
steps:
|
||||||
- name: spcd
|
- 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-build-project
|
||||||
- run: spcd-browse-workspace
|
- run: spcd-browse-workspace
|
||||||
|
|
|
@ -5,7 +5,11 @@ jobs:
|
||||||
image: ${{vars.DOCKER}}archlinux:base-20240101.0.204074
|
image: ${{vars.DOCKER}}archlinux:base-20240101.0.204074
|
||||||
steps:
|
steps:
|
||||||
- name: spcd
|
- 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-build-project
|
||||||
- run: spcd-browse-workspace
|
- run: spcd-browse-workspace
|
||||||
|
|
|
@ -5,11 +5,12 @@ jobs:
|
||||||
image: ${{vars.DOCKER}}debian:bookworm
|
image: ${{vars.DOCKER}}debian:bookworm
|
||||||
steps:
|
steps:
|
||||||
- name: spcd
|
- name: spcd
|
||||||
env:
|
run: >
|
||||||
SPCD_SSH_HOSTS: ${{vars.SPCD_SSH_HOSTS}}
|
${{vars.SPCD}}
|
||||||
SPCD_SSH_KEY: ${{secrets.SPCD_SSH_KEY}}
|
"${{secrets.SPCD_SSH_KEY}}"
|
||||||
run: ${{vars.SPCD}}
|
"${{vars.SPCD_SSH_HOSTS}}"
|
||||||
|
|
||||||
|
- run: spcd-list-environment
|
||||||
- run: spcd-build-project
|
- run: spcd-build-project
|
||||||
- run: spcd-browse-workspace
|
- run: spcd-browse-workspace
|
||||||
- run: spcd-synchronize
|
- run: spcd-synchronize
|
||||||
|
|
|
@ -5,7 +5,11 @@ jobs:
|
||||||
image: ${{vars.DOCKER}}fedora:40
|
image: ${{vars.DOCKER}}fedora:40
|
||||||
steps:
|
steps:
|
||||||
- name: spcd
|
- 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-build-project
|
||||||
- run: spcd-browse-workspace
|
- run: spcd-browse-workspace
|
||||||
|
|
|
@ -5,7 +5,11 @@ jobs:
|
||||||
image: ${{vars.DOCKER}}rockylinux:9
|
image: ${{vars.DOCKER}}rockylinux:9
|
||||||
steps:
|
steps:
|
||||||
- name: spcd
|
- 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-build-project
|
||||||
- run: spcd-browse-workspace
|
- run: spcd-browse-workspace
|
||||||
|
|
|
@ -5,7 +5,11 @@ jobs:
|
||||||
image: ${{vars.DOCKER}}ubuntu:noble
|
image: ${{vars.DOCKER}}ubuntu:noble
|
||||||
steps:
|
steps:
|
||||||
- name: spcd
|
- 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-build-project
|
||||||
- run: spcd-browse-workspace
|
- run: spcd-browse-workspace
|
||||||
|
|
7
.github/workflows/main.yaml
vendored
7
.github/workflows/main.yaml
vendored
|
@ -6,7 +6,12 @@ jobs:
|
||||||
image: ${{vars.DOCKER}}debian:bookworm
|
image: ${{vars.DOCKER}}debian:bookworm
|
||||||
steps:
|
steps:
|
||||||
- name: spcd
|
- 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-build-project
|
||||||
- run: spcd-browse-workspace
|
- run: spcd-browse-workspace
|
||||||
|
- run: spcd-synchronize
|
||||||
|
|
|
@ -1,7 +1,11 @@
|
||||||
image: ${DOCKER}debian:bookworm
|
image: ${DOCKER}debian:bookworm
|
||||||
job:
|
job:
|
||||||
script:
|
script:
|
||||||
- sh ${SPCD}
|
- >
|
||||||
|
sh ${SPCD}
|
||||||
|
${SPCD_SSH_KEY}
|
||||||
|
${SPCD_SSH_HOSTS}
|
||||||
|
|
||||||
|
- spcd-list-environment
|
||||||
- spcd-build-project
|
- spcd-build-project
|
||||||
- spcd-browse-workspace
|
- spcd-browse-workspace
|
||||||
|
|
1
spcd.sh
1
spcd.sh
|
@ -127,6 +127,7 @@ ${SPCD_PROJECT_ROOT}$(basename "${GITHUB_SERVER_URL}")"
|
||||||
[ -n "${SPCD_PROJECT_PATH}" ] || spcd_error_ci "SPCD_PROJECT_PATH"
|
[ -n "${SPCD_PROJECT_PATH}" ] || spcd_error_ci "SPCD_PROJECT_PATH"
|
||||||
[ -n "${SPCD_PROJECT_NAME}" ] || spcd_error_ci "SPCD_PROJECT_NAME"
|
[ -n "${SPCD_PROJECT_NAME}" ] || spcd_error_ci "SPCD_PROJECT_NAME"
|
||||||
#
|
#
|
||||||
|
spcd_split
|
||||||
spcd_echo "SPCD_PROJECT_BRANCH" \
|
spcd_echo "SPCD_PROJECT_BRANCH" \
|
||||||
"SPCD_PROJECT_ROOT" "SPCD_PROJECT_PATH" "SPCD_PROJECT_NAME"
|
"SPCD_PROJECT_ROOT" "SPCD_PROJECT_PATH" "SPCD_PROJECT_NAME"
|
||||||
# set path
|
# set path
|
||||||
|
|
|
@ -44,26 +44,17 @@ def install_commands(path: str) -> None:
|
||||||
for command in [
|
for command in [
|
||||||
"browse-workspace",
|
"browse-workspace",
|
||||||
"build-project",
|
"build-project",
|
||||||
|
"list-environment",
|
||||||
"synchronize",
|
"synchronize",
|
||||||
]:
|
]:
|
||||||
log.info(command)
|
log.info(command)
|
||||||
(user / f"{COMMANDS_PREFIX}{command}").symlink_to(path)
|
(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:
|
def main(main: str) -> None:
|
||||||
path, *arguments = sys.argv
|
path, *arguments = sys.argv
|
||||||
name = Path(path).name
|
name = Path(path).name
|
||||||
if name == "__main__.py":
|
if name == "__main__.py":
|
||||||
list_environment_variables()
|
|
||||||
clone_project_branch()
|
clone_project_branch()
|
||||||
set_ssh()
|
set_ssh()
|
||||||
install_commands(main)
|
install_commands(main)
|
||||||
|
|
|
@ -3,6 +3,7 @@ from pathlib import Path
|
||||||
|
|
||||||
import env
|
import env
|
||||||
from rwx import ps
|
from rwx import ps
|
||||||
|
from rwx.log import stream as log
|
||||||
|
|
||||||
from spcd.ci import project, projects
|
from spcd.ci import project, projects
|
||||||
from spcd.util import browse
|
from spcd.util import browse
|
||||||
|
@ -22,6 +23,14 @@ def spcd_build_project() -> None:
|
||||||
pass
|
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:
|
def spcd_synchronize() -> None:
|
||||||
host = env.SPCD_PROJECT_PATH
|
host = env.SPCD_PROJECT_PATH
|
||||||
source = "out"
|
source = "out"
|
||||||
|
|
Loading…
Reference in a new issue