forked from CameronGuthrie/LBG-Python
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathJenkinsfile
More file actions
30 lines (27 loc) · 753 Bytes
/
Jenkinsfile
File metadata and controls
30 lines (27 loc) · 753 Bytes
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
pipeline{
environment {
registry = "jithu1010/pythonapp"
registryCredentials = "dockerhub_id"
dockerImage = ""
}
agent any
stages {
stage ('Build Docker Image'){
steps{
script {
dockerImage = docker.build(registry)
}
}
}
stage ("Push to Docker Hub"){
steps {
script {
docker.withRegistry('', registryCredentials) {
dockerImage.push("${env.BUILD_NUMBER}")
dockerImage.push("latest")
}
}
}
}
}
}