Commit 90cc27cb authored by FabiusE's avatar FabiusE

Changed registry

parent bc7898d8
...@@ -3,32 +3,30 @@ pipeline { ...@@ -3,32 +3,30 @@ pipeline {
kubernetes { kubernetes {
label 'jenkins-jenkins-slave' label 'jenkins-jenkins-slave'
defaultContainer 'jnlp' defaultContainer 'jnlp'
node { def app
def app stage('Clone repository'){
stage('Clone repository'){ checkout scm
checkout scm }
}
stage('Build image'){ stage('Build image'){
app = docker.build("fabiuse/reactdocker") app = docker.build("fabiuse/reactdocker")
} }
stage('Test image'){ stage('Test image'){
app.inside { app.inside {
sh 'echo "Tests passed"' sh 'echo "Tests passed"'
}
} }
stage('Push image'){
docker.withRegistry('','docker-hub-credentials'){
app.push("latest")
}
}
stage ('Deploy') {
sh 'echo kubectl get nodes'
}
} }
stage('Push image'){
docker.withRegistry('','docker-hub-credentials'){
app.push("latest")
}
}
stage ('Deploy') {
sh 'echo kubectl get nodes'
}
} }
} }
} }
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment