How cray-hpe/csm works
Below are detailed instructions and guidelines tailored to this project:
Main components
• Source Repository & Configuration
• This includes the Git repository itself with all configuration files in the .github directory (workflows, pull request templates, CODEOWNERS), the Jenkinsfile, and other CI/CD related files.
• Makefile at the top level, which orchestrates many of the build steps.
• Build & Release Pipeline
• CI/CD: Represent the integration between GitHub Actions (as shown in .github/workflows) and the Jenkins-based processes (Jenkinsfile.github).
• Build Scripts: Highlight key scripts under “build/”, “assets.sh”, “common.sh”, “get_base.sh”, “release.sh” and “upgrade.sh” that control different phases (preparing images, packaging, release process).
• Hack Scripts: Include the “hack/” directory, which houses helper scripts for container image verifications, signing, scanning (Snyk, Trivy), and swagger documentation generation.
• Packaging Components:
• RPM Packaging: Show the “rpm/” folder with its subdivisions for various supported environments (e.g., cray/csm with multiple SLE versions), cloud-init configuration.
• Helm & Manifests: Capture the “helm/” and “manifests/” directories that contain Kubernetes chart definitions and deployment files for core services like Nexus, Keycloak, etc.
• Docker & Container Images: Identify the “docker/” folder and “build/images/” scripts that help manage container images required for different parts of the release.
• Security & Integrity Checks:
• Security Directory: Emphasize “security/” which includes Snyk scan results, Dockerfiles, signing keys (under “security/sign/keys”), and signing scripts that ensure released artifacts are verified.
• Additional testing scripts found in “lib/” that set up tests (such as goss tests) and other readiness checks.
• Artifact Distribution:
• The final stage of the build—the result is a release distribution that is automatically uploaded to the designated Artifactory repository ("csm-releases").
• Flow from the build artifacts (RPMs, container images, Helm charts) to the external Artifactory system.
Relationships & Interactions
• How the CI/CD components (GitHub workflows, Jenkins) trigger execution of the Makefile and associated shell scripts.
• That “hack/” and “lib/” provide utility and verification functions throughout the pipeline.
Architectural Patterns & Design Principles
• Modularity: The project separates build, security, and package creation into distinct directories (“build”, “hack”, “rpm”, “helm”), which suggests a modular and maintainable approach.
• Pipeline Automation: Emphasizing CI/CD integration via GitHub workflows and Jenkins ensures automated, repeatable release processes.
• Security by Design: The inclusion of Snyk scans, container image verification scripts, and secure signing of artifacts emphasizes a security-first process.
Relevant Technologies and Tools
• GitHub Actions / Jenkins (CI/CD orchestration)
• Make and Shell Scripts (build and automation)
• Docker and Helm (for container images and Kubernetes packaging)
• Artifactory (artifact repository)
• Security scanning tools (Snyk, Trivy)
• RPM packaging tools for various SLE distributions
Specific Elements
• Labels: Clearly label nodes such as “GitHub Repository,” “Jenkins / GitHub Actions CI/CD,” “Build Scripts (Makefile, assets.sh, etc.),” “Docker Image Build,” “Helm Chart Packaging,” “RPM Packaging,” “Security & Signing,” and “Artifact Upload (Artifactory).”
• Automation & orchestration elements (e.g., CI/CD components) versus script/tool components (e.g., build scripts, test scripts).
• Packaging outputs (e.g., container images, RPM packages, Helm charts).
• Security verification steps (e.g., Snyk scans, signing processes).