forked from pndaproject/platform-console-frontend
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathJenkinsfile
More file actions
33 lines (26 loc) · 1.28 KB
/
Jenkinsfile
File metadata and controls
33 lines (26 loc) · 1.28 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
node {
try {
// Mark the code build 'stage'
stage 'Build'
def workspace = pwd()
sh '''
echo $PWD
echo $BRANCH_NAME
cd $PWD@script/console-frontend;
npm install
echo "{ \\"name\\": \\"console-frontend\\", \\"version\\": \\"$BRANCH_NAME\\" }" > package-version.json
grunt package
'''
stage 'Test'
sh '''
'''
stage 'Deploy'
build job: 'deploy-component', parameters: [[$class: 'StringParameterValue', name: 'branch', value: env.BRANCH_NAME],[$class: 'StringParameterValue', name: 'component', value: "console"],[$class: 'StringParameterValue', name: 'release_path', value: "platform/releases"],[$class: 'StringParameterValue', name: 'release', value: "${workspace}@script/console-frontend/console-frontend-${env.BRANCH_NAME}.tar.gz"]]
emailext attachLog: true, body: "Build succeeded (see ${env.BUILD_URL})", subject: "[JENKINS] ${env.JOB_NAME} succeeded", to: "${env.EMAIL_RECIPIENTS}"
}
catch(error) {
emailext attachLog: true, body: "Build failed (see ${env.BUILD_URL})", subject: "[JENKINS] ${env.JOB_NAME} failed", to: "${env.EMAIL_RECIPIENTS}"
currentBuild.result = "FAILED"
throw error
}
}