How paradyme-management/appetizer-jcasc works
Project type and purpose
• This is a “code-as-configuration” project (Jenkins Configuration as Code, a.k.a. JCasC) whose sole purpose is to configure and bootstrap a Jenkins installation, define folders and jobs, and then hand off to ArgoCD for deployment.
• The README calls out that you need GitHub and Artifactory credentials, that you run a shell script (appetizer.sh) to apply credentials and this JCasC code, and finally configure ArgoCD to deploy your application.
File structure
Top-level files:
• README.md – project description & usage
• folder.groovy – Groovy DSL defining Jenkins folder structure
• jobs.groovy – Groovy DSL defining Jenkins jobs/pipelines
• jenkins.yaml – the JCasC YAML for global Jenkins configuration
• folder.groovy & jobs.groovy work together under the JCasC plugin
No “src/” or “lib/” directories—this repo is purely configuration, not application code.
README for additional insights
• It mentions an external “appetizer-deploy” project that manages credentials.
• The high-level flow is:
1. Apply GitHub/Artifactory creds
2. Apply this JCasC config to Jenkins
3. Once Jenkins builds complete, configure ArgoCD for deployment
a. Main components to include:
• The appetizer-jcasc repo (source code/config)
• Jenkins Controller (master) with JCasC plugin
• Jenkins Folder & Job DSL (folder.groovy, jobs.groovy)
• Shell bootstrap script (appetizer.sh)
• External credential store (GitHub, Artifactory)
• Artifact registry (Artifactory)
• GitOps system (ArgoCD)
• Kubernetes cluster (local cluster)
b. Relationships & interactions:
1. The bootstrap script reads credentials from Github/Artifactory vault, then
└─▶ pushes jenkins.yaml, folder.groovy, jobs.groovy into the JCasC API on the Jenkins Controller
2. Jenkins Controller (via JCasC plugin) applies global config + folder/job definitions
3. Jenkins Controller schedules and runs pipelines defined in jobs.groovy
4. Pipeline steps build artifacts and push to Artifactory (using stored credentials)
5. After successful build, the script or Jenkins job updates an ArgoCD Application manifest
6. ArgoCD reconciles the new manifests against the Kubernetes cluster
c. Architectural patterns & design principles
• Declarative configuration (YAML + Groovy DSL)
• Immutable, code-driven CI configuration (no manual UI clicks)
• GitOps for deployment (ArgoCD watching Git)
• Separation of concerns:
– JCasC sets up Jenkins
– Folder/Job DSL defines pipeline logic
– ArgoCD handles deployment
d. Key technologies/frameworks/libraries
• Jenkins Configuration as Code plugin (jenkins.yaml)
• Jenkins Job DSL (folder.groovy, jobs.groovy)
• Shell scripting (appetizer.sh)
• GitHub or Vault for credentials storage
• Artifactory for artifacts
• ArgoCD for Kubernetes GitOps
Diagramming recommendations
• Use clear, consistent labels (e.g., “Jenkins Controller (JCasC)”, “Artifactory”)
• Repo → Jenkins API
• Jenkins → Artifactory
• Repo/Jenkins → ArgoCD → Kubernetes
• Blue for configuration code
• Green for CI components
• Orange for CD components
Detail
• Bootstrap script as a distinct component.
• Credentials as a separate service or vault.
• Portray ArgoCD’s reconciliation loop to the Kubernetes cluster.