This repository has been archived by the owner on Jan 23, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Jenkinsfile
62 lines (60 loc) 路 1.72 KB
/
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
56
57
58
59
60
61
62
#!groovy
@Library('kanolib') _
pipeline {
agent {
label 'ubuntu_18.04_with_docker'
}
post {
always {
junit allowEmptyResults: true, testResults: 'test-results.xml'
step([$class: 'CheckStylePublisher', pattern: 'eslint.xml'])
}
regression {
notify_culprits currentBuild.result
}
}
stages {
// pulls down locally the sources for the component
stage('checkout') {
steps {
checkout scm
}
}
// Install the bower dependencies of the component
stage('install dependencies') {
steps {
script {
docker.image('node:8-alpine').inside('--user root') {
sh "apk update && apk upgrade && apk add --no-cache bash git openssh"
sh "mkdir -p ~/.ssh && ssh-keyscan github.com >> ~/.ssh/known_hosts"
sshagent(['read-only-github']) {
sh "yarn"
}
}
}
}
}
// Lints, the component
stage('checkstyle') {
steps {
script {
docker.image('node:8-alpine').inside {
sh "yarn checkstyle-ci"
}
}
}
}
stage('test') {
steps {
script {
docker.image('kanocomputing/puppeteer').inside('--cap-add=SYS_ADMIN') {
sh "yarn test-ci"
}
}
}
}
}
options {
buildDiscarder(logRotator(numToKeepStr: '20'))
}
}