Commit b684ebd5 authored by Christopher Guindon's avatar Christopher Guindon
Browse files

Add Jenkins file to replace github actions

parent 6bd33be0
Pipeline #2380 failed with stage
in 0 seconds
pipeline {
agent {
kubernetes {
label 'hugo-agent'
yaml """
apiVersion: v1
metadata:
labels:
run: hugo
name: hugo-pod
spec:
containers:
- name: jnlp
volumeMounts:
- mountPath: /home/jenkins/.ssh
name: volume-known-hosts
env:
- name: "HOME"
value: "/home/jenkins"
- name: hugo
image: eclipsecbi/hugo:0.81.0
command:
- cat
tty: true
volumes:
- configMap:
name: known-hosts
name: volume-known-hosts
"""
}
}
triggers { pollSCM('H/10 * * * *')
}
options {
buildDiscarder(logRotator(numToKeepStr: '5'))
checkoutToSubdirectory('hugo')
}
stages {
stage('Build website (main) with Hugo') {
when {
branch 'main'
}
steps {
container('hugo') {
dir('hugo') {
sh 'yarn install --frozen-lockfile && hugo --gc --minify --buildFuture'
}
}
}
}
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment