forked from dag-gitfocus/GitFocusAngular_kube
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathGitFocusAngularImageBuildFile
44 lines (44 loc) · 1.4 KB
/
GitFocusAngularImageBuildFile
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
pipeline {
environment {
registry = "priya2802/gitfocus_service_kube"
registryCredential = 'GITFocus-DockerHub'
dockerImage = ''
}
agent any
stages {
stage('Building Image') {
steps {
sh 'pwd'
sh 'ls -l'
script {
dockerImage = docker.build registry + ":$BUILD_NUMBER"
//dockerImage = docker.build registry + ":1.1"
}
}
}
stage('Clean Up'){
steps {
sh 'rm -r src output e2e'
sh 'rm -f browserslist tsconfig.app.json README.md tsconfig.json angular.json tsconfig.spec.json karma.conf.js tslint.json index.d.ts'
}
}
stage('Push to DockerHub') {
steps{
script {
docker.withRegistry( '', registryCredential ) {
dockerImage.push();
dockerImage.push()+ ':${BUILD_NUMBER}'
}
}
}
}
}
post {
always {
cleanWs()
/*emailext body:'''${DEFAULT_CONTENT}''',
recipientProviders: [[$class: 'DevelopersRecipientProvider'], [$class: 'RequesterRecipientProvider']],
subject:''' ${DEFAULT_SUBJECT}'''*/
}
}
}