From 84e0a0b9042f406058042086c0aae67c8db5dbbb Mon Sep 17 00:00:00 2001 From: JackCarterSmith Date: Wed, 30 Jun 2021 19:54:37 +0200 Subject: [PATCH] Added jenkinsfile --- Jenkinsfile | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 Jenkinsfile diff --git a/Jenkinsfile b/Jenkinsfile new file mode 100644 index 0000000..5fcee93 --- /dev/null +++ b/Jenkinsfile @@ -0,0 +1,46 @@ +pipeline { + agent any + options { + skipDefaultCheckout(true) + } + stages { + stage('Unix-Build') { + steps { + cleanWs() + checkout([$class: 'GitSCM', branches: [[name: '**']], browser: [$class: 'GiteaBrowser', repoUrl: 'https://git.jcsmith.fr/JCS-Prod/RSE-Texture'], extensions: [], userRemoteConfigs: [[credentialsId: 'jenkins-ssh', url: 'ssh://git@git.jcsmith.fr:2322/JCS-Prod/RSE-Texture.git']]]) + echo 'Build Unix x64_86 release...' + cmakeBuild buildDir: 'build', installation: 'latest', steps: [[args: 'all']] + } + } + stage('Unix-Deploy') { + steps { + echo 'Deploying solution...' + sh 'gpg --batch --detach-sign -o build/${JOB_BASE_NAME}_x64_1.0.1-${BUILD_NUMBER}.gpg build/RSE_Texture-1.0.1' + archiveArtifacts(artifacts: 'build/RSE_Texture-*,build/*.gpg') + } + } + stage('Win-Build') { + steps { + cleanWs() + checkout([$class: 'GitSCM', branches: [[name: '**']], browser: [$class: 'GiteaBrowser', repoUrl: 'https://git.jcsmith.fr/JCS-Prod/RSE-Texture'], extensions: [], userRemoteConfigs: [[credentialsId: 'jenkins-ssh', url: 'ssh://git@git.jcsmith.fr:2322/JCS-Prod/RSE-Texture.git']]]) + echo 'Build Windows mingw64 release...' + cmakeBuild buildDir: 'build', cmakeArgs: '-DGNU_HOST=x86_64-w64-mingw32 -DCMAKE_TOOLCHAIN_FILE=../mingw_cross_toolchain.cmake -D"ZLIB_INCLUDE_DIR=/mnt/cc-libs/mingw64/zlib/1.2.11/include" -D"ZLIB_LIBRARY=/mnt/cc-libs/mingw64/zlib/1.2.11/lib/libzlib.dll.a" -D"PNG_PNG_INCLUDE_DIR=/mnt/cc-libs/mingw64/libpng/1.6.37/include" -D"PNG_LIBRARY=/mnt/cc-libs/mingw64/libpng/1.6.37/lib/libpng.dll.a"', installation: 'latest', steps: [[args: 'all']] + } + } + stage('Win-Deploy') { + steps { + echo 'Deploying solution...' + sh 'gpg --batch --detach-sign -o build/${JOB_BASE_NAME}_mingw64_1.0.1-${BUILD_NUMBER}.gpg build/RSE_Texture-1.0.1.exe' + archiveArtifacts(artifacts: 'build/RSE_Texture-*.exe,build/*.gpg') + } + } + } + post { + always { + cleanWs(cleanWhenNotBuilt: false, + deleteDirs: true, + disableDeferredWipeout: true, + notFailBuild: true) + } + } +} \ No newline at end of file