This repository was archived by the owner on Mar 1, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathJenkinsfile
More file actions
59 lines (48 loc) · 1.4 KB
/
Copy pathJenkinsfile
File metadata and controls
59 lines (48 loc) · 1.4 KB
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
properties properties: [
[$class: 'BuildDiscarderProperty', strategy: [$class: 'LogRotator', artifactDaysToKeepStr: '', artifactNumToKeepStr: '', daysToKeepStr: '30', numToKeepStr: '10']],
disableConcurrentBuilds()
]
@Library('holisticon-build-library')
def nodeJS = new de.holisticon.ci.jenkins.NodeJS()
node {
def buildNumber = env.BUILD_NUMBER
def branchName = env.BRANCH_NAME
def workspace = env.WORKSPACE
def buildUrl = env.BUILD_URL
// PRINT ENVIRONMENT TO JOB
echo "workspace directory is $workspace"
echo "build URL is $buildUrl"
echo "build Number is $buildNumber"
echo "branch name is $branchName"
echo "PATH is $env.PATH"
try {
stage('Clean workspace') {
deleteDir()
}
stage('Checkout') {
checkout scm
}
stage('Build') {
nodeJS.nvmRun('clean')
nodeJS.nvmRun('build')
}
stage('Test') {
//sh "npm run test"
//junit 'target/test-reports/TEST*.xml'
nodeJS.nvmRun('e2e')
junit 'target/e2e-reports/TEST*.xml'
}
stage('Security Check') {
//sh "npm run test"
//junit 'target/test-reports/TEST*.xml'
nodeJS.nvm('audit')
junit 'target/e2e-reports/TEST*.xml'
}
stage('Publish NPM snapshot') {
nodeJS.publishSnapshot('.', "${buildNumber}", "${branchName}")
}
} catch (e) {
rocketSend channel: 'holi-oss', emoji: ':rotating_light:', message: 'Fehler'
throw e
}
}