3 Commits

Author SHA1 Message Date
548ff437c1 reconfigured to rebuild all branches once a wekk
All checks were successful
tv7playlist/pipeline/head This commit looks good
2021-03-07 20:46:02 +01:00
daf91e46c1 rebuilds the container every wednesday
Some checks failed
tv7playlist/pipeline/head There was a failure building this commit
2021-03-07 20:44:04 +01:00
7e1bf65efb adds jenkinsfile
Some checks failed
continuous-integration/drone/push Build is failing
tv7playlist/pipeline/head This commit looks good
2021-03-02 21:35:52 +01:00

52
Jenkinsfile vendored Normal file
View File

@@ -0,0 +1,52 @@
// Rebuild the container of all branches every wednesday
CRON_SETTINGS = '''H H * * 3'''
pipeline {
environment {
imagename = "phaefelfinger/tv7playlist"
registryCredential = 'phdockerhub'
dockerImage = ''
}
agent { node { label 'docker' } }
triggers {
cron(CRON_SETTINGS)
}
stages {
stage('Cloning repository') {
steps {
checkout scm
}
}
stage('Building image') {
steps{
script {
dockerImage = docker.build imagename
}
}
}
stage('Publishing image') {
steps{
script {
docker.withRegistry( '', registryCredential ) {
dockerImage.push('latest')
dockerImage.push('3.1')
dockerImage.push('3.1.0')
}
}
}
}
stage('Remove unused docker image') {
steps{
sh "docker rmi $imagename:latest"
sh "docker rmi $imagename:3.1"
sh "docker rmi $imagename:3.1.0"
}
}
}
}