Compare commits
3 commits
8c5ada3f94
...
50b2b1403b
Author | SHA1 | Date | |
---|---|---|---|
50b2b1403b | |||
5434be3157 | |||
2c5c28f364 |
19 changed files with 29 additions and 92 deletions
|
@ -5,11 +5,7 @@ jobs:
|
|||
image: ${{vars.DOCKER}}almalinux:8
|
||||
steps:
|
||||
- name: spcd
|
||||
run: >
|
||||
${{vars.SPCD}}
|
||||
"${{secrets.SPCD_SSH_KEY}}"
|
||||
"${{vars.SPCD_SSH_HOSTS}}"
|
||||
run: ${{vars.SPCD}}
|
||||
|
||||
- run: spcd-list-environment
|
||||
- run: spcd-build-project
|
||||
- run: spcd-browse-workspace
|
||||
|
|
|
@ -5,11 +5,7 @@ jobs:
|
|||
image: ${{vars.DOCKER}}alpine:3.19
|
||||
steps:
|
||||
- name: spcd
|
||||
run: >
|
||||
${{vars.SPCD}}
|
||||
"${{secrets.SPCD_SSH_KEY}}"
|
||||
"${{vars.SPCD_SSH_HOSTS}}"
|
||||
run: ${{vars.SPCD}}
|
||||
|
||||
- run: spcd-list-environment
|
||||
- run: spcd-build-project
|
||||
- run: spcd-browse-workspace
|
||||
|
|
|
@ -5,11 +5,7 @@ jobs:
|
|||
image: ${{vars.DOCKER}}archlinux:base-20231112.0.191179
|
||||
steps:
|
||||
- name: spcd
|
||||
run: >
|
||||
${{vars.SPCD}}
|
||||
"${{secrets.SPCD_SSH_KEY}}"
|
||||
"${{vars.SPCD_SSH_HOSTS}}"
|
||||
run: ${{vars.SPCD}}
|
||||
|
||||
- run: spcd-list-environment
|
||||
- run: spcd-build-project
|
||||
- run: spcd-browse-workspace
|
||||
|
|
|
@ -5,11 +5,7 @@ jobs:
|
|||
image: ${{vars.DOCKER}}debian:bullseye
|
||||
steps:
|
||||
- name: spcd
|
||||
run: >
|
||||
${{vars.SPCD}}
|
||||
"${{secrets.SPCD_SSH_KEY}}"
|
||||
"${{vars.SPCD_SSH_HOSTS}}"
|
||||
run: ${{vars.SPCD}}
|
||||
|
||||
- run: spcd-list-environment
|
||||
- run: spcd-build-project
|
||||
- run: spcd-browse-workspace
|
||||
|
|
|
@ -5,11 +5,7 @@ jobs:
|
|||
image: ${{vars.DOCKER}}fedora:39
|
||||
steps:
|
||||
- name: spcd
|
||||
run: >
|
||||
${{vars.SPCD}}
|
||||
"${{secrets.SPCD_SSH_KEY}}"
|
||||
"${{vars.SPCD_SSH_HOSTS}}"
|
||||
run: ${{vars.SPCD}}
|
||||
|
||||
- run: spcd-list-environment
|
||||
- run: spcd-build-project
|
||||
- run: spcd-browse-workspace
|
||||
|
|
|
@ -5,11 +5,7 @@ jobs:
|
|||
image: ${{vars.DOCKER}}rockylinux:8
|
||||
steps:
|
||||
- name: spcd
|
||||
run: >
|
||||
${{vars.SPCD}}
|
||||
"${{secrets.SPCD_SSH_KEY}}"
|
||||
"${{vars.SPCD_SSH_HOSTS}}"
|
||||
run: ${{vars.SPCD}}
|
||||
|
||||
- run: spcd-list-environment
|
||||
- run: spcd-build-project
|
||||
- run: spcd-browse-workspace
|
||||
|
|
|
@ -5,11 +5,7 @@ jobs:
|
|||
image: ${{vars.DOCKER}}ubuntu:jammy
|
||||
steps:
|
||||
- name: spcd
|
||||
run: >
|
||||
${{vars.SPCD}}
|
||||
"${{secrets.SPCD_SSH_KEY}}"
|
||||
"${{vars.SPCD_SSH_HOSTS}}"
|
||||
run: ${{vars.SPCD}}
|
||||
|
||||
- run: spcd-list-environment
|
||||
- run: spcd-build-project
|
||||
- run: spcd-browse-workspace
|
||||
|
|
|
@ -5,11 +5,7 @@ jobs:
|
|||
image: ${{vars.DOCKER}}almalinux:9
|
||||
steps:
|
||||
- name: spcd
|
||||
run: >
|
||||
${{vars.SPCD}}
|
||||
"${{secrets.SPCD_SSH_KEY}}"
|
||||
"${{vars.SPCD_SSH_HOSTS}}"
|
||||
run: ${{vars.SPCD}}
|
||||
|
||||
- run: spcd-list-environment
|
||||
- run: spcd-build-project
|
||||
- run: spcd-browse-workspace
|
||||
|
|
|
@ -5,11 +5,7 @@ jobs:
|
|||
image: ${{vars.DOCKER}}alpine:3.20
|
||||
steps:
|
||||
- name: spcd
|
||||
run: >
|
||||
${{vars.SPCD}}
|
||||
"${{secrets.SPCD_SSH_KEY}}"
|
||||
"${{vars.SPCD_SSH_HOSTS}}"
|
||||
run: ${{vars.SPCD}}
|
||||
|
||||
- run: spcd-list-environment
|
||||
- run: spcd-build-project
|
||||
- run: spcd-browse-workspace
|
||||
|
|
|
@ -5,11 +5,7 @@ jobs:
|
|||
image: ${{vars.DOCKER}}archlinux:base-20240101.0.204074
|
||||
steps:
|
||||
- name: spcd
|
||||
run: >
|
||||
${{vars.SPCD}}
|
||||
"${{secrets.SPCD_SSH_KEY}}"
|
||||
"${{vars.SPCD_SSH_HOSTS}}"
|
||||
run: ${{vars.SPCD}}
|
||||
|
||||
- run: spcd-list-environment
|
||||
- run: spcd-build-project
|
||||
- run: spcd-browse-workspace
|
||||
|
|
|
@ -5,12 +5,11 @@ jobs:
|
|||
image: ${{vars.DOCKER}}debian:bookworm
|
||||
steps:
|
||||
- name: spcd
|
||||
run: >
|
||||
${{vars.SPCD}}
|
||||
"${{secrets.SPCD_SSH_KEY}}"
|
||||
"${{vars.SPCD_SSH_HOSTS}}"
|
||||
env:
|
||||
SPCD_SSH_HOSTS: ${{vars.SPCD_SSH_HOSTS}}
|
||||
SPCD_SSH_KEY: ${{secrets.SPCD_SSH_KEY}}
|
||||
run: ${{vars.SPCD}}
|
||||
|
||||
- run: spcd-list-environment
|
||||
- run: spcd-build-project
|
||||
- run: spcd-browse-workspace
|
||||
- run: spcd-synchronize
|
||||
|
|
|
@ -5,11 +5,7 @@ jobs:
|
|||
image: ${{vars.DOCKER}}fedora:40
|
||||
steps:
|
||||
- name: spcd
|
||||
run: >
|
||||
${{vars.SPCD}}
|
||||
"${{secrets.SPCD_SSH_KEY}}"
|
||||
"${{vars.SPCD_SSH_HOSTS}}"
|
||||
run: ${{vars.SPCD}}
|
||||
|
||||
- run: spcd-list-environment
|
||||
- run: spcd-build-project
|
||||
- run: spcd-browse-workspace
|
||||
|
|
|
@ -5,11 +5,7 @@ jobs:
|
|||
image: ${{vars.DOCKER}}rockylinux:9
|
||||
steps:
|
||||
- name: spcd
|
||||
run: >
|
||||
${{vars.SPCD}}
|
||||
"${{secrets.SPCD_SSH_KEY}}"
|
||||
"${{vars.SPCD_SSH_HOSTS}}"
|
||||
run: ${{vars.SPCD}}
|
||||
|
||||
- run: spcd-list-environment
|
||||
- run: spcd-build-project
|
||||
- run: spcd-browse-workspace
|
||||
|
|
|
@ -5,11 +5,7 @@ jobs:
|
|||
image: ${{vars.DOCKER}}ubuntu:noble
|
||||
steps:
|
||||
- name: spcd
|
||||
run: >
|
||||
${{vars.SPCD}}
|
||||
"${{secrets.SPCD_SSH_KEY}}"
|
||||
"${{vars.SPCD_SSH_HOSTS}}"
|
||||
run: ${{vars.SPCD}}
|
||||
|
||||
- run: spcd-list-environment
|
||||
- run: spcd-build-project
|
||||
- run: spcd-browse-workspace
|
||||
|
|
7
.github/workflows/main.yaml
vendored
7
.github/workflows/main.yaml
vendored
|
@ -6,12 +6,7 @@ jobs:
|
|||
image: ${{vars.DOCKER}}debian:bookworm
|
||||
steps:
|
||||
- name: spcd
|
||||
run: >
|
||||
echo '${{vars.SPCD}}' | tr -d '\r' | sh -s
|
||||
"${{secrets.SPCD_SSH_KEY}}"
|
||||
"${{vars.SPCD_SSH_HOSTS}}"
|
||||
run: echo '${{vars.SPCD}}' | tr -d '\r' | sh -s
|
||||
|
||||
- run: spcd-list-environment
|
||||
- run: spcd-build-project
|
||||
- run: spcd-browse-workspace
|
||||
- run: spcd-synchronize
|
||||
|
|
|
@ -1,11 +1,7 @@
|
|||
image: ${DOCKER}debian:bookworm
|
||||
job:
|
||||
script:
|
||||
- >
|
||||
sh ${SPCD}
|
||||
${SPCD_SSH_KEY}
|
||||
${SPCD_SSH_HOSTS}
|
||||
- sh ${SPCD}
|
||||
|
||||
- spcd-list-environment
|
||||
- spcd-build-project
|
||||
- spcd-browse-workspace
|
||||
|
|
1
spcd.sh
1
spcd.sh
|
@ -127,7 +127,6 @@ ${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
|
||||
|
|
|
@ -44,17 +44,26 @@ 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)
|
||||
|
|
|
@ -3,7 +3,6 @@ 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
|
||||
|
@ -23,14 +22,6 @@ 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"
|
||||
|
|
Loading…
Reference in a new issue