-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathJenkinsfile
50 lines (48 loc) · 1.28 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
#!/usr/bin/env groovy
@Library('kanolib') _
pipeline {
agent {
docker {
label 'ubuntu_18.04_with_docker'
image 'node:8'
}
}
stages {
stage('checkout') {
steps {
sh "mkdir -p ~/.ssh"
sh "ssh-keyscan -t rsa github.com > ~/.ssh/known_hosts"
checkout scm
}
}
stage('install dependencies') {
steps {
script {
withCredentials([string(credentialsId: 'npm-read-only', variable: 'NPM_TOKEN')]) {
sh "echo \"//registry.npmjs.org/:_authToken=${NPM_TOKEN}\" > .npmrc"
sshagent(['read-only-github']) {
sh "yarn"
sh "yarn tsc -b"
}
}
}
}
}
stage('test') {
steps {
script {
sh "yarn lint"
sh "yarn test-ci"
}
}
}
}
post {
always {
junit allowEmptyResults: true, testResults: 'packages/**/test-results.xml'
}
regression {
notify_culprits currentBuild.result
}
}
}