forked from Sesh2020/GitFocusAngular_kube
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathJenkinsfile
50 lines (49 loc) · 1.45 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
pipeline {
environment {
registry = "priya2802/gitfocus_service_kube"
registryCredential = 'GITFocus-DockerHub'
dockerImage = ''
}
agent {
docker { image 'node' }
}
stages {
stage('Restore') {
steps {
sh 'npm install'
sh 'cp index.d.ts ./node_modules/@types/chart.js'
}
}
stage('Build') {
steps {
sh 'npm run-script build'
}
}
stage('Clean Up'){
steps {
sh 'rm -r src output e2e'
sh 'rm -f browserslist tsconfig.app.json README.md package-lock.json tsconfig.json angular.json tsconfig.spec.json karma.conf.js tslint.json index.d.ts package.json'
}
}
stage('Building Image') {
steps {
nodejs('DAGNodeJS'){
sh 'node -v'
sh 'which node; which npm'
sh 'pwd'
sh 'ls -l'
sh 'npm install'
script {
dockerImage = docker.build registry + ":$BUILD_NUMBER"
//dockerImage = docker.build registry + ":1.1"
}
}
}
}
/*stage('Deploy') {
steps {
sh 'cp ./dist/* ../../GitAngular/'
}
} */
}
}