-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathJenkinsfile
47 lines (45 loc) · 1.35 KB
/
Jenkinsfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
pipeline {
agent {
docker {
image 'barichello/godot-ci:4.2.1'
} }
environment {
GODOT_VERSION = '4.2.1'
EXPORT_NAME = 'CosmicKube'
PROJECT_PATH = 'game-source'
}
stages {
stage('Setup') {
steps {
sh '''mkdir -v -p ~/.local/share/godot/export_templates/
mv /root/.local/share/godot/export_templates/${GODOT_VERSION}.stable ~/.local/share/godot/export_templates/${GODOT_VERSION}.stable
'''
}
}
stage('Web Build') {
steps {
sh '''mkdir -v -p build/web
cd $PROJECT_PATH
godot --headless --verbose --export-release "Web" ../build/web/index.html 2>&1 | tee output.txt
echo Reading build logs...
if search="$(cat output.txt | grep 'ERROR: Project export')"
then
echo "Build failed!"
exit 1
else
echo "Build succeeded!"
exit 0
fi ;'''
}
}
stage('Web Build') {
steps {
sh '''cd game-source-redeux || exit 1
pnpm i
pnpm build
cp -r dist/* /home/static/kube-frontend/
'''
}
}
}
}