# harishkalimichetti/cicd architecture

> Architecture diagram of the GitHub repository harishkalimichetti/cicd, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-07-20). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/harishkalimichetti/cicd
- Repository: https://github.com/harishkalimichetti/cicd

## Overview

#### Purpose and Entry Point
This is a minimal Go CI/CD demonstration repository. The executable entry point is `main.go`; its behavior is validated by `main_test.go`. The README provides no domain-specific application design beyond identifying the project as a CI/CD sample.

#### Application Runtime
The application is built and run with the Go toolchain, with module metadata in `go.mod`. `main.go` is the primary runtime boundary and likely contains the complete application behavior due to the repository’s small size.

Paths:
- `main.go`
- `go.mod`
- `main_test.go`

#### Test and Validation Stage
Go tests are executed against the application package. Shell scripts provide an automation boundary for local or CI invocation of test and security-related commands.

Paths:
- `main_test.go`
- `test.sh`
- `security_scan.sh`

#### CI Pipeline Implementations
The repository supports two CI orchestration systems rather than embedding CI logic in Go code:
- GitHub Actions workflow under `.github/workflows/ci.yml`
- Jenkins pipeline definitions, with `Jenkinsfile` as the apparent current pipeline and older variants retained for reference.

Paths:
- `.github/workflows/ci.yml`
- `Jenkinsfile`
- `Jenkinsfile_old`

#### Delivery Flow
The likely control flow is source checkout → Go build/test → security scan, driven by either GitHub Actions or Jenkins. The CI layer invokes repository scripts and Go commands; the application itself does not appear to manage deployment infrastructure or external services.

Paths:
- `test.sh`
- `security_scan.sh`
- `.github/workflows/ci.yml`

#### Operational Boundaries
Shell scripts isolate operational commands from CI-provider-specific pipeline syntax. This permits GitHub Actions and Jenkins to share validation steps while keeping the Go application independent of CI infrastructure.

Paths:
- `hello.sh`
- `test.sh`
- `security_scan.sh`
- `Jenkinsfile`

Main entry points: [`test.sh`](https://github.com/harishkalimichetti/cicd/blob/main/test.sh) (Test automation), [`Jenkinsfile`](https://github.com/harishkalimichetti/cicd/blob/main/Jenkinsfile) (Jenkins pipeline), [`security_scan.sh`](https://github.com/harishkalimichetti/cicd/blob/main/security_scan.sh) (Security scan), [`.github/workflows/ci.yml`](https://github.com/harishkalimichetti/cicd/blob/main/.github/workflows/ci.yml) (GitHub Actions CI)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_application["Go Application"]
  node_go_module["Go module<br/>module metadata<br/>[go.mod]"]
  node_main["Application entry point<br/>Go executable<br/>[main.go]"]
  node_go_toolchain{{"Go toolchain<br/>build runtime"}}
end

subgraph group_validation["Shared Validation"]
  node_main_test["Application tests<br/>Go tests<br/>[main_test.go]"]
  node_test_script["Test automation<br/>shell script<br/>[test.sh]"]
  node_security_script["Security scan<br/>shell script<br/>[security_scan.sh]"]
  node_hello_script["Hello script<br/>shell script<br/>[hello.sh]"]
end

subgraph group_ci["CI Orchestration"]
  node_github_actions["GitHub Actions CI<br/>workflow<br/>[ci.yml]"]
  node_jenkins["Jenkins pipeline"]
  node_jenkins_old["Legacy Jenkins pipeline<br/>pipeline reference"]
end

node_go_module -->|"defines module"| node_go_toolchain
node_go_toolchain -->|"builds and runs"| node_main
node_main_test -->|"validates"| node_main
node_test_script -->|"invokes tests"| node_go_toolchain
node_test_script -->|"runs"| node_main_test
node_security_script -->|"invokes security commands"| node_go_toolchain
node_github_actions -->|"runs"| node_test_script
node_github_actions -->|"runs"| node_security_script
node_jenkins -->|"runs"| node_test_script
node_jenkins -->|"runs"| node_security_script
node_jenkins_old -.->|"predecessor"| node_jenkins

click node_go_module "https://github.com/harishkalimichetti/cicd/blob/main/go.mod"
click node_main "https://github.com/harishkalimichetti/cicd/blob/main/main.go"
click node_main_test "https://github.com/harishkalimichetti/cicd/blob/main/main_test.go"
click node_test_script "https://github.com/harishkalimichetti/cicd/blob/main/test.sh"
click node_security_script "https://github.com/harishkalimichetti/cicd/blob/main/security_scan.sh"
click node_hello_script "https://github.com/harishkalimichetti/cicd/blob/main/hello.sh"
click node_github_actions "https://github.com/harishkalimichetti/cicd/blob/main/.github/workflows/ci.yml"
click node_jenkins "https://github.com/harishkalimichetti/cicd/blob/main/Jenkinsfile"
click node_jenkins_old "https://github.com/harishkalimichetti/cicd/blob/main/Jenkinsfile_old"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_go_module,node_main,node_go_toolchain toneBlue
class node_main_test,node_test_script,node_security_script,node_hello_script toneAmber
class node_github_actions,node_jenkins,node_jenkins_old toneMint
```

## Components

### Go Application

- [Go module](https://github.com/harishkalimichetti/cicd/blob/main/go.mod): module metadata · `go.mod`
- [Application entry point](https://github.com/harishkalimichetti/cicd/blob/main/main.go): Go executable · Contains the repository's primary runtime behavior. · `main.go`
- **Go toolchain**: build runtime

### Shared Validation

- [Application tests](https://github.com/harishkalimichetti/cicd/blob/main/main_test.go): Go tests · `main_test.go`
- [Test automation](https://github.com/harishkalimichetti/cicd/blob/main/test.sh): shell script · Wraps test commands for local and CI use. · `test.sh`
- [Security scan](https://github.com/harishkalimichetti/cicd/blob/main/security_scan.sh): shell script · Isolates security-related validation commands. · `security_scan.sh`
- [Hello script](https://github.com/harishkalimichetti/cicd/blob/main/hello.sh): shell script · `hello.sh`

### CI Orchestration

- [GitHub Actions CI](https://github.com/harishkalimichetti/cicd/blob/main/.github/workflows/ci.yml): workflow · `.github/workflows/ci.yml`
- [Jenkins pipeline](https://github.com/harishkalimichetti/cicd/blob/main/Jenkinsfile): pipeline · Current Jenkins CI implementation. · `Jenkinsfile`
- [Legacy Jenkins pipeline](https://github.com/harishkalimichetti/cicd/blob/main/Jenkinsfile_old): pipeline reference · Older Jenkins pipeline retained for reference. · `Jenkinsfile_old`

## Connections

- Go module → Go toolchain: defines module
- Go toolchain → Application entry point: builds and runs
- Application tests → Application entry point: validates
- Test automation → Go toolchain: invokes tests
- Test automation → Application tests: runs
- Security scan → Go toolchain: invokes security commands
- GitHub Actions CI → Test automation: runs
- GitHub Actions CI → Security scan: runs
- Jenkins pipeline → Test automation: runs
- Jenkins pipeline → Security scan: runs
- Legacy Jenkins pipeline → Jenkins pipeline: predecessor
