@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
@@ -521,17 +512,17 @@ api ๐Ÿงช test:
521
512
  - when: on_success
522
513
  if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && $CI_COMMIT_MESSAGE !~ /^chore\\(release\\).*/
523
514
  needs:
524
- - job: api ๐Ÿ‘ฎ lint
515
+ - job: 'api ๐Ÿ‘ฎ lint | dev '
525
516
  artifacts: false
526
517
  - job: 'api ๐Ÿ”จ app | dev '
527
518
  artifacts: false
528
519
  - job: 'api ๐Ÿ”จ docker | dev '
529
520
  artifacts: false
530
- - job: api ๐Ÿงช test
521
+ - job: 'api ๐Ÿงช test | dev '
531
522
  artifacts: false
532
523
  - job: 'api ๐Ÿงพ sbom | dev '
533
524
  artifacts: true
534
- - job: api ๐Ÿ›ก audit
525
+ - job: 'api ๐Ÿ›ก audit | dev '
535
526
  artifacts: false
536
527
  retry: *a1
537
528
  interruptible: true
@@ -640,6 +631,115 @@ api ๐Ÿงช test:
640
631
  retry: *a1
641
632
  interruptible: true
642
633
  allow_failure: true
634
+ 'api ๐Ÿ›ก audit | review ':
635
+ stage: test
636
+ image: path/to/docker/jobs-default:the-version
637
+ variables:
638
+ KUBERNETES_CPU_REQUEST: '0.45'
639
+ KUBERNETES_MEMORY_REQUEST: 1Gi
640
+ KUBERNETES_MEMORY_LIMIT: 4Gi
641
+ script:
642
+ - collapseable_section_start "injectvars" "Injecting variables"
643
+ - export APP_PATH="api"
644
+ - collapseable_section_end "injectvars"
645
+ - cd api
646
+ - yarn npm audit --environment production
647
+ rules:
648
+ - when: never
649
+ if: $CI_PIPELINE_SOURCE == "trigger"
650
+ - if: $CI_MERGE_REQUEST_ID
651
+ needs: []
652
+ retry: *a1
653
+ interruptible: true
654
+ allow_failure: true
655
+ 'api ๐Ÿ‘ฎ lint | review ':
656
+ stage: test
657
+ image: path/to/docker/jobs-default:the-version
658
+ variables:
659
+ KUBERNETES_CPU_REQUEST: '0.45'
660
+ KUBERNETES_MEMORY_REQUEST: 1Gi
661
+ KUBERNETES_MEMORY_LIMIT: 4Gi
662
+ script:
663
+ - collapseable_section_start "injectvars" "Injecting variables"
664
+ - export APP_PATH="api"
665
+ - collapseable_section_end "injectvars"
666
+ - collapseable_section_start "nodeinstall" "Ensure node version"
667
+ - if [ -f ~/.nvm/nvm.sh ]; then source ~/.nvm/nvm.sh; fi
668
+ - if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi
669
+ - collapseable_section_end "nodeinstall"
670
+ - cd api
671
+ - collapseable_section_start "nodeinstall" "Ensure node version"
672
+ - if [ -f ~/.nvm/nvm.sh ]; then source ~/.nvm/nvm.sh; fi
673
+ - if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi
674
+ - collapseable_section_end "nodeinstall"
675
+ - collapseable_section_start "yarninstall" "Yarn install"
676
+ - yarn install --immutable
677
+ - collapseable_section_end "yarninstall"
678
+ - yarn lint
679
+ cache:
680
+ - key: api-yarn-mr$CI_MERGE_REQUEST_IID
681
+ policy: pull-push
682
+ paths:
683
+ - api/.yarn
684
+ fallback_keys:
685
+ - api-yarn
686
+ - key: api-node-modules-mr$CI_MERGE_REQUEST_IID
687
+ policy: pull-push
688
+ paths:
689
+ - api/node_modules
690
+ fallback_keys:
691
+ - api-node-modules
692
+ rules:
693
+ - when: never
694
+ if: $CI_PIPELINE_SOURCE == "trigger"
695
+ - if: $CI_MERGE_REQUEST_ID
696
+ needs: []
697
+ retry: *a1
698
+ interruptible: true
699
+ 'api ๐Ÿงช test | review ':
700
+ stage: test
701
+ image: path/to/docker/jobs-testing-chrome:the-version
702
+ variables:
703
+ KUBERNETES_CPU_REQUEST: '0.45'
704
+ KUBERNETES_MEMORY_REQUEST: 1Gi
705
+ KUBERNETES_MEMORY_LIMIT: 4Gi
706
+ script:
707
+ - collapseable_section_start "injectvars" "Injecting variables"
708
+ - export APP_PATH="api"
709
+ - collapseable_section_end "injectvars"
710
+ - collapseable_section_start "nodeinstall" "Ensure node version"
711
+ - if [ -f ~/.nvm/nvm.sh ]; then source ~/.nvm/nvm.sh; fi
712
+ - if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi
713
+ - collapseable_section_end "nodeinstall"
714
+ - cd api
715
+ - collapseable_section_start "nodeinstall" "Ensure node version"
716
+ - if [ -f ~/.nvm/nvm.sh ]; then source ~/.nvm/nvm.sh; fi
717
+ - if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi
718
+ - collapseable_section_end "nodeinstall"
719
+ - collapseable_section_start "yarninstall" "Yarn install"
720
+ - yarn install --immutable
721
+ - collapseable_section_end "yarninstall"
722
+ - yarn test
723
+ cache:
724
+ - key: api-yarn-mr$CI_MERGE_REQUEST_IID
725
+ policy: pull-push
726
+ paths:
727
+ - api/.yarn
728
+ fallback_keys:
729
+ - api-yarn
730
+ - key: api-node-modules-mr$CI_MERGE_REQUEST_IID
731
+ policy: pull-push
732
+ paths:
733
+ - api/node_modules
734
+ fallback_keys:
735
+ - api-node-modules
736
+ rules:
737
+ - when: never
738
+ if: $CI_PIPELINE_SOURCE == "trigger"
739
+ - if: $CI_MERGE_REQUEST_ID
740
+ needs: []
741
+ retry: *a1
742
+ interruptible: true
643
743
  'api ๐Ÿ”จ app | review ':
644
744
  stage: build
645
745
  image: path/to/docker/jobs-default:the-version
@@ -681,14 +781,18 @@ api ๐Ÿงช test:
681
781
  - collapseable_section_end "yarninstall"
682
782
  - yarn build
683
783
  cache:
684
- - key: api-yarn
784
+ - key: api-yarn-mr$CI_MERGE_REQUEST_IID
685
785
  policy: pull-push
686
786
  paths:
687
787
  - api/.yarn
688
- - key: api-node-modules
788
+ fallback_keys:
789
+ - api-yarn
790
+ - key: api-node-modules-mr$CI_MERGE_REQUEST_IID
689
791
  policy: pull-push
690
792
  paths:
691
793
  - api/node_modules
794
+ fallback_keys:
795
+ - api-node-modules
692
796
  artifacts:
693
797
  paths:
694
798
  - api/__build_info.json
@@ -754,10 +858,12 @@ api ๐Ÿงช test:
754
858
  - docker push $DOCKER_CACHE_IMAGE
755
859
  - collapseable_section_end "docker-push"
756
860
  cache:
757
- - key: api-yarn
861
+ - key: api-yarn-mr$CI_MERGE_REQUEST_IID
758
862
  policy: pull
759
863
  paths:
760
864
  - api/.yarn
865
+ fallback_keys:
866
+ - api-yarn
761
867
  rules:
762
868
  - when: never
763
869
  if: $CI_PIPELINE_SOURCE == "trigger"
@@ -945,17 +1051,17 @@ api ๐Ÿงช test:
945
1051
  - when: on_success
946
1052
  if: $CI_MERGE_REQUEST_ID
947
1053
  needs:
948
- - job: api ๐Ÿ‘ฎ lint
1054
+ - job: 'api ๐Ÿ‘ฎ lint | review '
949
1055
  artifacts: false
950
1056
  - job: 'api ๐Ÿ”จ app | review '
951
1057
  artifacts: false
952
1058
  - job: 'api ๐Ÿ”จ docker | review '
953
1059
  artifacts: false
954
- - job: api ๐Ÿงช test
1060
+ - job: 'api ๐Ÿงช test | review '
955
1061
  artifacts: false
956
1062
  - job: 'api ๐Ÿงพ sbom | review '
957
1063
  artifacts: true
958
- - job: api ๐Ÿ›ก audit
1064
+ - job: 'api ๐Ÿ›ก audit | review '
959
1065
  artifacts: false
960
1066
  retry: *a1
961
1067
  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
@@ -460,17 +451,17 @@ api ๐Ÿงช test:
460
451
  - when: on_success
461
452
  if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && $CI_COMMIT_MESSAGE !~ /^chore\\(release\\).*/
462
453
  needs:
463
- - job: api ๐Ÿ‘ฎ lint
454
+ - job: 'api ๐Ÿ‘ฎ lint | dev '
464
455
  artifacts: false
465
456
  - job: 'api ๐Ÿ”จ app | dev '
466
457
  artifacts: false
467
458
  - job: 'api ๐Ÿ”จ docker | dev '
468
459
  artifacts: false
469
- - job: api ๐Ÿงช test
460
+ - job: 'api ๐Ÿงช test | dev '
470
461
  artifacts: false
471
462
  - job: 'api ๐Ÿงพ sbom | dev '
472
463
  artifacts: true
473
- - job: api ๐Ÿ›ก audit
464
+ - job: 'api ๐Ÿ›ก audit | dev '
474
465
  artifacts: false
475
466
  retry: *a1
476
467
  interruptible: true
@@ -509,6 +500,115 @@ api ๐Ÿงช test:
509
500
  retry: *a1
510
501
  interruptible: true
511
502
  allow_failure: true
503
+ 'api ๐Ÿ›ก audit | review ':
504
+ stage: test
505
+ image: path/to/docker/jobs-default:the-version
506
+ variables:
507
+ KUBERNETES_CPU_REQUEST: '0.45'
508
+ KUBERNETES_MEMORY_REQUEST: 1Gi
509
+ KUBERNETES_MEMORY_LIMIT: 4Gi
510
+ script:
511
+ - collapseable_section_start "injectvars" "Injecting variables"
512
+ - export APP_PATH="api"
513
+ - collapseable_section_end "injectvars"
514
+ - cd api
515
+ - yarn npm audit --environment production
516
+ rules:
517
+ - when: never
518
+ if: $CI_PIPELINE_SOURCE == "trigger"
519
+ - if: $CI_MERGE_REQUEST_ID
520
+ needs: []
521
+ retry: *a1
522
+ interruptible: true
523
+ allow_failure: true
524
+ 'api ๐Ÿ‘ฎ lint | review ':
525
+ stage: test
526
+ image: path/to/docker/jobs-default:the-version
527
+ variables:
528
+ KUBERNETES_CPU_REQUEST: '0.45'
529
+ KUBERNETES_MEMORY_REQUEST: 1Gi
530
+ KUBERNETES_MEMORY_LIMIT: 4Gi
531
+ script:
532
+ - collapseable_section_start "injectvars" "Injecting variables"
533
+ - export APP_PATH="api"
534
+ - collapseable_section_end "injectvars"
535
+ - collapseable_section_start "nodeinstall" "Ensure node version"
536
+ - if [ -f ~/.nvm/nvm.sh ]; then source ~/.nvm/nvm.sh; fi
537
+ - if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi
538
+ - collapseable_section_end "nodeinstall"
539
+ - cd api
540
+ - collapseable_section_start "nodeinstall" "Ensure node version"
541
+ - if [ -f ~/.nvm/nvm.sh ]; then source ~/.nvm/nvm.sh; fi
542
+ - if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi
543
+ - collapseable_section_end "nodeinstall"
544
+ - collapseable_section_start "yarninstall" "Yarn install"
545
+ - yarn install --immutable
546
+ - collapseable_section_end "yarninstall"
547
+ - yarn lint
548
+ cache:
549
+ - key: api-yarn-mr$CI_MERGE_REQUEST_IID
550
+ policy: pull-push
551
+ paths:
552
+ - api/.yarn
553
+ fallback_keys:
554
+ - api-yarn
555
+ - key: api-node-modules-mr$CI_MERGE_REQUEST_IID
556
+ policy: pull-push
557
+ paths:
558
+ - api/node_modules
559
+ fallback_keys:
560
+ - api-node-modules
561
+ rules:
562
+ - when: never
563
+ if: $CI_PIPELINE_SOURCE == "trigger"
564
+ - if: $CI_MERGE_REQUEST_ID
565
+ needs: []
566
+ retry: *a1
567
+ interruptible: true
568
+ 'api ๐Ÿงช test | review ':
569
+ stage: test
570
+ image: path/to/docker/jobs-testing-chrome:the-version
571
+ variables:
572
+ KUBERNETES_CPU_REQUEST: '0.45'
573
+ KUBERNETES_MEMORY_REQUEST: 1Gi
574
+ KUBERNETES_MEMORY_LIMIT: 4Gi
575
+ script:
576
+ - collapseable_section_start "injectvars" "Injecting variables"
577
+ - export APP_PATH="api"
578
+ - collapseable_section_end "injectvars"
579
+ - collapseable_section_start "nodeinstall" "Ensure node version"
580
+ - if [ -f ~/.nvm/nvm.sh ]; then source ~/.nvm/nvm.sh; fi
581
+ - if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi
582
+ - collapseable_section_end "nodeinstall"
583
+ - cd api
584
+ - collapseable_section_start "nodeinstall" "Ensure node version"
585
+ - if [ -f ~/.nvm/nvm.sh ]; then source ~/.nvm/nvm.sh; fi
586
+ - if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi
587
+ - collapseable_section_end "nodeinstall"
588
+ - collapseable_section_start "yarninstall" "Yarn install"
589
+ - yarn install --immutable
590
+ - collapseable_section_end "yarninstall"
591
+ - yarn test
592
+ cache:
593
+ - key: api-yarn-mr$CI_MERGE_REQUEST_IID
594
+ policy: pull-push
595
+ paths:
596
+ - api/.yarn
597
+ fallback_keys:
598
+ - api-yarn
599
+ - key: api-node-modules-mr$CI_MERGE_REQUEST_IID
600
+ policy: pull-push
601
+ paths:
602
+ - api/node_modules
603
+ fallback_keys:
604
+ - api-node-modules
605
+ rules:
606
+ - when: never
607
+ if: $CI_PIPELINE_SOURCE == "trigger"
608
+ - if: $CI_MERGE_REQUEST_ID
609
+ needs: []
610
+ retry: *a1
611
+ interruptible: true
512
612
  'api ๐Ÿ”จ app | review ':
513
613
  stage: build
514
614
  image: path/to/docker/jobs-default:the-version
@@ -549,14 +649,18 @@ api ๐Ÿงช test:
549
649
  - collapseable_section_end "yarninstall"
550
650
  - yarn build
551
651
  cache:
552
- - key: api-yarn
652
+ - key: api-yarn-mr$CI_MERGE_REQUEST_IID
553
653
  policy: pull-push
554
654
  paths:
555
655
  - api/.yarn
556
- - key: api-node-modules
656
+ fallback_keys:
657
+ - api-yarn
658
+ - key: api-node-modules-mr$CI_MERGE_REQUEST_IID
557
659
  policy: pull-push
558
660
  paths:
559
661
  - api/node_modules
662
+ fallback_keys:
663
+ - api-node-modules
560
664
  artifacts:
561
665
  paths:
562
666
  - api/__build_info.json
@@ -622,10 +726,12 @@ api ๐Ÿงช test:
622
726
  - docker push $DOCKER_CACHE_IMAGE
623
727
  - collapseable_section_end "docker-push"
624
728
  cache:
625
- - key: api-yarn
729
+ - key: api-yarn-mr$CI_MERGE_REQUEST_IID
626
730
  policy: pull
627
731
  paths:
628
732
  - api/.yarn
733
+ fallback_keys:
734
+ - api-yarn
629
735
  rules:
630
736
  - when: never
631
737
  if: $CI_PIPELINE_SOURCE == "trigger"
@@ -755,17 +861,17 @@ api ๐Ÿงช test:
755
861
  - when: on_success
756
862
  if: $CI_MERGE_REQUEST_ID
757
863
  needs:
758
- - job: api ๐Ÿ‘ฎ lint
864
+ - job: 'api ๐Ÿ‘ฎ lint | review '
759
865
  artifacts: false
760
866
  - job: 'api ๐Ÿ”จ app | review '
761
867
  artifacts: false
762
868
  - job: 'api ๐Ÿ”จ docker | review '
763
869
  artifacts: false
764
- - job: api ๐Ÿงช test
870
+ - job: 'api ๐Ÿงช test | review '
765
871
  artifacts: false
766
872
  - job: 'api ๐Ÿงพ sbom | review '
767
873
  artifacts: true
768
- - job: api ๐Ÿ›ก audit
874
+ - job: 'api ๐Ÿ›ก audit | review '
769
875
  artifacts: false
770
876
  retry: *a1
771
877
  interruptible: true