FSPatched/Jenkinsfile
2024-10-06 21:30:34 +00:00

110 lines
No EOL
2.8 KiB
Groovy

pipeline {
agent any
options {
buildDiscarder(
logRotator(
numToKeepStr: '5'
)
)
}
stages {
stage("Clean Up") {
agent {
label 'linuxfs'
}
steps {
script {
sh '''
#!/bin/bash
git clean -xfd
git reset --hard
'''
}
}
}
stage("Clone Viewer Source") {
agent {
label "linuxfs"
}
steps {
script {
sh '''
#!/bin/bash
git submodule add https://github.com/FirestormViewer/phoenix-firestorm
'''
}
}
}
stage("Apply Patches") {
agent {
label "LinuxFS"
}
steps {
script {
sh '''
#!/bin/bash
cd patches
patch_files=(*.patch)
# Only proceed if there are patch files
if [ ${#patch_files[@]} -ne 0 ]; then
# Loop over all patch files and apply them
for patch_file in "${patch_files[@]}"; do
echo "Applying $patch_file to ../phoenix-firestorm/"
patch -d ../phoenix-firestorm/ -Np1 -i "$patch_file"
done
echo "All patches applied."
else
echo "No patch files found."
fi
'''
}
}
}
stage("Build Viewer") {
agent {
label "linuxfs"
}
steps {
script {
sh '''
#!/bin/bash
cd phoenix-firestorm
rm -fv build*/newview/Phoenix*tar*
rm -fv build*/newview/*.AppImage
rm -rfv build*/newview/squash*
rm -rfv build*/newview/packaged
chmod +x /firestorm/installables.sh
/firestorm/installables.sh
autobuild configure -A64 -c ReleaseFS_open -- --fmodstudio --chan FS_ci_zdev --package -DLL_TESTS:BOOL=NO
autobuild build -A64 -c ReleaseFS_open --no-configure -- --fmodstudio || true
'''
}
}
post {
always {
archiveArtifacts artifacts: "phoenix-firestorm/*build*/newview/Phoenix*tar"
deleteDir()
}
}
}
}
}