This repository has been archived by the owner on Jan 24, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathJenkinsfile
56 lines (50 loc) · 1.55 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
#!groovy
pipeline {
agent {
label 'win-test'
}
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 {
sh "bower --version || npm i -g bower"
sh "polymer --version || npm i -g polymer-cli"
sh "npm install -g https://github.com/marcelmeulemans/wct-junit-reporter.git"
sh "bower i"
}
}
}
// Lints, and tests the component
stage('test') {
steps {
script {
sh "polymer lint"
sh "polymer test --local chrome"
junit allowEmptyResults: true, testResults: 'wct.xml'
}
}
}
stage('documentation') {
steps {
script {
if (env.BRANCH_NAME == 'master') {
build job: 'Kano/components-doc/master', parameters: [
text(name: 'repoUrl', value: 'https://github.com/KanoComponents/kwc-button'),
text(name: 'componentName', value: 'kwc-button')
], wait: false
}
}
}
}
}
options {
buildDiscarder(logRotator(numToKeepStr: '20'))
}
}