Moved Login step
Some checks failed
andreas-personal/jenkins-with-docker/pipeline/head There was a failure building this commit
Some checks failed
andreas-personal/jenkins-with-docker/pipeline/head There was a failure building this commit
This commit is contained in:
parent
225469414f
commit
8697b2880c
10
Jenkinsfile
vendored
10
Jenkinsfile
vendored
@ -16,11 +16,6 @@ pipeline {
|
||||
DOCKER_HUB_CREDENTIALS = credentials('docker-hub-fah16145')
|
||||
}
|
||||
stages {
|
||||
stage('Login') {
|
||||
steps {
|
||||
sh 'docker login -u ${DOCKER_HUB_CREDENTIALS_USR} -p ${DOCKER_HUB_CREDENTIALS_PSW}'
|
||||
}
|
||||
}
|
||||
stage('Default Image') {
|
||||
stages {
|
||||
stage('Build') {
|
||||
@ -28,6 +23,11 @@ pipeline {
|
||||
sh 'docker build -t fah16145/jenkins-with-docker:latest .'
|
||||
}
|
||||
}
|
||||
stage('Login') {
|
||||
steps {
|
||||
sh 'docker login -u ${DOCKER_HUB_CREDENTIALS_USR} -p ${DOCKER_HUB_CREDENTIALS_PSW}'
|
||||
}
|
||||
}
|
||||
stage('Push') {
|
||||
steps {
|
||||
sh 'docker push fah16145/jenkins-with-docker:latest'
|
||||
|
Loading…
x
Reference in New Issue
Block a user