backend: microservices-oriented architecture, clean-architecture design pattern, spring-boot, spring cloud gateway, spring cloud eureka et spring cloud config. - frontend: angular, observer rxjs

Jenkinsfile 2.4KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. CRON_SETTINGS = BRANCH_NAME == "master" ? '''H * * *'''
  2. pipeline {
  3. agent any //we tell jenkins to use any available agent
  4. triggers {
  5. cron(CRON_SETTINGS)
  6. }
  7. tools {
  8. maven 'Maven'
  9. jdk 'Java-17'
  10. nodejs 'NodeJS-v14.21.3'
  11. }
  12. stages {
  13. stage ('Build-service-1') {
  14. steps {
  15. dir('./spring-project-back/microservices-config-service'){ //enter in folder to locate pom.xml
  16. sh 'mvn -B -DskipTests clean verify'
  17. }
  18. }
  19. }
  20. stage ('Build-service-2') {
  21. steps {
  22. dir('./spring-project-back/microservices-registration-service'){
  23. sh 'mvn -B -DskipTests clean verify'
  24. }
  25. }
  26. }
  27. stage ('Build-service-3') {
  28. steps {
  29. dir ('./spring-project-back/backend-frontend-gateway-service'){
  30. sh 'mvn -B -DskipTests clean verify'
  31. }
  32. }
  33. }
  34. stage ('Build-service-4') {
  35. steps {
  36. dir('./spring-project-back/clean-archi-business-service-address/'){
  37. sh 'mvn -B -DskipTests clean verify'
  38. }
  39. }
  40. }
  41. stage ('Build-service-5'){
  42. steps {
  43. dir('./spring-project-back/clean-archi-business-service-company/'){
  44. sh 'mvn -B -DskipTests clean verify'
  45. }
  46. }
  47. }
  48. stage ('Build-service-6'){
  49. steps{
  50. dir('./spring-project-back/clean-archi-business-service-employee/'){
  51. sh 'mvn -B -DskipTests clean verify'
  52. }
  53. }
  54. }
  55. stage ('Build-service-7'){
  56. steps {
  57. dir('./spring-project-back/clean-archi-business-service-project/'){
  58. sh 'mvn -B -DskipTests clean verify'
  59. }
  60. }
  61. }
  62. stage('NPM install'){
  63. steps{
  64. dir('./angular-project-front'){//enter in angular project to run some commands
  65. sh 'npm install'
  66. }
  67. }
  68. }
  69. stage('Build-frontend'){
  70. steps{
  71. dir('./angular-project-front'){//enter in angular project to run some commands
  72. sh 'ng build'
  73. }
  74. }
  75. }
  76. }
  77. }

Powered by TurnKey Linux.