-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathJenkinsfile
More file actions
46 lines (42 loc) · 1.37 KB
/
Copy pathJenkinsfile
File metadata and controls
46 lines (42 loc) · 1.37 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
pipeline{
agent any
tools {
nodejs 'node'
}
triggers {
pollSCM '* * * * *'
}
stages{
/*stage("Git checkout"){
steps{
// Get some code from a GitHub repository
git credentialsId: 'ssh_priv_key', url: 'git@github.com:szairi2011/my-admin-portal.git', branch: 'users-list-page'
}
}*/
stage('Build') {
steps {
// Build ng app
sh "npm install"
}
post {
always {
emailext to: 'test@jenkins',
recipientProviders: [developers(), requestor()],
subject: "Job: \'${JOB_NAME}\' -- Build: ${BUILD_NUMBER} -- Result: ${currentBuild.result}",
body: 'Please go to ${BUILD_URL} and verify the build ...',
attachLog: true,
compressLog: true
}
// changed {
// emailext body: 'Please go to ${BUILD_URL} and verify the build ...', recipientProviders: [developers(), requestor()], subject: 'Job: ${JOB_NAME} -- Build: ${BUILD_NUMBER} -- Result: ${currentBuild.result}', to: 'test@jenkins'
// }
}
}
stage('Deploy') {
steps {
// Deploy ng app and run json-server
sh "npm run dev"
}
}
}
}