Configure version var for CI
All checks were successful
JCS-Prod/RSE-Model/pipeline/head This commit looks good
All checks were successful
JCS-Prod/RSE-Model/pipeline/head This commit looks good
This commit is contained in:
parent
6bfecbec01
commit
9af42fe692
@ -10,7 +10,7 @@ set(CMAKE_MODULE_PATH ${CMAKE_BINARY_DIR})
|
|||||||
# define project
|
# define project
|
||||||
add_definitions(-DCONF_NO_GL)
|
add_definitions(-DCONF_NO_GL)
|
||||||
if(DEFINED ENV{CI})
|
if(DEFINED ENV{CI})
|
||||||
project(rse-model VERSION 1.0.0.$ENV{CI_BUILD_NUMBER} DESCRIPTION "RogueSquadron Extractor - Model" LANGUAGES C)
|
project(rse-model VERSION $ENV{CI_VERSION}.$ENV{CI_BUILD_NUMBER} DESCRIPTION "RogueSquadron Extractor - Model" LANGUAGES C)
|
||||||
set(RSE_MOD_NAME $ENV{CI_OUTPUT_NAME}-${PROJECT_VERSION})
|
set(RSE_MOD_NAME $ENV{CI_OUTPUT_NAME}-${PROJECT_VERSION})
|
||||||
else()
|
else()
|
||||||
project(rse-model VERSION 1.0.0 DESCRIPTION "RogueSquadron Extractor - Model" LANGUAGES C)
|
project(rse-model VERSION 1.0.0 DESCRIPTION "RogueSquadron Extractor - Model" LANGUAGES C)
|
||||||
|
22
Jenkinsfile
vendored
22
Jenkinsfile
vendored
@ -4,7 +4,8 @@ pipeline {
|
|||||||
skipDefaultCheckout(true)
|
skipDefaultCheckout(true)
|
||||||
}
|
}
|
||||||
environment {
|
environment {
|
||||||
CI_OUTPUT_NAME = "RSE_Texture"
|
CI_OUTPUT_NAME = "RSE_Model"
|
||||||
|
CI_VERSION = "1.0.0"
|
||||||
CI_BUILD_NUMBER = "$BUILD_NUMBER"
|
CI_BUILD_NUMBER = "$BUILD_NUMBER"
|
||||||
}
|
}
|
||||||
stages {
|
stages {
|
||||||
@ -19,7 +20,8 @@ pipeline {
|
|||||||
parallel(
|
parallel(
|
||||||
linux: {
|
linux: {
|
||||||
dir("linux") {
|
dir("linux") {
|
||||||
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']]])
|
checkout([$class: 'GitSCM', branches: [[name: '**']], browser: [$class: 'GiteaBrowser', repoUrl: 'https://git.jcsmith.fr/JCS-Prod/RSE-Model'], extensions: [], userRemoteConfigs: [[credentialsId: 'jenkins-ssh', url: 'ssh://git@git.jcsmith.fr:2322/JCS-Prod/RSE-Model.git']]])
|
||||||
|
sh 'git submodule update --init --recursive'
|
||||||
dir("build") {
|
dir("build") {
|
||||||
rtConanRun(clientId: "conan", command: "install .. --build missing")
|
rtConanRun(clientId: "conan", command: "install .. --build missing")
|
||||||
}
|
}
|
||||||
@ -28,7 +30,8 @@ pipeline {
|
|||||||
},
|
},
|
||||||
windows: {
|
windows: {
|
||||||
dir("windows") {
|
dir("windows") {
|
||||||
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']]])
|
checkout([$class: 'GitSCM', branches: [[name: '**']], browser: [$class: 'GiteaBrowser', repoUrl: 'https://git.jcsmith.fr/JCS-Prod/RSE-Model'], extensions: [], userRemoteConfigs: [[credentialsId: 'jenkins-ssh', url: 'ssh://git@git.jcsmith.fr:2322/JCS-Prod/RSE-Model.git']]])
|
||||||
|
sh 'git submodule update --init --recursive'
|
||||||
dir("build") {
|
dir("build") {
|
||||||
rtConanRun(clientId: "conan", command: "install .. --profile windows --build missing")
|
rtConanRun(clientId: "conan", command: "install .. --profile windows --build missing")
|
||||||
}
|
}
|
||||||
@ -41,15 +44,16 @@ pipeline {
|
|||||||
stage('Deploy') {
|
stage('Deploy') {
|
||||||
steps {
|
steps {
|
||||||
dir("zip_linux") {
|
dir("zip_linux") {
|
||||||
sh 'cp ../linux/build/${CI_OUTPUT_NAME}-1.0.1.${BUILD_NUMBER}* .'
|
sh 'cp ../linux/build/${CI_OUTPUT_NAME}-${CI_VERSION}.${BUILD_NUMBER}* .'
|
||||||
}
|
}
|
||||||
dir("zip_win") {
|
dir("zip_win") {
|
||||||
sh 'cp ../windows/build/${CI_OUTPUT_NAME}-1.0.1.${BUILD_NUMBER}* ../windows/build/*.dll .'
|
// sh 'cp ../windows/build/${CI_OUTPUT_NAME}-${CI_VERSION}.${BUILD_NUMBER}* ../windows/build/*.dll .'
|
||||||
|
sh 'cp ../windows/build/${CI_OUTPUT_NAME}-${CI_VERSION}.${BUILD_NUMBER}* .'
|
||||||
}
|
}
|
||||||
zip archive: false, dir: 'zip_linux', exclude: '', glob: '', zipFile: 'x64.zip'
|
zip archive: false, dir: 'zip_linux', exclude: '', glob: '', zipFile: 'x64.zip'
|
||||||
sh 'mv x64.zip ${CI_OUTPUT_NAME}-1.0.1.${BUILD_NUMBER}_x64.zip'
|
sh 'mv x64.zip ${CI_OUTPUT_NAME}-${CI_VERSION}.${BUILD_NUMBER}_x64.zip'
|
||||||
zip archive: false, dir: 'zip_win', exclude: '', glob: '', zipFile: 'mingw64.zip'
|
zip archive: false, dir: 'zip_win', exclude: '', glob: '', zipFile: 'mingw64.zip'
|
||||||
sh 'mv mingw64.zip ${CI_OUTPUT_NAME}-1.0.1.${BUILD_NUMBER}_mingw64.zip'
|
sh 'mv mingw64.zip ${CI_OUTPUT_NAME}-${CI_VERSION}.${BUILD_NUMBER}_mingw64.zip'
|
||||||
archiveArtifacts(artifacts: '*.zip')
|
archiveArtifacts(artifacts: '*.zip')
|
||||||
fingerprint(targets: '*.zip')
|
fingerprint(targets: '*.zip')
|
||||||
}
|
}
|
||||||
@ -57,8 +61,8 @@ pipeline {
|
|||||||
stage('Sign') {
|
stage('Sign') {
|
||||||
steps {
|
steps {
|
||||||
sh 'ls -l'
|
sh 'ls -l'
|
||||||
sh 'gpg --batch --detach-sign -o ${CI_OUTPUT_NAME}-1.0.1.${BUILD_NUMBER}_x64.zip.gpg ${CI_OUTPUT_NAME}-1.0.1.${BUILD_NUMBER}_x64.zip'
|
sh 'gpg --batch --detach-sign -o ${CI_OUTPUT_NAME}-${CI_VERSION}.${BUILD_NUMBER}_x64.zip.gpg ${CI_OUTPUT_NAME}-${CI_VERSION}.${BUILD_NUMBER}_x64.zip'
|
||||||
sh 'gpg --batch --detach-sign -o ${CI_OUTPUT_NAME}-1.0.1.${BUILD_NUMBER}_mingw64.zip.gpg ${CI_OUTPUT_NAME}-1.0.1.${BUILD_NUMBER}_mingw64.zip'
|
sh 'gpg --batch --detach-sign -o ${CI_OUTPUT_NAME}-${CI_VERSION}.${BUILD_NUMBER}_mingw64.zip.gpg ${CI_OUTPUT_NAME}-${CI_VERSION}.${BUILD_NUMBER}_mingw64.zip'
|
||||||
archiveArtifacts(artifacts: '*.gpg')
|
archiveArtifacts(artifacts: '*.gpg')
|
||||||
fingerprint(targets: '*.gpg')
|
fingerprint(targets: '*.gpg')
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user