Move from github pages to own solution
Jenkins and Docker containers :)
This commit is contained in:
45
Jenkinsfile
vendored
Normal file
45
Jenkinsfile
vendored
Normal file
@ -0,0 +1,45 @@
|
||||
pipeline {
|
||||
agent any
|
||||
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 {
|
||||
script {
|
||||
dockerImage = docker.build("tobiasmanske.de:latest")
|
||||
docker.withRegistry('https://registry.chaoswg.org:5000', 'docker-registry-credentials') {
|
||||
dockerImage.push()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
stage('Cleaning Up') {
|
||||
steps{
|
||||
sh "docker rmi --force tobiasmanske.de:latest"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user