jenkins-wdocker/Jenkinsfile
Julien Cabillot 7f0b5a00c7
Some checks failed
perso/jenkins-wdocker/master There was a failure building this commit
test
2019-06-25 18:32:30 -04:00

34 lines
645 B
Groovy

pipeline {
environment {
registry = 'https://registry.hub.docker.com'
registryCredential = 'dockerhub_jcabillot'
dockerImage = 'jcabillot/jenkins-wdocker'
}
agent any
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://docker.io', credentialsId: 'dockerhub_jcabillot') {
sh 'docker push jcabillot/jenkins-wdocker'
}
}
}
}
}
}