Commit aa996f4a authored by FabiusE's avatar FabiusE

Changed registry

parent 90cc27cb
......@@ -3,30 +3,32 @@ pipeline {
kubernetes {
label 'jenkins-jenkins-slave'
defaultContainer 'jnlp'
def app
stage('Clone repository'){
checkout scm
}
stage('Build image'){
app = docker.build("fabiuse/reactdocker")
}
}
}
}
node {
def app
stage('Clone repository'){
checkout scm
}
stage('Test image'){
app.inside {
sh 'echo "Tests passed"'
}
}
stage('Build image'){
app = docker.build("fabiuse/reactdocker")
}
stage('Push image'){
docker.withRegistry('','docker-hub-credentials'){
app.push("latest")
}
}
stage ('Deploy') {
sh 'echo kubectl get nodes'
}
stage('Test image'){
app.inside {
sh 'echo "Tests passed"'
}
}
}
\ No newline at end of file
stage('Push image'){
docker.withRegistry('','docker-hub-credentials'){
app.push("latest")
}
}
stage ('Deploy') {
sh 'echo kubectl get nodes'
}
}
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