Commit 9ed85f27 authored by FabiusE's avatar FabiusE

Changed registry

parent 0724bdb2
node {
def app
stage('Clone repository'){
checkout scm
}
pipeline {
agent {
kubernetes {
node {
def app
stage('Clone repository'){
checkout scm
}
stage('Build image'){
app = docker.build("fabiuse/reactdocker")
}
stage('Build image'){
app = docker.build("fabiuse/reactdocker")
}
stage('Test image'){
app.inside {
sh 'echo "Tests passed"'
}
}
stage('Test image'){
app.inside {
sh 'echo "Tests passed"'
}
}
stage('Push image'){
docker.withRegistry('','docker-hub-credentials'){
app.push("latest")
}
}
kubernetes {
stage {
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