Advertisement
Guest User

unity Jenkins

a guest
Dec 26th, 2018
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Groovy 2.20 KB | None | 0 0
  1. #!/usr/bin/env groovy
  2.  
  3. pipeline {
  4.     agent {
  5.         dockerfile {
  6.             filename 'Dockerfile'
  7.             dir 'ci/docker'
  8.             // --net is needed to be able to connect to host machine
  9.             args '--net="host" -u root -v $HOME/.local/share/unity3d/:/root/.local/share/unity3d/'
  10.         }
  11.     }
  12.     stages {
  13.         stage('Pre-Build') {
  14.             steps {
  15.                 sh 'cp "$PWD/bo-unity/Assets/Plugins/GitHub/Editor/libsfw.so" /opt/Unity/Editor/Data/Mono/lib/'
  16.             }
  17.         }
  18.         stage('Testing') {
  19.             steps {
  20.                 sh 'xvfb-run --auto-servernum --server-args="-screen 0 1x1x24" Unity -batchmode -CacheServerIPAddress=192.168.1.3:8126 -projectpath $PWD/bo-unity/ -logFile -runEditorTests || true'
  21.             }
  22.             post {
  23.                 success {
  24.                     nunit testResultsPattern: 'bo-unity/TestResults*.xml'
  25.                 }
  26.             }
  27.         }
  28.         stage('Build FauxBoViewer (Android)') {
  29.             steps {
  30.                 sh 'xvfb-run --auto-servernum --server-args="-screen 0 1x1x24" Unity -batchmode -CacheServerIPAddress=192.168.1.3:8126 -projectpath $PWD/bo-unity/ -logFile -executeMethod Embodied.Editor.JenkinsRobotBuilder.BuildGame -buildtype=FauxBoViewer -platformtype=Android -configtype=Development -outputpath=/root/'
  31.             }
  32.         }
  33.         stage('Build Normal (Android)') {
  34.             steps {
  35.                 sh 'xvfb-run --auto-servernum --server-args="-screen 0 1x1x24" Unity -batchmode -CacheServerIPAddress=192.168.1.3:8126 -projectpath $PWD/bo-unity/ -logFile -executeMethod Embodied.Editor.JenkinsRobotBuilder.BuildGame -buildtype=Normal -platformtype="Android" -configtype=Development -outputpath=/root/'
  36.             }
  37.         }
  38.         stage('Build Standalone (Mac)') {
  39.             steps {
  40.                 sh 'xvfb-run --auto-servernum --server-args="-screen 0 1x1x24" Unity -batchmode -CacheServerIPAddress=192.168.1.3:8126 -projectpath $PWD/bo-unity/ -logFile -executeMethod Embodied.Editor.JenkinsRobotBuilder.BuildGame -buildtype=Normal -platformtype=Mac -configtype=Development -outputpath=/root/'
  41.             }
  42.         }
  43.         stage('Build Standalone (Windows)') {
  44.             steps {
  45.                 sh 'xvfb-run --auto-servernum --server-args="-screen 0 1x1x24" Unity -batchmode -CacheServerIPAddress=192.168.1.3:8126 -projectpath $PWD/bo-unity/ -logFile -executeMethod Embodied.Editor.JenkinsRobotBuilder.BuildGame -buildtype=Normal -platformtype="PC" -configtype=Development -outputpath=/root/'
  46.             }
  47.         }
  48.     }
  49. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement