-
Notifications
You must be signed in to change notification settings - Fork 3
/
Jenkinsfile
30 lines (23 loc) · 978 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
node('docker') {
stage('Checkout') {
if(env.GERRIT_REFSPEC && env.GERRIT_PATCHSET_REVISION) {
println "Building from Gerrit with Refspec: $GERRIT_REFSPEC and branch $GERRIT_PATCHSET_REVISION"
checkout([$class: 'GitSCM', branches: [[name: "$GERRIT_PATCHSET_REVISION"]], doGenerateSubmoduleConfigurations: false, extensions: [], submoduleCfg: [], userRemoteConfigs: [[credentialsId: 'gerrit_id_rsa', name: "", refspec: "$GERRIT_REFSPEC", url: 'ssh://rjs@gerrit.eclipsesource.com:29418/generator-tabris-js']]])
} else {
git url: 'git@github.com:eclipsesource/generator-tabris-js.git', credentialsId: 'tabris-js_id_rsa'
}
}
/* Requires the Docker Pipeline plugin to be installed */
docker.image('node:12-alpine').inside {
def scmInfo
stage('Checkout') {
scmInfo = checkout scm
}
stage('Build') {
ansiColor('xterm') {
sh 'npm ci'
sh 'npm test'
}
}
}
}