jenkins-wdocker/Jenkinsfile
Julien Cabillot aa9b3fa9ba
Some checks failed
perso/jenkins-wdocker/master There was a failure building this commit
test
2019-06-25 18:29:34 -04:00

32 lines
646 B
Groovy

pipeline {
environment {
registry = 'https://registry.hub.docker.com'
registryCredential = 'dockerhub_jcabillot'
dockerImage = 'jcabillot/jenkins-wdocker'
}
stages {
stage('Clone repository') {
steps{
checkout scm
}
}
stage('Build image') {
steps{
sh "docker build -t jcabillot/jenkins-wdocker ."
}
}
stage('Deploy Image') {
steps{
script {
withDockerRegistry(url: 'https://registry.hub.docker.com', credentialsId: 'dockerhub_jcabillot') {
sh 'docker push jcabillot/jenkins-wdocker'
}
}
}
}
}
}