-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathJenkinsfile
55 lines (51 loc) · 941 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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
pipeline {
agent {
dockerfile {
filename 'Dockerfile.CI'
args '--network=infrastructure_internal --link infrastructure_sonarqube_1:sonarqube \
-v /var/jenkins_home:/var/jenkins_home:rw,z'
}
}
options { timestamps() }
stages {
stage("Install dependencies") {
steps {
sh 'yarn install --frozen-lockfile --non-interactive --offline'
}
}
stage("Build") {
environment {
YODA_DATA = credentials('YODA_DATA')
ci = 1
}
steps {
sh 'yarn build'
sh 'yarn build:docs'
}
}
stage("Test") {
environment {
ci = 1
}
steps {
sh 'yarn test:full'
sh 'mdbook test docs'
}
}
stage("Collect metrics") {
steps {
script {
def scannerHome = tool 'SonarQube Scanner';
withSonarQubeEnv('sonar') {
sh "${scannerHome}/bin/sonar-scanner"
}
}
}
}
}
post {
always {
archiveArtifacts artifacts: 'build/*', fingerprint: true
}
}
}