@catladder/pipeline 3.25.0 โ†’ 3.26.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (73) hide show
  1. package/dist/build/custom/testJob.js +1 -2
  2. package/dist/build/node/testJob.js +1 -2
  3. package/dist/build/rails/test.js +1 -2
  4. package/dist/constants.js +1 -1
  5. package/dist/pipeline/agent/createAgentReviewJob.js +1 -0
  6. package/dist/pipeline/agent/shared.d.ts +1 -1
  7. package/dist/pipeline/agent/shared.js +0 -1
  8. package/dist/pipeline/createMainPipeline.js +1 -0
  9. package/dist/pipeline/gitlab/cache.d.ts +9 -0
  10. package/dist/pipeline/gitlab/cache.js +47 -0
  11. package/dist/pipeline/gitlab/createGitlabJobs.js +7 -7
  12. package/dist/tsconfig.tsbuildinfo +1 -1
  13. package/dist/types/jobs.d.ts +2 -3
  14. package/examples/__snapshots__/automatic-releases.test.ts.snap +127 -21
  15. package/examples/__snapshots__/cloud-run-health-check-defaults.test.ts.snap +127 -21
  16. package/examples/__snapshots__/cloud-run-health-check-only-startup.test.ts.snap +127 -21
  17. package/examples/__snapshots__/cloud-run-health-check.test.ts.snap +127 -21
  18. package/examples/__snapshots__/cloud-run-http2.test.ts.snap +127 -21
  19. package/examples/__snapshots__/cloud-run-memory-limit.test.ts.snap +127 -21
  20. package/examples/__snapshots__/cloud-run-meteor-with-worker.test.ts.snap +127 -21
  21. package/examples/__snapshots__/cloud-run-nextjs.test.ts.snap +130 -22
  22. package/examples/__snapshots__/cloud-run-no-cpu-throttling.test.ts.snap +127 -21
  23. package/examples/__snapshots__/cloud-run-no-service.test.ts.snap +127 -21
  24. package/examples/__snapshots__/cloud-run-non-public.test.ts.snap +127 -21
  25. package/examples/__snapshots__/cloud-run-post-stop-job.test.ts.snap +127 -21
  26. package/examples/__snapshots__/cloud-run-service-custom-vpc-connector.test.ts.snap +127 -21
  27. package/examples/__snapshots__/cloud-run-service-custom-vpc.test.ts.snap +127 -21
  28. package/examples/__snapshots__/cloud-run-service-gen2.test.ts.snap +127 -21
  29. package/examples/__snapshots__/cloud-run-service-increase-timout.test.ts.snap +127 -21
  30. package/examples/__snapshots__/cloud-run-service-with-volumes.test.ts.snap +127 -21
  31. package/examples/__snapshots__/cloud-run-storybook.test.ts.snap +9 -3
  32. package/examples/__snapshots__/cloud-run-with-agents.test.ts.snap +130 -22
  33. package/examples/__snapshots__/cloud-run-with-gpu.test.ts.snap +127 -21
  34. package/examples/__snapshots__/cloud-run-with-ngnix.test.ts.snap +127 -21
  35. package/examples/__snapshots__/cloud-run-with-sql-legacy-jobs.test.ts.snap +127 -21
  36. package/examples/__snapshots__/cloud-run-with-sql-multiple-dbs.test.ts.snap +381 -63
  37. package/examples/__snapshots__/cloud-run-with-sql-reuse-db.test.ts.snap +254 -42
  38. package/examples/__snapshots__/cloud-run-with-sql.test.ts.snap +127 -21
  39. package/examples/__snapshots__/cloud-run-with-worker.test.ts.snap +127 -21
  40. package/examples/__snapshots__/custom-build-job-with-tests.test.ts.snap +93 -22
  41. package/examples/__snapshots__/custom-deploy.test.ts.snap +127 -21
  42. package/examples/__snapshots__/custom-envs.test.ts.snap +320 -32
  43. package/examples/__snapshots__/custom-verify-job.test.ts.snap +130 -22
  44. package/examples/__snapshots__/git-submodule.test.ts.snap +127 -21
  45. package/examples/__snapshots__/kubernetes-application-customization.test.ts.snap +127 -21
  46. package/examples/__snapshots__/kubernetes-with-cloud-sql.test.ts.snap +127 -21
  47. package/examples/__snapshots__/kubernetes-with-jobs.test.ts.snap +254 -42
  48. package/examples/__snapshots__/kubernetes-with-mongodb.test.ts.snap +127 -21
  49. package/examples/__snapshots__/local-dot-env.test.ts.snap +127 -21
  50. package/examples/__snapshots__/meteor-kubernetes.test.ts.snap +127 -21
  51. package/examples/__snapshots__/modify-generated-files.test.ts.snap +118 -14
  52. package/examples/__snapshots__/modify-generated-yaml.test.ts.snap +118 -14
  53. package/examples/__snapshots__/multiline-var.test.ts.snap +381 -63
  54. package/examples/__snapshots__/native-app.test.ts.snap +257 -41
  55. package/examples/__snapshots__/node-build-with-custom-image.test.ts.snap +127 -21
  56. package/examples/__snapshots__/node-build-with-docker-additions.test.ts.snap +127 -21
  57. package/examples/__snapshots__/override-secrets.test.ts.snap +127 -21
  58. package/examples/__snapshots__/rails-k8s-with-worker-dockerfile.test.ts.snap +84 -22
  59. package/examples/__snapshots__/rails-k8s-with-worker.test.ts.snap +84 -22
  60. package/examples/__snapshots__/referencing-other-vars.test.ts.snap +381 -63
  61. package/examples/__snapshots__/wait-for-other-deploy.test.ts.snap +248 -40
  62. package/examples/__snapshots__/workspace-api-www-turbo-cache.test.ts.snap +139 -29
  63. package/examples/__snapshots__/workspace-api-www.test.ts.snap +139 -29
  64. package/package.json +1 -1
  65. package/src/build/custom/testJob.ts +0 -1
  66. package/src/build/node/testJob.ts +0 -1
  67. package/src/build/rails/test.ts +0 -1
  68. package/src/pipeline/agent/createAgentReviewJob.ts +1 -0
  69. package/src/pipeline/agent/shared.ts +2 -2
  70. package/src/pipeline/createMainPipeline.ts +1 -0
  71. package/src/pipeline/gitlab/cache.ts +49 -0
  72. package/src/pipeline/gitlab/createGitlabJobs.ts +7 -9
  73. package/src/types/jobs.ts +2 -3
