mirror of
https://github.com/ghndrx/docker-test-image.git
synced 2026-02-10 14:55:14 +00:00
s
This commit is contained in:
15
Jenkinsfile
vendored
15
Jenkinsfile
vendored
@@ -1,8 +1,8 @@
|
|||||||
pipeline {
|
pipeline {
|
||||||
agent any
|
agent any
|
||||||
environment {
|
environment {
|
||||||
DOCKERHUB_CREDENTIALS = credentials('dockerhub-cred')
|
DOCKERHUB_CREDENTIALS=credentials('dockerhub-cred')
|
||||||
SSH_CREDENTIALS = credentials('SSH-CREDENTIALS')
|
SSH_CREDENTIALS=credentials('SSH-CREDENTIALS')
|
||||||
}
|
}
|
||||||
|
|
||||||
stages {
|
stages {
|
||||||
@@ -23,11 +23,7 @@ pipeline {
|
|||||||
sh 'docker push aisthanestha/docker-test-image:latest'
|
sh 'docker push aisthanestha/docker-test-image:latest'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
post {
|
|
||||||
always {
|
|
||||||
sh 'docker logout'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
stage('Pull and Deploy') {
|
stage('Pull and Deploy') {
|
||||||
steps {
|
steps {
|
||||||
node('any') { // Provide a label for the Jenkins agent
|
node('any') { // Provide a label for the Jenkins agent
|
||||||
@@ -48,5 +44,10 @@ pipeline {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
post {
|
||||||
|
always {
|
||||||
|
sh 'docker logout'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user