How scala/scala-lang works
• Source Repository & Content: Represent the central Git repository, which includes:
• Content directories (e.g., _posts, blog, events, documentation, training, community) – where Markdown files and YAML data drive the content.
• Assets and styling directories (e.g., _sass, resources, _includes, _layouts) that define the visual appearance and structure.
• Custom collections and data (e.g., _data) that provide global site information (like navigation links) and structured content.
• Build Environment:
• The Jekyll engine, which processes the Markdown/YAML content and uses layouts and includes to produce static HTML, CSS, and JavaScript.
• Two alternative build workflows are supported: one based on Bundler (Ruby ecosystem) and one based on Docker Compose. (Indicate these as “Build Options” under the build environment.)
• Continuous Integration & Deployment (CI/CD):
• Jenkins jobs that are triggered on every commit to the repository. One Jenkins job builds the site and then uses rsync to deploy the content to the production webserver.
• Additional Jenkins jobs (like the archival sync job for Scala releases and nightly builds) which synchronize certain parts of the site (e.g., legacy content, release distributions, API docs, nightly builds) from other directories.
• Webserver & Hosting:
• The primary deployment target – a hosting environment that serves the static files on http://localhost:4000 (development) or the production site.
• A separate “old” subdirectory on the production webserver that holds a static copy of the previous website.
• An additional archival mechanism where files from the Scala distribution are synchronized to specific directories for releases, API docs, nightly builds, etc.
Relationships and Interactions
• Content developers commit changes to the Git repository (which holds all Markdown files, configuration, and assets).
• The CI/CD system (via Jenkins) triggers a build by running either Docker Compose (or using Bundler for local development). The build uses Jekyll to read the repository content, apply templates (from _layouts and _includes), and generate a complete static site.
• Post-build, the CI/CD pipeline uses rsync (with explicit exceptions) to deploy the generated static files to the production webserver, while also managing archival directories.
• For local development, developers can run the build process locally (using Docker Compose or Bundler) and view the site at localhost:4000.
Architectural Patterns and Technologies
• Static Site Generation: The system utilizes Jekyll (a Ruby-based static site generator) to compile content.
• CI/CD Pipeline: Jenkins is used as both a build server and a deployment automation tool.
• Containerization: Docker Compose is used to encapsulate the build environment, ensuring consistency across development environments.
• Data-Driven Content: The site leverages YAML and custom collections (_data) with the Jekyll build to make the site highly configurable and maintainable.
• The use of Sass and vendor libraries (like Bourbon, Neat, Unslider) organizes complex styling requirements.