Changes to be committed:

modified:   Jenkinsfile
This commit is contained in:
vinnimous 2024-03-18 16:36:51 -04:00
parent 41b355a77c
commit d7673fe259

27
Jenkinsfile vendored
View File

@ -20,5 +20,32 @@ pipeline {
shared()
}
}
stage('Building our image') {
steps {
sh "docker build . -t vinnimous/privategpt:latest"
}
}
stage('Login to Docker') {
when {
allOf {
branch 'master'
}
}
steps {
withCredentials([string (credentialsId: 'docker_hub_token', variable: 'token')]) {
sh "docker login --username vinnimous --password ${token}"
}
}
}
stage('Push to Docker') {
when {
allOf {
branch 'master'
}
}
steps {
sh "docker image push vinnimous/privategpt:latest"
}
}
}
}