Changed Login Position in Jenkinsfile
All checks were successful
andreas-personal/jenkins-with-docker/pipeline/head This commit looks good
All checks were successful
andreas-personal/jenkins-with-docker/pipeline/head This commit looks good
This commit is contained in:
parent
b69b687cf5
commit
69229171a7
10
Jenkinsfile
vendored
10
Jenkinsfile
vendored
@ -16,6 +16,11 @@ 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') {
|
||||
@ -23,11 +28,6 @@ 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