Skip to content

merge #1498

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 43 commits into
base: main
Choose a base branch
from
Open

merge #1498

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
f2eb126
Add Jenkinsfile
greenboy106 May 27, 2025
026c37a
Fix: correct GitHub URL in Jenkinsfile
greenboy106 May 27, 2025
4259941
Create Jenkinsfile
greenboy106 May 27, 2025
c144963
Update Jenkinsfile
greenboy106 May 27, 2025
362f7dd
Update Jenkinsfile
greenboy106 May 27, 2025
f828889
Update Jenkinsfile
greenboy106 May 27, 2025
ac4bd4d
Create sonar-project.properties
greenboy106 May 28, 2025
9b18e48
Update Jenkinsfile
greenboy106 May 28, 2025
058143a
Update Jenkinsfile
greenboy106 May 28, 2025
bc29ab9
Update Jenkinsfile
greenboy106 May 28, 2025
b1ea476
Update Jenkinsfile
greenboy106 May 28, 2025
d8f2c40
Update Jenkinsfile
greenboy106 May 28, 2025
2f2f5ab
Update Jenkinsfile
greenboy106 May 28, 2025
7807a6a
Update Jenkinsfile
greenboy106 May 28, 2025
87f7b87
Update Jenkinsfile
greenboy106 May 28, 2025
b2c3e4c
Update Jenkinsfile
greenboy106 May 28, 2025
8376fa2
Update Jenkinsfile
greenboy106 May 28, 2025
f8b7f41
Update Jenkinsfile
greenboy106 May 28, 2025
3e3c2f7
Update Jenkinsfile
greenboy106 May 28, 2025
787eb09
Update Jenkinsfile
greenboy106 May 28, 2025
e5ae0e9
Update Jenkinsfile
greenboy106 May 28, 2025
33d197a
Update Jenkinsfile
greenboy106 May 28, 2025
5a8474a
Update Jenkinsfile
greenboy106 May 28, 2025
ecd41d2
Update Jenkinsfile
greenboy106 May 28, 2025
33e571b
Update Jenkinsfile
greenboy106 May 28, 2025
b6d6458
Update Jenkinsfile
greenboy106 May 28, 2025
e22e286
Update Jenkinsfile
greenboy106 May 28, 2025
53d530f
Update Jenkinsfile
greenboy106 May 28, 2025
9ab6356
Update Jenkinsfile
greenboy106 May 28, 2025
3dac680
Update Jenkinsfile
greenboy106 May 28, 2025
8ca09d8
Update Jenkinsfile
greenboy106 May 28, 2025
d8960f0
Update Jenkinsfile
greenboy106 May 28, 2025
4bb608b
Update Jenkinsfile
greenboy106 May 28, 2025
f45b004
Update Jenkinsfile
greenboy106 May 28, 2025
1a8bf21
Update Jenkinsfile
greenboy106 May 28, 2025
0cde730
Update Jenkinsfile
greenboy106 May 28, 2025
f69499e
Update Jenkinsfile
greenboy106 May 28, 2025
45d5dce
Update Jenkinsfile
greenboy106 May 28, 2025
87bd8a6
Update Jenkinsfile
greenboy106 May 29, 2025
469b44f
Update Jenkinsfile
greenboy106 May 29, 2025
eea87b9
Update Jenkinsfile
greenboy106 May 29, 2025
9c10749
Update Jenkinsfile
greenboy106 May 29, 2025
6da351f
Update Jenkinsfile
greenboy106 May 29, 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
62 changes: 62 additions & 0 deletions Jenkinsfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
pipeline {
agent any

stages {
stage('Checkout') {
steps {
git branch: 'main', url: 'https://github.com/greenboy106/8.2CDevSecOps.git'
}
}

stage('Install Dependencies') {
steps {
sh 'npm install'
}
}

stage('Run Tests') {
steps {
sh 'npm test || true'
}
}

stage('Generate Coverage Report') {
steps {
sh 'npm run coverage || true'
}
}

stage('NPM Audit (Security Scan)') {
steps {
sh 'npm audit || true'
}
}
}

post {
always {
script {
try {
emailext(
subject: "Jenkins Build - ${env.JOB_NAME} #${env.BUILD_NUMBER}",
body: """
Hello,

Jenkins has completed a build for the project: ${env.JOB_NAME}
Result: ${currentBuild.currentResult}

You can view the full console output here:
${env.BUILD_URL}console

Regards,
Jenkins Server
""",
to: "[email protected]"
)
} catch (e) {
echo "Failed to send email: ${e.message}"
}
}
}
}
}
11 changes: 11 additions & 0 deletions sonar-project.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
sonar.projectKey=ee115110b80c114a6ebc7d66b5df433b24b0e57c
sonar.organization=greenboy106
sonar.host.url=https://sonarcloud.io
sonar.login=${SONAR_TOKEN}

sonar.sources=.
sonar.exclusions=node_modules/**,test/**
sonar.javascript.lcov.reportPaths=coverage/lcov.info

sonar.projectName=NodeJS Goof Vulnerable App
sonar.sourceEncoding=UTF-8