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 {
|
|
|
|
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/']]])
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
stage('Build HTML') {
|
|
|
|
steps {
|
|
|
|
sh 'docker pull klakegg/hugo:alpine'
|
2021-03-21 20:11:24 +01:00
|
|
|
sh 'docker run -u 108:116 -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
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|