Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- pipeline {
- agent {
- label 'rdt'
- }
- environment {
- LANG='en_US.UTF-8'
- }
- parameters {
- string(name: 'PROJECT_BRANCH', description: 'Branch')
- }
- stages {
- stage('Checkout') {
- steps {
- checkout([$class: 'GitSCM', branches: [[name: "*/${params.PROJECT_BRANCH}"]], extensions: [[$class: 'RelativeTargetDirectory', relativeTargetDir: 'src']], userRemoteConfigs: [[credentialsId: 'xxx', url: 'http://yyy']]])
- }
- }
- stage('Show environment') {
- steps {
- sh 'set'
- }
- }
- stage('Prepare links') {
- steps {
- dir('src/rdt') {
- sh 'ln -sf ../client/thirdparty/'
- }
- }
- }
- stage('Prepare build directory') {
- when {
- expression {
- !fileExists('build')
- }
- }
- steps {
- fileOperations([folderCreateOperation('build')])
- }
- }
- stage('Build') {
- steps {
- dir('build') {
- cmake arguments: '-G "Unix Makefiles" -DCMAKE_INSTALL_PREFIX= -DCMAKE_BUILD_TYPE=Release ../src/rdt', installation: 'CMake'
- sh 'make -j 4'
- }
- }
- }
- stage('Install') {
- steps {
- dir('build') {
- sh "make DESTDIR=${env.WORKSPACE}/bin install"
- deleteDir()
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment