Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
76e7c25
Apply .gitignore rules
Jan 25, 2025
5a4547d
add terraform infra files
meleksabit Feb 3, 2025
7516be2
add terraform infra
meleksabit Feb 6, 2025
9db666c
edit terraform infra
meleksabit Feb 6, 2025
59aa108
edit terraform infra
meleksabit Feb 7, 2025
c6f4cc9
edit backend for terraform cloud
meleksabit Feb 10, 2025
e4f354a
edit backend for terraform cloud
meleksabit Feb 10, 2025
fa9c249
edit terraform infra
meleksabit Feb 11, 2025
425310b
edit terraform infra
meleksabit Feb 11, 2025
3c5b9ca
edit terraform infra
meleksabit Feb 12, 2025
906551c
edit terraform infra
meleksabit Feb 12, 2025
2d2b1fd
edit terraform infra
meleksabit Feb 12, 2025
03cc4eb
edit terraform infra
meleksabit Feb 12, 2025
3baa4bd
edit terraform infra
meleksabit Feb 20, 2025
e7dfed7
add service account to terraform cloud
meleksabit Feb 24, 2025
236cefb
debug permission issue for aws provider
meleksabit Feb 24, 2025
b6fbfbe
edit terraform config
meleksabit Feb 25, 2025
63740c3
add ai-agent
meleksabit Mar 17, 2025
fffcfc2
edit Chart.yaml file
meleksabit Mar 18, 2025
1a7684f
add Go-Services
meleksabit May 14, 2025
306d023
add pr-title-linter workflow/action
meleksabit May 14, 2025
377d015
add README file
meleksabit May 16, 2025
f67215c
edit README
meleksabit May 16, 2025
13e1728
edit README
meleksabit May 16, 2025
80fd20e
edit README
meleksabit May 16, 2025
a8a8107
edit README
meleksabit May 16, 2025
6721b51
edit README
meleksabit May 16, 2025
cddd6b8
edit README
meleksabit May 16, 2025
ef3684e
edit README
meleksabit May 16, 2025
4508b1b
edit README
meleksabit May 16, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions .github/workflows/pr-title-linter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: PR Title Check

on:
pull_request:
types: [opened, edited]

jobs:
lint-pr-title:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Check PR Title
uses: actions/[email protected]
with:
script: |
const title = context.payload.pull_request.title;
const regex = /^(feat|fix|chore|docs|style|refactor|perf|test|ci|build|deps|hotfix|env|security)(\([\w\-]+\))?: .+/;
if (!regex.test(title)) {
core.setFailed(`❌ Invalid PR title: "${title}".\n✅ Expected format: type(scope): description\nExamples:\n - feat(docker): preload Hugging Face models\n - fix(api): handle missing auth headers`);
} else {
console.log(`✅ PR title "${title}" is valid.`);
}
141 changes: 141 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,141 @@
# General
*.log
*.tmp
*.bak
*.swp
*.DS_Store
Thumbs.db

# Python
__pycache__/
*.py[cod]
*.pyo
*.pyd
.Python
env/
venv/
ENV/
*.env
*.venv
*.egg-info/
.eggs/
dist/
build/
pip-log.txt
pip-delete-this-directory.txt

# Hugging Face / TensorFlow / PyTorch (AI models and cache)
*.ckpt
*.pt
*.pth
*.h5
*.onnx
output/
logs/
lightning_logs/
cache/
model_cache/
.tokenizers_cache/
.transformers_cache/
__pycache__/

# Go
*.exe
*.out
*.test
vendor/
*.mod
*.sum

# Terraform
secrets.tf
secrets.tfvars
.terraform/
*.tfstate
*.tfstate.*
crash.log
override.tf
override.tf.json
*.tfvars
*.tfvars.json
.terraform.lock.hcl

# Docker
*.env
.env.local
.dockerignore
docker-compose.override.yml
tag.txt
# Ignore local Docker configuration files
.docker/

# Kubernetes
*.yml~
.kube/
*.crt
*.key

# AWS
.aws/
.terraform/
*.pem
*.key
*.config

# Helm / Kustomize
.kube/
*.release.yaml

# Secrets
secrets/
*.secret
*.key
*.cert
*.pfx
*.pem
*.json

# Node.js (if used for any UI dashboard)
node_modules/
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# JetBrains IDEs
.idea/
*.iml
*.iws
out/

# VS Code
.vscode/
.history/

# Operating System Files
.DS_Store
Thumbs.db

# Miscellaneous
*.sqlite3
*.db
*.sql
*.tar
*.zip
*.gz
*.7z
*.rar
*.bak

# Logs
logs/
*.log
*.log.*
nohup.out

