forked from QA-Instructor/lbg-vat-calculator
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathJenkinsfile
35 lines (33 loc) · 844 Bytes
/
Jenkinsfile
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
pipeline {
agent any
stages {
stage('Checkout') {
steps {
git branch: 'main', url: 'https://github.com/Lonyin-Chan/lbg-vat-calculator.git'
}
}
stage('install') {
steps {
sh "npm install"
}
}
stage('Test') {
steps {
sh "npm test"
}
}
stage('SonarQube Analysis') {
environment {
scannerHome = tool 'sonarqube'
}
steps {
withSonarQubeEnv('sonar-qube-1') {
sh "${scannerHome}/bin/sonar-scanner"
}
timeout(time: 10, unit: 'MINUTES') {
waitForQualityGate abortPipeline: true
}
}
}
}
}