-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathJenkinsfile
More file actions
34 lines (34 loc) · 1007 Bytes
/
Jenkinsfile
File metadata and controls
34 lines (34 loc) · 1007 Bytes
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
pipeline {
agent { label 'python' }
stages {
stage('Build') {
steps {
nodejs(nodeJSInstallationName: 'node18') {
sh 'corepack enable'
sh 'yarn install'
sh 'xvfb-run --auto-servernum yarn test'
}
}
}
stage('Sonar') {
environment {
scannerHome = tool 'SonarQube Scanner default'
}
steps {
withSonarQubeEnv('SonarQube Community') {
sh "${scannerHome}/bin/sonar-scanner -Dsonar.projectKey=leosac_card-printing-worker_c67bb037-6e0b-4e77-87d2-650ff82f32f1"
}
timeout(time: 1, unit: 'HOURS') {
waitForQualityGate(abortPipeline: true)
}
}
when {
anyOf {
branch 'main'
buildingTag()
changeRequest()
}
}
}
}
}