tobiasmanske.de/Jenkinsfile

47 lines
1.3 KiB
Plaintext
Raw Normal View History

2021-03-21 17:53:35 +01:00
@Library("Pages")_
pipeline {
agent any
2021-03-21 15:32:57 +01:00
environment {
WATCHTOWER_TOKEN = credentials("watchtower-token")
}
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'
sh 'docker run -v "$PWD:/src" klakegg/hugo:alpine'
}
}
stage('Deploying Docker Image') {
steps {
2021-03-21 17:53:35 +01:00
DeployPages("./docs", "tobiasmanske.de:latest")
}
}
stage('Cleaning Up') {
steps{
sh "docker rmi --force tobiasmanske.de:latest"
2021-03-21 15:39:45 +01:00
cleanWs()
}
}
}
}