-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathJenkinsfile
More file actions
43 lines (43 loc) · 1.27 KB
/
Jenkinsfile
File metadata and controls
43 lines (43 loc) · 1.27 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
pipeline{
agent any
environment{
SONAR_HOME= tool "Sonar"
}
stages{
stage("Clone Code from GitHub"){
steps{
git url: "https://github.com/krishnaacharyaa/wanderlust.git", branch: "devops"
}
}
stage("SonarQube Quality Analysis"){
steps{
withSonarQubeEnv("Sonar"){
sh "$SONAR_HOME/bin/sonar-scanner -Dsonar.projectName=wanderlust -Dsonar.projectKey=wanderlust"
}
}
}
stage("OWASP Dependency Check"){
steps{
dependencyCheck additionalArguments: '--scan ./', odcInstallation: 'dc'
dependencyCheckPublisher pattern: '**/dependency-check-report.xml'
}
}
stage("Sonar Quality Gate Scan"){
steps{
timeout(time: 2, unit: "MINUTES"){
waitForQualityGate abortPipeline: false
}
}
}
stage("Trivy File System Scan"){
steps{
sh "trivy fs --format table -o trivy-fs-report.html ."
}
}
stage("Deploy using Docker compose"){
steps{
sh "docker-compose up -d"
}
}
}
}