-
Notifications
You must be signed in to change notification settings - Fork 24
/
Jenkinsfile
executable file
·50 lines (39 loc) · 1.2 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
#!groovy
// https://github.com/feedhenry/fh-pipeline-library
@Library('fh-pipeline-library') _
stage('Trust') {
enforceTrustedApproval()
}
fhBuildNode([labels: ['nodejs6']]) {
dir('fh-statsd') {
final String COMPONENT = 'fh-stats'
final String VERSION = getBaseVersionFromPackageJson()
final String BUILD = env.BUILD_NUMBER
final String DOCKER_HUB_ORG = "feedhenry"
final String CHANGE_URL = env.CHANGE_URL
stage('Install Dependencies') {
npmInstall {}
}
stage('Unit Tests') {
sh 'grunt fh-unit'
}
stage('Build') {
gruntBuild {
name = COMPONENT
}
}
stage('Platform Update') {
final Map updateParams = [
componentName: COMPONENT,
componentVersion: VERSION,
componentBuild: BUILD,
changeUrl: CHANGE_URL
]
updateParams.componentName = 'fh-statsd'
fhOpenshiftTemplatesComponentUpdate(updateParams)
}
stage('Build Image') {
dockerBuildNodeComponent('fh-statsd', DOCKER_HUB_ORG)
}
}
}