Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 

README.md

Basic Example

Your first pisyn pipeline — test, build, deploy in under 50 lines.

What This Shows

This is the "hello world" of pisyn. It demonstrates the core construct tree and the most common job configuration options, targeting all three platforms simultaneously.

pisyn Features Used

  • Multi-platform synthesis — blank imports register GitLab, GitHub, and Tekton synthesizers at once
  • Pipeline triggersOnPush() and OnPR() for branch-based and merge request pipelines
  • Pipeline-level env varsSetEnv() for variables shared across all jobs
  • Stages and jobs — the App → Pipeline → Stage → Job construct tree
  • Job configurationImage(), Script(), Needs(), Timeout()
  • Artifacts and cachingSetArtifacts() with expiry, SetCache() for dependency caching
  • Platform-neutral variablespisyn.VarCommitBranch, pisyn.VarProjectPath, pisyn.VarCommitSHA
  • Deployment environmentsSetEnvironment() with name and URL
  • Manual triggerSetWhen(pisyn.Manual) for gated deployments
  • Conditional executionIf() to restrict jobs to specific branches

Pipeline Graph

graph LR
    unit_tests["unit-tests"]
    lint["lint"]
    build_binary["build-binary"]
    unit_tests --> build_binary
    lint --> build_binary
    deploy_prod["deploy-prod"]
    build_binary --> deploy_prod
Loading

Run It

go run .                    # synthesizes GitLab, GitHub, and Tekton output

Output lands in pisyn.out/:

  • pisyn.out/.gitlab-ci.yml
  • pisyn.out/.github/workflows/ci-cd.yml
  • pisyn.out/tekton/