This commit is contained in:
Vendored
+14
-18
@@ -1,24 +1,20 @@
|
|||||||
node {
|
pipeline {
|
||||||
def app
|
agent any
|
||||||
|
|
||||||
stage('Clone repository') {
|
stages {
|
||||||
checkout scm
|
stage('Clone repository') {
|
||||||
}
|
checkout scm
|
||||||
|
|
||||||
stage('Build image') {
|
|
||||||
app = docker.build("brandonjones085/test")
|
|
||||||
}
|
|
||||||
|
|
||||||
stage('Test image') {
|
|
||||||
app.inside {
|
|
||||||
sh 'echo "Tests passed"'
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
stage('Push image') {
|
stage('Build image') {
|
||||||
docker.withRegistry('https://registry.hub.docker.com', 'git') {
|
app = docker.build("efstajas/homepage")
|
||||||
app.push("${env.BUILD_NUMBER}")
|
}
|
||||||
app.push("latest")
|
|
||||||
|
stage('Push image') {
|
||||||
|
docker.withRegistry('https://registry.hub.docker.com', 'git') {
|
||||||
|
app.push("${env.BUILD_NUMBER}")
|
||||||
|
app.push("latest")
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user