@@ -103,7 +103,7 @@ before_script:
103
103
  local section_title="\${1}"
104
104
  echo -e "section_end:\`date +%s\`:\${section_title}\\r\\e[0K"
105
105
  }
106
- api ๐Ÿ›ก audit:
106
+ 'api ๐Ÿ›ก audit | dev ':
107
107
  stage: test
108
108
  image: path/to/docker/jobs-default:the-version
109
109
  variables:
@@ -120,9 +120,6 @@ api ๐Ÿ›ก audit:
120
120
  - when: never
121
121
  if: $CI_PIPELINE_SOURCE == "trigger"
122
122
  - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && $CI_COMMIT_MESSAGE !~ /^chore\\(release\\).*/
123
- - when: never
124
- if: $CI_PIPELINE_SOURCE == "trigger"
125
- - if: $CI_MERGE_REQUEST_ID
126
123
  needs: []
127
124
  retry: &a1
128
125
  max: 2
@@ -131,7 +128,7 @@ api ๐Ÿ›ก audit:
131
128
  - stuck_or_timeout_failure
132
129
  interruptible: true
133
130
  allow_failure: true
134
- api ๐Ÿ‘ฎ lint:
131
+ 'api ๐Ÿ‘ฎ lint | dev ':
135
132
  stage: test
136
133
  image: path/to/docker/jobs-default:the-version
137
134
  variables:
@@ -168,13 +165,10 @@ api ๐Ÿ‘ฎ lint:
168
165
  - when: never
169
166
  if: $CI_PIPELINE_SOURCE == "trigger"
170
167
  - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && $CI_COMMIT_MESSAGE !~ /^chore\\(release\\).*/
171
- - when: never
172
- if: $CI_PIPELINE_SOURCE == "trigger"
173
- - if: $CI_MERGE_REQUEST_ID
174
168
  needs: []
175
169
  retry: *a1
176
170
  interruptible: true
177
- api ๐Ÿงช test:
171
+ 'api ๐Ÿงช test | dev ':
178
172
  stage: test
179
173
  image: path/to/docker/jobs-testing-chrome:the-version
180
174
  variables:
@@ -211,9 +205,6 @@ api ๐Ÿงช test:
211
205
  - when: never
212
206
  if: $CI_PIPELINE_SOURCE == "trigger"
213
207
  - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && $CI_COMMIT_MESSAGE !~ /^chore\\(release\\).*/
214
- - when: never
215
- if: $CI_PIPELINE_SOURCE == "trigger"
216
- - if: $CI_MERGE_REQUEST_ID
217
208
  needs: []
218
209
  retry: *a1
219
210
  interruptible: true
@@ -478,17 +469,17 @@ api ๐Ÿงช test:
478
469
  - when: on_success
479
470
  if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && $CI_COMMIT_MESSAGE !~ /^chore\\(release\\).*/
480
471
  needs:
481
- - job: api ๐Ÿ‘ฎ lint
472
+ - job: 'api ๐Ÿ‘ฎ lint | dev '
482
473
  artifacts: false
483
474
  - job: 'api ๐Ÿ”จ app | dev '
484
475
  artifacts: false
485
476
  - job: 'api ๐Ÿ”จ docker | dev '
486
477
  artifacts: false
487
- - job: api ๐Ÿงช test
478
+ - job: 'api ๐Ÿงช test | dev '
488
479
  artifacts: false
489
480
  - job: 'api ๐Ÿงพ sbom | dev '
490
481
  artifacts: true
491
- - job: api ๐Ÿ›ก audit
482
+ - job: 'api ๐Ÿ›ก audit | dev '
492
483
  artifacts: false
493
484
  retry: *a1
494
485
  interruptible: true
@@ -527,6 +518,115 @@ api ๐Ÿงช test:
527
518
  retry: *a1
528
519
  interruptible: true
529
520
  allow_failure: true
521
+ 'api ๐Ÿ›ก audit | review ':
522
+ stage: test
523
+ image: path/to/docker/jobs-default:the-version
524
+ variables:
525
+ KUBERNETES_CPU_REQUEST: '0.45'
526
+ KUBERNETES_MEMORY_REQUEST: 1Gi
527
+ KUBERNETES_MEMORY_LIMIT: 4Gi
528
+ script:
529
+ - collapseable_section_start "injectvars" "Injecting variables"
530
+ - export APP_PATH="api"
531
+ - collapseable_section_end "injectvars"
532
+ - cd api
533
+ - yarn npm audit --environment production
534
+ rules:
535
+ - when: never
536
+ if: $CI_PIPELINE_SOURCE == "trigger"
537
+ - if: $CI_MERGE_REQUEST_ID
538
+ needs: []
539
+ retry: *a1
540
+ interruptible: true
541
+ allow_failure: true
542
+ 'api ๐Ÿ‘ฎ lint | review ':
543
+ stage: test
544
+ image: path/to/docker/jobs-default:the-version
545
+ variables:
546
+ KUBERNETES_CPU_REQUEST: '0.45'
547
+ KUBERNETES_MEMORY_REQUEST: 1Gi
548
+ KUBERNETES_MEMORY_LIMIT: 4Gi
549
+ script:
550
+ - collapseable_section_start "injectvars" "Injecting variables"
551
+ - export APP_PATH="api"
552
+ - collapseable_section_end "injectvars"
553
+ - collapseable_section_start "nodeinstall" "Ensure node version"
554
+ - if [ -f ~/.nvm/nvm.sh ]; then source ~/.nvm/nvm.sh; fi
555
+ - if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi
556
+ - collapseable_section_end "nodeinstall"
557
+ - cd api
558
+ - collapseable_section_start "nodeinstall" "Ensure node version"
559
+ - if [ -f ~/.nvm/nvm.sh ]; then source ~/.nvm/nvm.sh; fi
560
+ - if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi
561
+ - collapseable_section_end "nodeinstall"
562
+ - collapseable_section_start "yarninstall" "Yarn install"
563
+ - yarn install --immutable
564
+ - collapseable_section_end "yarninstall"
565
+ - yarn lint
566
+ cache:
567
+ - key: api-yarn-mr$CI_MERGE_REQUEST_IID
568
+ policy: pull-push
569
+ paths:
570
+ - api/.yarn
571
+ fallback_keys:
572
+ - api-yarn
573
+ - key: api-node-modules-mr$CI_MERGE_REQUEST_IID
574
+ policy: pull-push
575
+ paths:
576
+ - api/node_modules
577
+ fallback_keys:
578
+ - api-node-modules
579
+ rules:
580
+ - when: never
581
+ if: $CI_PIPELINE_SOURCE == "trigger"
582
+ - if: $CI_MERGE_REQUEST_ID
583
+ needs: []
584
+ retry: *a1
585
+ interruptible: true
586
+ 'api ๐Ÿงช test | review ':
587
+ stage: test
588
+ image: path/to/docker/jobs-testing-chrome:the-version
589
+ variables:
590
+ KUBERNETES_CPU_REQUEST: '0.45'
591
+ KUBERNETES_MEMORY_REQUEST: 1Gi
592
+ KUBERNETES_MEMORY_LIMIT: 4Gi
593
+ script:
594
+ - collapseable_section_start "injectvars" "Injecting variables"
595
+ - export APP_PATH="api"
596
+ - collapseable_section_end "injectvars"
597
+ - collapseable_section_start "nodeinstall" "Ensure node version"
598
+ - if [ -f ~/.nvm/nvm.sh ]; then source ~/.nvm/nvm.sh; fi
599
+ - if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi
600
+ - collapseable_section_end "nodeinstall"
601
+ - cd api
602
+ - collapseable_section_start "nodeinstall" "Ensure node version"
603
+ - if [ -f ~/.nvm/nvm.sh ]; then source ~/.nvm/nvm.sh; fi
604
+ - if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi
605
+ - collapseable_section_end "nodeinstall"
606
+ - collapseable_section_start "yarninstall" "Yarn install"
607
+ - yarn install --immutable
608
+ - collapseable_section_end "yarninstall"
609
+ - yarn test
610
+ cache:
611
+ - key: api-yarn-mr$CI_MERGE_REQUEST_IID
612
+ policy: pull-push
613
+ paths:
614
+ - api/.yarn
615
+ fallback_keys:
616
+ - api-yarn
617
+ - key: api-node-modules-mr$CI_MERGE_REQUEST_IID
618
+ policy: pull-push
619
+ paths:
620
+ - api/node_modules
621
+ fallback_keys:
622
+ - api-node-modules
623
+ rules:
624
+ - when: never
625
+ if: $CI_PIPELINE_SOURCE == "trigger"
626
+ - if: $CI_MERGE_REQUEST_ID
627
+ needs: []
628
+ retry: *a1
629
+ interruptible: true
530
630
  'api ๐Ÿ”จ app | review ':
531
631
  stage: build
532
632
  image: path/to/docker/jobs-default:the-version
@@ -584,14 +684,18 @@ api ๐Ÿงช test:
584
684
  - collapseable_section_end "yarninstall"
585
685
  - yarn build
586
686
  cache:
587
- - key: api-yarn
687
+ - key: api-yarn-mr$CI_MERGE_REQUEST_IID
588
688
  policy: pull-push
589
689
  paths:
590
690
  - api/.yarn
591
- - key: api-node-modules
691
+ fallback_keys:
692
+ - api-yarn
693
+ - key: api-node-modules-mr$CI_MERGE_REQUEST_IID
592
694
  policy: pull-push
593
695
  paths:
594
696
  - api/node_modules
697
+ fallback_keys:
698
+ - api-node-modules
595
699
  artifacts:
596
700
  paths:
597
701
  - api/__build_info.json
@@ -658,10 +762,12 @@ api ๐Ÿงช test:
658
762
  - docker push $DOCKER_CACHE_IMAGE
659
763
  - collapseable_section_end "docker-push"
660
764
  cache:
661
- - key: api-yarn
765
+ - key: api-yarn-mr$CI_MERGE_REQUEST_IID
662
766
  policy: pull
663
767
  paths:
664
768
  - api/.yarn
769
+ fallback_keys:
770
+ - api-yarn
665
771
  rules:
666
772
  - when: never
667
773
  if: $CI_PIPELINE_SOURCE == "trigger"
@@ -791,17 +897,17 @@ api ๐Ÿงช test:
791
897
  - when: on_success
792
898
  if: $CI_MERGE_REQUEST_ID
793
899
  needs:
794
- - job: api ๐Ÿ‘ฎ lint
900
+ - job: 'api ๐Ÿ‘ฎ lint | review '
795
901
  artifacts: false
796
902
  - job: 'api ๐Ÿ”จ app | review '
797
903
  artifacts: false
798
904
  - job: 'api ๐Ÿ”จ docker | review '
799
905
  artifacts: false
800
- - job: api ๐Ÿงช test
906
+ - job: 'api ๐Ÿงช test | review '
801
907
  artifacts: false
802
908
  - job: 'api ๐Ÿงพ sbom | review '
803
909
  artifacts: true
804
- - job: api ๐Ÿ›ก audit
910
+ - job: 'api ๐Ÿ›ก audit | review '
805
911
  artifacts: false
806
912
  retry: *a1
807
913
  interruptible: true
@@ -103,7 +103,7 @@ before_script:
103
103
  local section_title="\${1}"
104
104
  echo -e "section_end:\`date +%s\`:\${section_title}\\r\\e[0K"
105
105
  }
106
- api ๐Ÿ›ก audit:
106
+ 'api ๐Ÿ›ก audit | dev ':
107
107
  stage: test
108
108
  image: path/to/docker/jobs-default:the-version
109
109
  variables:
@@ -120,9 +120,6 @@ api ๐Ÿ›ก audit:
120
120
  - when: never
121
121
  if: $CI_PIPELINE_SOURCE == "trigger"
122
122
  - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && $CI_COMMIT_MESSAGE !~ /^chore\\(release\\).*/
123
- - when: never
124
- if: $CI_PIPELINE_SOURCE == "trigger"
125
- - if: $CI_MERGE_REQUEST_ID
126
123
  needs: []
127
124
  retry: &a1
128
125
  max: 2
@@ -131,7 +128,7 @@ api ๐Ÿ›ก audit:
131
128
  - stuck_or_timeout_failure
132
129
  interruptible: true
133
130
  allow_failure: true
134
- api ๐Ÿ‘ฎ lint:
131
+ 'api ๐Ÿ‘ฎ lint | dev ':
135
132
  stage: test
136
133
  image: path/to/docker/jobs-default:the-version
137
134
  variables:
@@ -168,13 +165,10 @@ api ๐Ÿ‘ฎ lint:
168
165
  - when: never
169
166
  if: $CI_PIPELINE_SOURCE == "trigger"
170
167
  - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && $CI_COMMIT_MESSAGE !~ /^chore\\(release\\).*/
171
- - when: never
172
- if: $CI_PIPELINE_SOURCE == "trigger"
173
- - if: $CI_MERGE_REQUEST_ID
174
168
  needs: []
175
169
  retry: *a1
176
170
  interruptible: true
177
- api ๐Ÿงช test:
171
+ 'api ๐Ÿงช test | dev ':
178
172
  stage: test
179
173
  image: path/to/docker/jobs-testing-chrome:the-version
180
174
  variables:
@@ -211,9 +205,6 @@ api ๐Ÿงช test:
211
205
  - when: never
212
206
  if: $CI_PIPELINE_SOURCE == "trigger"
213
207
  - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && $CI_COMMIT_MESSAGE !~ /^chore\\(release\\).*/
214
- - when: never
215
- if: $CI_PIPELINE_SOURCE == "trigger"
216
- - if: $CI_MERGE_REQUEST_ID
217
208
  needs: []
218
209
  retry: *a1
219
210
  interruptible: true
@@ -478,17 +469,17 @@ api ๐Ÿงช test:
478
469
  - when: on_success
479
470
  if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && $CI_COMMIT_MESSAGE !~ /^chore\\(release\\).*/
480
471
  needs:
481
- - job: api ๐Ÿ‘ฎ lint
472
+ - job: 'api ๐Ÿ‘ฎ lint | dev '
482
473
  artifacts: false
483
474
  - job: 'api ๐Ÿ”จ app | dev '
484
475
  artifacts: false
485
476
  - job: 'api ๐Ÿ”จ docker | dev '
486
477
  artifacts: false
487
- - job: api ๐Ÿงช test
478
+ - job: 'api ๐Ÿงช test | dev '
488
479
  artifacts: false
489
480
  - job: 'api ๐Ÿงพ sbom | dev '
490
481
  artifacts: true
491
- - job: api ๐Ÿ›ก audit
482
+ - job: 'api ๐Ÿ›ก audit | dev '
492
483
  artifacts: false
493
484
  retry: *a1
494
485
  interruptible: true
@@ -527,6 +518,115 @@ api ๐Ÿงช test:
527
518
  retry: *a1
528
519
  interruptible: true
529
520
  allow_failure: true
521
+ 'api ๐Ÿ›ก audit | review ':
522
+ stage: test
523
+ image: path/to/docker/jobs-default:the-version
524
+ variables:
525
+ KUBERNETES_CPU_REQUEST: '0.45'
526
+ KUBERNETES_MEMORY_REQUEST: 1Gi
527
+ KUBERNETES_MEMORY_LIMIT: 4Gi
528
+ script:
529
+ - collapseable_section_start "injectvars" "Injecting variables"
530
+ - export APP_PATH="api"
531
+ - collapseable_section_end "injectvars"
532
+ - cd api
533
+ - yarn npm audit --environment production
534
+ rules:
535
+ - when: never
536
+ if: $CI_PIPELINE_SOURCE == "trigger"
537
+ - if: $CI_MERGE_REQUEST_ID
538
+ needs: []
539
+ retry: *a1
540
+ interruptible: true
541
+ allow_failure: true
542
+ 'api ๐Ÿ‘ฎ lint | review ':
543
+ stage: test
544
+ image: path/to/docker/jobs-default:the-version
545
+ variables:
546
+ KUBERNETES_CPU_REQUEST: '0.45'
547
+ KUBERNETES_MEMORY_REQUEST: 1Gi
548
+ KUBERNETES_MEMORY_LIMIT: 4Gi
549
+ script:
550
+ - collapseable_section_start "injectvars" "Injecting variables"
551
+ - export APP_PATH="api"
552
+ - collapseable_section_end "injectvars"
553
+ - collapseable_section_start "nodeinstall" "Ensure node version"
554
+ - if [ -f ~/.nvm/nvm.sh ]; then source ~/.nvm/nvm.sh; fi
555
+ - if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi
556
+ - collapseable_section_end "nodeinstall"
557
+ - cd api
558
+ - collapseable_section_start "nodeinstall" "Ensure node version"
559
+ - if [ -f ~/.nvm/nvm.sh ]; then source ~/.nvm/nvm.sh; fi
560
+ - if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi
561
+ - collapseable_section_end "nodeinstall"
562
+ - collapseable_section_start "yarninstall" "Yarn install"
563
+ - yarn install --immutable
564
+ - collapseable_section_end "yarninstall"
565
+ - yarn lint
566
+ cache:
567
+ - key: api-yarn-mr$CI_MERGE_REQUEST_IID
568
+ policy: pull-push
569
+ paths:
570
+ - api/.yarn
571
+ fallback_keys:
572
+ - api-yarn
573
+ - key: api-node-modules-mr$CI_MERGE_REQUEST_IID
574
+ policy: pull-push
575
+ paths:
576
+ - api/node_modules
577
+ fallback_keys:
578
+ - api-node-modules
579
+ rules:
580
+ - when: never
581
+ if: $CI_PIPELINE_SOURCE == "trigger"
582
+ - if: $CI_MERGE_REQUEST_ID
583
+ needs: []
584
+ retry: *a1
585
+ interruptible: true
586
+ 'api ๐Ÿงช test | review ':
587
+ stage: test
588
+ image: path/to/docker/jobs-testing-chrome:the-version
589
+ variables:
590
+ KUBERNETES_CPU_REQUEST: '0.45'
591
+ KUBERNETES_MEMORY_REQUEST: 1Gi
592
+ KUBERNETES_MEMORY_LIMIT: 4Gi
593
+ script:
594
+ - collapseable_section_start "injectvars" "Injecting variables"
595
+ - export APP_PATH="api"
596
+ - collapseable_section_end "injectvars"
597
+ - collapseable_section_start "nodeinstall" "Ensure node version"
598
+ - if [ -f ~/.nvm/nvm.sh ]; then source ~/.nvm/nvm.sh; fi
599
+ - if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi
600
+ - collapseable_section_end "nodeinstall"
601
+ - cd api
602
+ - collapseable_section_start "nodeinstall" "Ensure node version"
603
+ - if [ -f ~/.nvm/nvm.sh ]; then source ~/.nvm/nvm.sh; fi
604
+ - if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi
605
+ - collapseable_section_end "nodeinstall"
606
+ - collapseable_section_start "yarninstall" "Yarn install"
607
+ - yarn install --immutable
608
+ - collapseable_section_end "yarninstall"
609
+ - yarn test
610
+ cache:
611
+ - key: api-yarn-mr$CI_MERGE_REQUEST_IID
612
+ policy: pull-push
613
+ paths:
614
+ - api/.yarn
615
+ fallback_keys:
616
+ - api-yarn
617
+ - key: api-node-modules-mr$CI_MERGE_REQUEST_IID
618
+ policy: pull-push
619
+ paths:
620
+ - api/node_modules
621
+ fallback_keys:
622
+ - api-node-modules
623
+ rules:
624
+ - when: never
625
+ if: $CI_PIPELINE_SOURCE == "trigger"
626
+ - if: $CI_MERGE_REQUEST_ID
627
+ needs: []
628
+ retry: *a1
629
+ interruptible: true
530
630
  'api ๐Ÿ”จ app | review ':
531
631
  stage: build
532
632
  image: path/to/docker/jobs-default:the-version
@@ -584,14 +684,18 @@ api ๐Ÿงช test:
584
684
  - collapseable_section_end "yarninstall"
585
685
  - yarn build
586
686
  cache:
587
- - key: api-yarn
687
+ - key: api-yarn-mr$CI_MERGE_REQUEST_IID
588
688
  policy: pull-push
589
689
  paths:
590
690
  - api/.yarn
591
- - key: api-node-modules
691
+ fallback_keys:
692
+ - api-yarn
693
+ - key: api-node-modules-mr$CI_MERGE_REQUEST_IID
592
694
  policy: pull-push
593
695
  paths:
594
696
  - api/node_modules
697
+ fallback_keys:
698
+ - api-node-modules
595
699
  artifacts:
596
700
  paths:
597
701
  - api/__build_info.json
@@ -658,10 +762,12 @@ api ๐Ÿงช test:
658
762
  - docker push $DOCKER_CACHE_IMAGE
659
763
  - collapseable_section_end "docker-push"
660
764
  cache:
661
- - key: api-yarn
765
+ - key: api-yarn-mr$CI_MERGE_REQUEST_IID
662
766
  policy: pull
663
767
  paths:
664
768
  - api/.yarn
769
+ fallback_keys:
770
+ - api-yarn
665
771
  rules:
666
772
  - when: never
667
773
  if: $CI_PIPELINE_SOURCE == "trigger"
@@ -791,17 +897,17 @@ api ๐Ÿงช test:
791
897
  - when: on_success
792
898
  if: $CI_MERGE_REQUEST_ID
793
899
  needs:
794
- - job: api ๐Ÿ‘ฎ lint
900
+ - job: 'api ๐Ÿ‘ฎ lint | review '
795
901
  artifacts: false
796
902
  - job: 'api ๐Ÿ”จ app | review '
797
903
  artifacts: false
798
904
  - job: 'api ๐Ÿ”จ docker | review '
799
905
  artifacts: false
800
- - job: api ๐Ÿงช test
906
+ - job: 'api ๐Ÿงช test | review '
801
907
  artifacts: false
802
908
  - job: 'api ๐Ÿงพ sbom | review '
803
909
  artifacts: true
804
- - job: api ๐Ÿ›ก audit
910
+ - job: 'api ๐Ÿ›ก audit | review '
805
911
  artifacts: false
806
912
  retry: *a1
807
913
  interruptible: true