forked from Meg-D/TheGiftLibrary
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpipeline
66 lines (66 loc) · 1.66 KB
/
pipeline
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
pipeline{
environment{
imageName = ""
dockerHubReact ="megd30/tgl-react"
dockerHubSpring = "megd30/tgl-spring"
}
agent any
stages {
stage('clone react project'){
steps{
git 'https://github.com/Sounak-Dey/TGL-React'
}
}
stage('Docker Build Image - tglReact') {
steps {
script{
imageName = docker.build dockerHubReact + ":latest"
}
}
}
stage('deploy docker image - tglReact') {
steps {
script{
docker.withRegistry('','dockerhub'){
imageName.push()
}
}
}
}
stage('clone spring project'){
steps{
git 'https://github.com/Meg-D/TheGiftLibrary'
}
}
stage('build spring app'){
steps{
script{
sh "mvn clean install"
}
}
}
stage('Docker Build Image - tglSpring') {
steps {
script{
imageName = docker.build dockerHubSpring + ":latest"
}
}
}
stage('deploy docker image - tglSpring') {
steps {
script{
docker.withRegistry('','dockerhub'){
imageName.push()
}
}
}
}
stage('Execute Rundeck job'){
steps{
script{
build 'tgl-Rundeck'
}
}
}
}
}