jenkins-wdocker/Jenkinsfile
Julien Cabillot 5dfa64dc3f
Some checks reported errors
perso/jenkins-wdocker/master Something is wrong with the build of this commit
test
2019-06-26 17:52:23 -04:00

35 lines
776 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 'cat /var/jenkins_home/workspace/perso_jenkins-wdocker_master@tmp/abed23b6-7300-4b49-82d2-0f788b5079a0/config.json'
sh 'docker push jcabillot/jenkins-wdocker'
}
}
}
}
}
}