From 45933f4b6e15a0a4cfab0649fe24445c366a6eff Mon Sep 17 00:00:00 2001 From: dina0062 Date: Wed, 28 Jan 2026 11:42:14 +0300 Subject: [PATCH 1/3] Delete Jenkinsfile_CI --- Jenkinsfile_CI | 62 -------------------------------------------------- 1 file changed, 62 deletions(-) delete mode 100644 Jenkinsfile_CI diff --git a/Jenkinsfile_CI b/Jenkinsfile_CI deleted file mode 100644 index c4459b9..0000000 --- a/Jenkinsfile_CI +++ /dev/null @@ -1,62 +0,0 @@ -pipeline { - agent any - - tools { - nodejs 'nodejs23' - } - - environment { - SCANNER_HOME = tool 'sonar-scanner' - } - stages { - stage('Git Checkout') { - steps { - git branch: 'dev', url: 'https://github.com/jaiswaladi246/3-Tier-DevSecOps-Mega-Project.git' - } - } - - stage('Frontend Compilation') { - steps { - dir('client') { - sh 'find . -name "*.js" -exec node --check {} +' - } - } - } - - stage('Backend Compilation') { - steps { - dir('api') { - sh 'find . -name "*.js" -exec node --check {} +' - } - } - } - - stage('GitLeaks Scan') { - steps { - sh 'gitleaks detect --source ./client --exit-code 1' - sh 'gitleaks detect --source ./api --exit-code 1' - } - } - - stage('SonarQube Analysis') { - steps { - withSonarQubeEnv('sonar') { - sh ''' $SCANNER_HOME/bin/sonar-scanner -Dsonar.projectName=NodeJS-Project \ - -Dsonar.projectKey=NodeJS-Project ''' - } - } - } - stage('Quality Gate Check') { - steps { - timeout(time: 1, unit: 'HOURS') { - waitForQualityGate abortPipeline: false, credentialsId: 'sonar-token' - } - } - } - stage('Trivy FS Scan') { - steps { - sh 'trivy fs --format table -o fs-report.html .' - } - } - } -} From 3bfc397a2eab847f39b2ea9bc867d91d2b116418 Mon Sep 17 00:00:00 2001 From: dina0062 Date: Sun, 1 Feb 2026 10:20:34 +0300 Subject: [PATCH 2/3] Update .env --- api/.env | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/api/.env b/api/.env index 198ff73..bb60ab6 100644 --- a/api/.env +++ b/api/.env @@ -1,6 +1,6 @@ -DB_HOST=localhost -DB_USER=root -DB_PASSWORD=Aditya -DB_NAME=crud_app -JWT_SECRET=devopsShackSuperSecretKey +#DB_HOST=localhost +#DB_USER=root +#DB_PASSWORD=Aditya +#DB_NAME=crud_app +#JWT_SECRET=devopsShackSuperSecretKey From 6489e6971a9eaafeb81f294ad6b6cf45c83db30c Mon Sep 17 00:00:00 2001 From: dina0062 Date: Thu, 12 Feb 2026 11:33:42 +0300 Subject: [PATCH 3/3] Create jenkins-ci.yaml --- jenkins-ci.yaml | 56 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 jenkins-ci.yaml diff --git a/jenkins-ci.yaml b/jenkins-ci.yaml new file mode 100644 index 0000000..f51a6ea --- /dev/null +++ b/jenkins-ci.yaml @@ -0,0 +1,56 @@ +pipeline { + agent any + tools { + nodejs 'nodejs25' + } + + environment { + SCANNER_HOME = tool 'sonar-scanner' + } + stages { + stage('Git checkout') { + steps { + git branch: 'local-dev', url: 'https://github.com/dina0062/3-Tier-DevSecOps-Mega-Project.git' + } + } + stage('Frontend compilation') { + steps { + dir('client') { + sh 'find . -name "*.js" -exec node --check {} +' + } + } + } + + stage('backend compilation') { + steps { + dir('api') { + sh 'find . -name "*.js" -exec node --check {} +' + } + } + } + + + stage('Sonar qube') { + steps { + withSonarQubeEnv('sonar') { + sh ''' $SCANNER_HOME/bin/sonar-scanner -Dsonar.projectName=NodeJS-PROJECT \ + -Dsonar.projectKey=NodeJS-project ''' + } + } + } + + stage('Quality Gate Check') { + steps { + timeout(1) { + waitForQualityGate abortPipeline: false, credentialsId: 'sonar-token' + } + } + } + + stage('trivy') { + steps { + sh 'trivy fs --format table -o fs-report.html .' + } + } + } +}