-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathJenkinsfile
More file actions
48 lines (45 loc) · 1.49 KB
/
Jenkinsfile
File metadata and controls
48 lines (45 loc) · 1.49 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
47
48
pipeline {
agent any
tools {
// Install the Maven version configured as "M3" and add it to the path.
nodejs "my-nodejs"
}
stages {
stage('Source Code Checkout') {
steps {
echo 'Angular Test Project GitHub Repository Code Checkout'
// Get some code from a GitHub repository
git 'https://github.com/swagat030/angular-test-code.git'
}
}
stage('Install Dependency') {
steps {
echo 'Angular Test Project npm Install'
sh "npm install"
}
}
// stage('Testing Stage') {
// steps {
// echo 'Angular Test Project Code Unit Testing Stage'
// sh 'npx ng test --no-watch --code-coverage'
// }
// }
// stage('Sonar Scanner Coverage') {
// steps {
// echo 'Angular Test Project Sonar Scanner Coverage'
// sh "npm run sonar"
// }
// }
stage('Make Prod Build') {
steps {
echo 'Angular Test Project Prod Build'
sh 'npx ng build --prod --base-href=/angular-test-code/ && cd dist/angular-test-code && jar -cvf angular-test-code.war *'
}
}
stage('Deploy Application with Tomcat Server' ) {
steps {
echo 'Angular Test Project Deployement with Tomcat Server'
}
}
}
}