2021-03-21 17:53:35 +01:00
|
|
|
@Library("Pages")_
|
|
|
|
|
2021-03-21 12:44:54 +01:00
|
|
|
pipeline {
|
|
|
|
agent any
|
2021-03-21 15:32:57 +01:00
|
|
|
environment {
|
|
|
|
WATCHTOWER_TOKEN = credentials("watchtower-token")
|
|
|
|
}
|
2021-03-21 12:44:54 +01:00
|
|
|
stages {
|
|
|
|
stage('Cloning our Git') {
|
|
|
|
steps {
|
2021-04-14 21:25:39 +02:00
|
|
|
checkout([$class: 'GitSCM',
|
|
|
|
branches: [[name: '*/master']],
|
|
|
|
doGenerateSubmoduleConfigurations: false,
|
|
|
|
extensions: [[$class: 'SubmoduleOption',
|
|
|
|
disableSubmodules: false,
|
|
|
|
parentCredentials: false,
|
|
|
|
recursiveSubmodules: true,
|
|
|
|
reference: '',
|
|
|
|
trackingSubmodules: false]],
|
|
|
|
submoduleCfg: [],
|
|
|
|
userRemoteConfigs: [[url: 'https://git.tobiasmanske.de/user/rad4day/public/blog/']]])
|
2021-03-21 12:44:54 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
stage('Build HTML') {
|
|
|
|
steps {
|
2021-04-14 21:25:39 +02:00
|
|
|
script {
|
|
|
|
docker.withRegistry('https://registry.chaoswg.org:5000', 'docker-registry-credentials') {
|
2021-03-25 03:38:38 +01:00
|
|
|
def dockerImage = docker.image('registry.chaoswg.org:5000/alpine-avif-webp:latest')
|
2021-04-14 21:25:39 +02:00
|
|
|
dockerImage.pull()
|
|
|
|
}
|
|
|
|
}
|
2021-03-25 03:38:38 +01:00
|
|
|
|
2021-03-21 12:44:54 +01:00
|
|
|
sh 'docker pull klakegg/hugo:alpine'
|
2021-03-25 03:38:38 +01:00
|
|
|
|
2021-09-21 23:37:42 +02:00
|
|
|
sh 'docker run --rm -v "$PWD:/src" registry.chaoswg.org:5000/alpine-avif-webp:latest'
|
|
|
|
sh 'docker run --rm -v "$PWD:/src" klakegg/hugo:alpine'
|
2021-03-21 12:44:54 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
stage('Deploying Docker Image') {
|
|
|
|
steps {
|
2021-03-21 17:53:35 +01:00
|
|
|
DeployPages("./docs", "tobiasmanske.de:latest")
|
2021-03-21 12:44:54 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
stage('Cleaning Up') {
|
|
|
|
steps{
|
|
|
|
sh "docker rmi --force tobiasmanske.de:latest"
|
2021-03-21 15:39:45 +01:00
|
|
|
cleanWs()
|
2021-03-21 12:44:54 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|