Add Jenkinsfile
This commit is contained in:
17
Jenkinsfile
vendored
Normal file
17
Jenkinsfile
vendored
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
pipeline {
|
||||||
|
agent any
|
||||||
|
|
||||||
|
stages {
|
||||||
|
stage('Build Docker Image') {
|
||||||
|
steps {
|
||||||
|
sh 'docker build -t localhost:5000/demo-app:${BUILD_NUMBER} .'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Push Image to Registry') {
|
||||||
|
steps {
|
||||||
|
sh 'docker push localhost:5000/demo-app:${BUILD_NUMBER}'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user