Guest User

Untitled

a guest
Jun 29th, 2021
16
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.61 KB | None | 0 0
  1. pipeline {
  2. agent {
  3. label 'rdt'
  4. }
  5. environment {
  6. LANG='en_US.UTF-8'
  7. }
  8. parameters {
  9. string(name: 'PROJECT_BRANCH', description: 'Branch')
  10. }
  11. stages {
  12. stage('Checkout') {
  13. steps {
  14. checkout([$class: 'GitSCM', branches: [[name: "*/${params.PROJECT_BRANCH}"]], extensions: [[$class: 'RelativeTargetDirectory', relativeTargetDir: 'src']], userRemoteConfigs: [[credentialsId: 'xxx', url: 'http://yyy']]])
  15. }
  16. }
  17. stage('Show environment') {
  18. steps {
  19. sh 'set'
  20. }
  21. }
  22. stage('Prepare links') {
  23. steps {
  24. dir('src/rdt') {
  25. sh 'ln -sf ../client/thirdparty/'
  26. }
  27. }
  28. }
  29. stage('Prepare build directory') {
  30. when {
  31. expression {
  32. !fileExists('build')
  33. }
  34. }
  35. steps {
  36. fileOperations([folderCreateOperation('build')])
  37. }
  38. }
  39. stage('Build') {
  40. steps {
  41. dir('build') {
  42. cmake arguments: '-G "Unix Makefiles" -DCMAKE_INSTALL_PREFIX= -DCMAKE_BUILD_TYPE=Release ../src/rdt', installation: 'CMake'
  43. sh 'make -j 4'
  44. }
  45. }
  46. }
  47. stage('Install') {
  48. steps {
  49. dir('build') {
  50. sh "make DESTDIR=${env.WORKSPACE}/bin install"
  51. deleteDir()
  52. }
  53. }
  54. }
  55. }
  56. }
  57.  
Advertisement
Add Comment
Please, Sign In to add comment