forked from vendure-ecommerce/vendure
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Jenkinsfile
67 lines (58 loc) · 1.5 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
63
64
65
66
67
@Library('devops-shared-lib')_
pipeline {
environment {
buildName = "${env.JOB_NAME}"
buildNumber = "${env.BUILD_NUMBER}"
branchName = "${env.BRANCH_NAME}"
HOME = "."
}
options {
disableConcurrentBuilds()
// buildDiscarder(logRotator(numToKeepStr:'5'))
timeout(time: 10, unit: 'MINUTES')
}
agent {
docker {
alwaysPull false
image 'zazukoians/node-java'
}
}
stages {
stage('Initial') {
steps {
dir('dist') {
script {
sendNotifications 'STARTED'
deleteDir()
npmUtils.echoDevTools(buildName, branchName)
}
}
}
}
stage('Build Node. JS project') {
steps {
script {
npmUtils.install()
npmUtils.build()
}
}
}
stage('Archive dist folder') {
steps {
script {
echo 'Zip dist content and archive for later usage'
fileOperations([fileZipOperation(folderPath: 'dist', outputFolderPath: '')])
archiveArtifacts artifacts: 'dist.zip', excludes: '' , onlyIfSuccessful: true
}
}
}
}
post {
always {
script{
envProps.cleanWorkspace()
sendNotifications currentBuild.result
}
}
}
}