-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathJenkinsfile
36 lines (36 loc) · 1.08 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
pipeline {
agent {
docker {
image 'node:11-alpine'
}
}
environment {
HOME = '.'
}
parameters {
string(name: 'project', description:'name of the project to test')
string(name: 'host', description:'host where the project is deployed')
string(name: 'port', description:'port where the project is deployed', defaultValue: '443')
string(name: 'protocol', description:'protocol to use', defaultValue: 'https')
}
stages {
stage('Prepare run') {
steps {
sh 'npm install'
//sh "npm run gulp replaceProperties -- -proto ${params.protocol} -host ${params.host} -port ${params.port} -project ${params.project}"
sh "npm run gulp replaceProperties"
}
}
stage('Run tests') {
steps {
sh "npm run gulp default -- -project ${params.project}"
}
}
}
post {
always {
junit "projects/${params.project}/target/*.xml"
cleanWs()
}
}
}