Register
Login
Resources
Docs Blog Datasets Glossary Case Studies Tutorials & Webinars
Product
Data Engine LLMs Platform Enterprise
Pricing Explore
Connect to our Discord channel

Jenkinsfile 2.9 KB

You have to be logged in to leave a comment. Sign In
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
  1. pipeline {
  2. agent any
  3. options {
  4. skipDefaultCheckout(true)
  5. // Keep the 10 most recent builds
  6. buildDiscarder(logRotator(numToKeepStr: '10'))
  7. timestamps()
  8. }
  9. environment {
  10. PATH="/var/lib/jenkins/miniconda3/bin:$PATH"
  11. }
  12. stages {
  13. stage('Code pull') {
  14. steps {
  15. checkout scm
  16. }
  17. }
  18. stage('Run code for csv_dl_archiving') {
  19. when {
  20. branch 'csv_dl_archiving'
  21. }
  22. steps {
  23. echo 'Build venv for csv_dl_archiving'
  24. sh ''' python --version
  25. conda create --yes -n ${BUILD_TAG} python
  26. source activate ${BUILD_TAG}
  27. cp -r /home/justin/projects/lendingclub/user_creds .
  28. pip install -r requirements/csv_dl_archiving.txt
  29. cd scripts/csv_dl_archiving
  30. python -u download_and_check_csvs.py
  31. '''
  32. }
  33. }
  34. stage('Run code for csv_preparation') {
  35. when {
  36. branch 'csv_preparation'
  37. }
  38. steps {
  39. echo 'Build venv for csv_preparation'
  40. sh ''' python --version
  41. conda create --yes -n ${BUILD_TAG} python
  42. source activate ${BUILD_TAG}
  43. pip install -r requirements/csv_preparation.txt
  44. cd scripts/csv_preparation
  45. python -u unzip_csvs.py
  46. python -u merge_loan_info.py
  47. python -u clean_pmt_history_1.py
  48. python -u clean_pmt_history_2.py
  49. python -u clean_pmt_history_3.py
  50. python -u setup.py build_ext --inplace
  51. # move the .so file to current dir (scripts)
  52. find . -name "*.so" -exec mv {} . \\;
  53. python -u clean_loan_info.py
  54. '''
  55. }
  56. }
  57. stage('Run code for data_and_eval_preparation') {
  58. when {
  59. branch 'data_and_eval_preparation'
  60. }
  61. steps {
  62. echo 'Build venv for data_and_eval_preparation'
  63. sh ''' python --version
  64. conda create --yes -n ${BUILD_TAG} python
  65. source activate ${BUILD_TAG}
  66. pip install -r requirements/data_and_eval_preparation.txt
  67. cd scripts/data_and_eval_preparation
  68. python -u data_and_eval_preparation.py
  69. '''
  70. // cp -r /home/justin/projects/lendingclub/user_creds .
  71. }
  72. }
  73. }
  74. post {
  75. always {
  76. sh 'conda remove --yes -n ${BUILD_TAG} --all'
  77. }
  78. }
  79. }
Tip!

Press p or to see the previous file or, n or to see the next file

Comments

Loading...