Import jenkinsfile
Some checks failed
perso/jenkins-wdocker/master There was a failure building this commit
Some checks failed
perso/jenkins-wdocker/master There was a failure building this commit
This commit is contained in:
parent
95bf0e0ff6
commit
ae9f93ee33
28
Jenkinsfile
vendored
Normal file
28
Jenkinsfile
vendored
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
pipeline {
|
||||||
|
environment {
|
||||||
|
registry = 'jcabillot/jenkins-wdocker'
|
||||||
|
registryCredential = 'dockerhub_jcabillot'
|
||||||
|
dockerImage = ''
|
||||||
|
}
|
||||||
|
|
||||||
|
agent any
|
||||||
|
|
||||||
|
stages {
|
||||||
|
stage('Building image') {
|
||||||
|
steps{
|
||||||
|
script {
|
||||||
|
dockerImage = docker.build registry + ":latest"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
stage('Deploy Image') {
|
||||||
|
steps{
|
||||||
|
script {
|
||||||
|
docker.withRegistry('', registryCredential) {
|
||||||
|
dockerImage.push()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
x
Reference in New Issue
Block a user