# Artifacts
*.artifact.zip
*.whl

# Trivy Cache
.trivy-cache/
.trivyignore
74 changes: 74 additions & 0 deletions .terraformignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
# Terraform state and backup files
*.tfstate
*.tfstate.backup
*.tfplan

# Terraform internal directories
.terraform/

# Logs and debug artifacts
*.log
crash.log
*.out
*.err

# AWS credentials and sensitive files
.aws/
*.pem
*.key
*.crt
*.env
.env.*
credentials.json
secrets/
**/credentials.tfvars

# Python artifacts
__pycache__/
*.pyc
*.pyo
*.pyd
*.egg-info/
*.dist-info/
*.ipynb_checkpoints/
*.sqlite3
*.db
.venv/
venv/
env/

# Docker build cache and local overrides
Dockerfile.*
docker-compose.override.yml
*.tar
*.img

# Node-related (if present)
node_modules/
npm-debug.log
yarn-error.log

# Editor/OS/CI-related
.idea/
.vscode/
*.swp
*.swo
*.bak
*.tmp
.DS_Store
Thumbs.db

# Git
.git/
.gitignore
.gitattributes

# Tests & coverage (optional)
coverage/
tests/__pycache__/
test-results/

# Model cache (if using Hugging Face Transformers)
model_cache/
transformers_cache/
huggingface/
62 changes: 62 additions & 0 deletions Jenkinsfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
pipeline {
agent any
environment {
ECR_REGISTRY = credentials('ecr-registry-uri')
AWS_REGION = 'eu-central-1'
DOCKER_TAG = 'latest'
}
stages {
stage('Build and Push ai-agent') {
agent { docker { image 'docker:24-dind'; args '--privileged'; reuseNode true } }
when { changeset "ai-agent/**" }
steps {
withAWS(credentials: 'aws-credentials', region: "${AWS_REGION}") {
sh 'aws ecr get-login-password --region ${AWS_REGION} | docker login --username AWS --password-stdin ${ECR_REGISTRY}'
sh 'docker build -t ${ECR_REGISTRY}/ai-agent:${DOCKER_TAG} ./ai-agent'
sh 'docker push ${ECR_REGISTRY}/ai-agent:${DOCKER_TAG}'
}
}
}
stage('Build and Push Go Microservices') {
agent { docker { image 'docker:24-dind'; args '--privileged'; reuseNode true } }
when { anyOf { changeset "go-services/blockchain-monitor/**"; changeset "go-services/anomaly-detector/**" } }
steps {
withAWS(credentials: 'aws-credentials', region: "${AWS_REGION}") {
sh 'aws ecr get-login-password --region ${AWS_REGION} | docker login --username AWS --password-stdin ${ECR_REGISTRY}'
script {
def services = ['blockchain-monitor', 'anomaly-detector']
services.each { svc ->
sh "docker build -t ${ECR_REGISTRY}/${svc}:${DOCKER_TAG} ./go-services/${svc}"
sh "docker push ${ECR_REGISTRY}/${svc}:${DOCKER_TAG}"
}
}
}
}
}
stage('Build and Push Dashboard') {
agent { docker { image 'docker:24-dind'; args '--privileged'; reuseNode true } }
when { changeset "dashboard/**" }
steps {
withAWS(credentials: 'aws-credentials', region: "${AWS_REGION}") {
sh 'aws ecr get-login-password --region ${AWS_REGION} | docker login --username AWS --password-stdin ${ECR_REGISTRY}'
sh 'docker build -t ${ECR_REGISTRY}/dashboard:${DOCKER_TAG} ./dashboard' // Adjust if merged with anomaly-detector
sh 'docker push ${ECR_REGISTRY}/dashboard:${DOCKER_TAG}'
}
}
}
stage('Deploy to EKS') {
steps {
withAWS(credentials: 'aws-credentials', region: "${AWS_REGION}") {
sh 'helm upgrade --install ai-agent ./helm/ai-agent --namespace default --set image.repository=${ECR_REGISTRY}/ai-agent'
sh 'helm upgrade --install blockchain-monitor ./helm/go-microservices/blockchain-monitor --namespace default --set image.repository=${ECR_REGISTRY}/blockchain-monitor'
sh 'helm upgrade --install anomaly-detector ./helm/go-microservices/anomaly-detector --namespace default --set image.repository=${ECR_REGISTRY}/anomaly-detector'
sh 'helm upgrade --install dashboard ./helm/dashboard --namespace default --set image.repository=${ECR_REGISTRY}/dashboard'
}
}
}
}
post {
always { sh 'echo "Pipeline complete!"' }
failure { echo 'Build failed!' }
}
}
Loading