-
Notifications
You must be signed in to change notification settings - Fork 27
/
Copy pathJenkinsfile
30 lines (27 loc) · 845 Bytes
/
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
@Library('Shared')_
pipeline{
agent any
parameters{
string(name: 'IMAGE_VERSION',defaultValue: 'latest', description: "Image tag")
}
stages{
stage("Code"){
steps{
clone("https://github.com/Amitabh-DevOps/DevOps-mega-project.git","project")
echo "Code clonning done."
}
}
stage("Build"){
steps{
dockerbuild("mega-project","${params.IMAGE_VERSION}")
echo "Code build bhi hogaya."
}
}
stage("Push to DockerHub"){
steps{
dockerpush("dockerHub","mega-project","${params.IMAGE_VERSION}")
echo "Push to dockerHub is also done."
}
}
}
}