-
Notifications
You must be signed in to change notification settings - Fork 52
/
Jenkinsfile
executable file
·55 lines (44 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
51
52
53
54
55
#!groovy
// https://github.com/feedhenry/fh-pipeline-library
@Library('fh-pipeline-library') _
stage('Trust') {
enforceTrustedApproval()
}
import org.feedhenry.Utils
fhBuildNode(['label': 'nodejs6']) {
final String COMPONENT = 'fh-template-apps'
final String VERSION = getBaseVersionFromPackageJson()
final String BUILD = env.BUILD_NUMBER
final String CHANGE_URL = env.CHANGE_URL
def utils = new Utils()
stage('Install Dependencies') {
npmInstall {}
}
stage('Test') {
gruntCmd {
cmd = 'format'
}
if (utils.gitRepoIsDirty()) {
error "Please make sure you run 'grunt format' when committing changes to config files e.g. global.json"
}
}
stage('Build') {
gruntBuild {
name = COMPONENT
distCmd = 'default'
}
s3PublishArtifacts([
bucket: "fh-wendy-builds/${COMPONENT}/${BUILD}",
directory: "./dist"
])
}
stage('Platform Update') {
final Map updateParams = [
componentName: COMPONENT,
componentVersion: VERSION,
componentBuild: BUILD,
changeUrl: CHANGE_URL
]
feedhenrySdksContainerComponentUpdate(updateParams)
}
}