Files
szci/readme.hints.md

2.1 KiB

  • Focus on CLI usage in CI environments.
  • Show GitLab CI, GitHub CI and Gitea CI examples.

Architecture

szci is a thin orchestrator that delegates heavy lifting to specialized tools:

  • Docker: Delegates all operations to @git.zone/tsdocker via npx
  • NPM: Thin wrapper around pnpm with .npmrc generation from SZCI_TOKEN_NPM* env vars
  • Node.js: NVM-based version management (stable=22, lts=20, legacy=18)
  • SSH: Deploys SSH keys from SZCI_SSHKEY_* env vars
  • Git: GitHub mirroring via SZCI_GIT_GITHUBTOKEN
  • Cloudly: Integration with serve.zone infrastructure

Docker Env Var Bridging

szci bridges its own env var format to tsdocker's format before delegation:

  • SZCI_LOGIN_DOCKER* -> DOCKER_REGISTRY_N (pipe-delimited: url|user|pass)
  • GitLab CI: CI_JOB_TOKEN -> DOCKER_REGISTRY_0 for registry.gitlab.com

Deno Migration Status

The project has been fully migrated from Node.js to Deno runtime.

Environment Variables

All environment variables have been rebranded from NPMCI_* to SZCI_*:

Old Name New Name
NPMCI_COMPUTED_REPOURL SZCI_COMPUTED_REPOURL
NPMCI_URL_CLOUDLY SZCI_URL_CLOUDLY
NPMCI_GIT_GITHUBTOKEN SZCI_GIT_GITHUBTOKEN
NPMCI_GIT_GITHUBGROUP SZCI_GIT_GITHUBGROUP
NPMCI_GIT_GITHUB SZCI_GIT_GITHUB
NPMCI_SSHKEY_* SZCI_SSHKEY_*
NPMCI_LOGIN_DOCKER* SZCI_LOGIN_DOCKER*
NPMCI_TOKEN_NPM* SZCI_TOKEN_NPM*
NPMTS_TEST SZCI_TEST
DEBUG_NPMCI DEBUG_SZCI

Runtime

  • Uses Deno APIs (Deno.env, Deno.cwd, Deno.exit)
  • Logger runtime set to 'deno'
  • Dynamic imports use .ts extensions

Removed Modules (v7+)

The following were removed as dead/obsolete code:

  • mod_trigger - Deprecated GitLab API v3
  • mod_precheck - GitLab-specific runner tag validation
  • manager.cloudron - Niche Cloudron deployment
  • mod_command - Trivial bash wrapper
  • mod_clean - Trivial config cleanup
  • Docker manager internals (Dockerfile, DockerRegistry, RegistryStorage classes) - replaced by tsdocker delegation