Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Eclipse Foundation
IT
Websites
osgi.org
Commits
b684ebd5
Commit
b684ebd5
authored
Mar 15, 2022
by
Christopher Guindon
Browse files
Add Jenkins file to replace github actions
parent
6bd33be0
Pipeline
#2380
failed with stage
in 0 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Jenkinsfile
0 → 100644
View file @
b684ebd5
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'
}
}
}
}
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment