This commit is contained in:
parent
884fc58b70
commit
dfe767d828
@ -1,5 +1,5 @@
|
|||||||
ARG VERSION="latest"
|
ARG VERSION="latest"
|
||||||
FROM "registry.cabillot.eu/www/phpapache:${VERSION}"
|
FROM "jcabillot/phpapache:${VERSION}"
|
||||||
LABEL maintainer="Julien Cabillot <dockerimages@cabillot.eu>"
|
LABEL maintainer="Julien Cabillot <dockerimages@cabillot.eu>"
|
||||||
|
|
||||||
RUN curl -s -S -L "https://download.dokuwiki.org/src/dokuwiki/dokuwiki-stable.tgz" | tar -zx --strip=1
|
RUN curl -s -S -L "https://download.dokuwiki.org/src/dokuwiki/dokuwiki-stable.tgz" | tar -zx --strip=1
|
||||||
|
|||||||
38
Jenkinsfile
vendored
Normal file
38
Jenkinsfile
vendored
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
pipeline {
|
||||||
|
environment {
|
||||||
|
registry = 'https://registry.hub.docker.com'
|
||||||
|
registryCredential = 'dockerhub_jcabillot'
|
||||||
|
dockerImage = 'jcabillot/dokuwiki'
|
||||||
|
}
|
||||||
|
|
||||||
|
agent any
|
||||||
|
|
||||||
|
triggers {
|
||||||
|
cron('@midnight')
|
||||||
|
}
|
||||||
|
|
||||||
|
stages {
|
||||||
|
stage('Clone repository') {
|
||||||
|
steps{
|
||||||
|
checkout scm
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Build image') {
|
||||||
|
steps{
|
||||||
|
sh 'docker build --force-rm --no-cache --pull -t ${dockerImage} .'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Deploy Image') {
|
||||||
|
steps{
|
||||||
|
script {
|
||||||
|
withCredentials([usernamePassword(credentialsId: 'dockerhub_jcabillot', usernameVariable: 'DOCKER_USER', passwordVariable: 'DOCKER_PASS')]) {
|
||||||
|
sh 'docker login --username ${DOCKER_USER} --password ${DOCKER_PASS}'
|
||||||
|
sh 'docker push ${dockerImage}'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
x
Reference in New Issue
Block a user