@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
@@ -493,17 +484,17 @@ api ๐Ÿงช test:
493
484
  - when: on_success
494
485
  if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && $CI_COMMIT_MESSAGE !~ /^chore\\(release\\).*/
495
486
  needs:
496
- - job: api ๐Ÿ‘ฎ lint
487
+ - job: 'api ๐Ÿ‘ฎ lint | dev '
497
488
  artifacts: false
498
489
  - job: 'api ๐Ÿ”จ app | dev '
499
490
  artifacts: false
500
491
  - job: 'api ๐Ÿ”จ docker | dev '
501
492
  artifacts: false
502
- - job: api ๐Ÿงช test
493
+ - job: 'api ๐Ÿงช test | dev '
503
494
  artifacts: false
504
495
  - job: 'api ๐Ÿงพ sbom | dev '
505
496
  artifacts: true
506
- - job: api ๐Ÿ›ก audit
497
+ - job: 'api ๐Ÿ›ก audit | dev '
507
498
  artifacts: false
508
499
  retry: *a1
509
500
  interruptible: true
@@ -544,6 +535,115 @@ api ๐Ÿงช test:
544
535
  retry: *a1
545
536
  interruptible: true
546
537
  allow_failure: true
538
+ 'api ๐Ÿ›ก audit | review ':
539
+ stage: test
540
+ image: path/to/docker/jobs-default:the-version
541
+ variables:
542
+ KUBERNETES_CPU_REQUEST: '0.45'
543
+ KUBERNETES_MEMORY_REQUEST: 1Gi
544
+ KUBERNETES_MEMORY_LIMIT: 4Gi
545
+ script:
546
+ - collapseable_section_start "injectvars" "Injecting variables"
547
+ - export APP_PATH="api"
548
+ - collapseable_section_end "injectvars"
549
+ - cd api
550
+ - yarn npm audit --environment production
551
+ rules:
552
+ - when: never
553
+ if: $CI_PIPELINE_SOURCE == "trigger"
554
+ - if: $CI_MERGE_REQUEST_ID
555
+ needs: []
556
+ retry: *a1
557
+ interruptible: true
558
+ allow_failure: true
559
+ 'api ๐Ÿ‘ฎ lint | review ':
560
+ stage: test
561
+ image: path/to/docker/jobs-default:the-version
562
+ variables:
563
+ KUBERNETES_CPU_REQUEST: '0.45'
564
+ KUBERNETES_MEMORY_REQUEST: 1Gi
565
+ KUBERNETES_MEMORY_LIMIT: 4Gi
566
+ script:
567
+ - collapseable_section_start "injectvars" "Injecting variables"
568
+ - export APP_PATH="api"
569
+ - collapseable_section_end "injectvars"
570
+ - collapseable_section_start "nodeinstall" "Ensure node version"
571
+ - if [ -f ~/.nvm/nvm.sh ]; then source ~/.nvm/nvm.sh; fi
572
+ - if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi
573
+ - collapseable_section_end "nodeinstall"
574
+ - cd api
575
+ - collapseable_section_start "nodeinstall" "Ensure node version"
576
+ - if [ -f ~/.nvm/nvm.sh ]; then source ~/.nvm/nvm.sh; fi
577
+ - if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi
578
+ - collapseable_section_end "nodeinstall"
579
+ - collapseable_section_start "yarninstall" "Yarn install"
580
+ - yarn install --immutable
581
+ - collapseable_section_end "yarninstall"
582
+ - yarn lint
583
+ cache:
584
+ - key: api-yarn-mr$CI_MERGE_REQUEST_IID
585
+ policy: pull-push
586
+ paths:
587
+ - api/.yarn
588
+ fallback_keys:
589
+ - api-yarn
590
+ - key: api-node-modules-mr$CI_MERGE_REQUEST_IID
591
+ policy: pull-push
592
+ paths:
593
+ - api/node_modules
594
+ fallback_keys:
595
+ - api-node-modules
596
+ rules:
597
+ - when: never
598
+ if: $CI_PIPELINE_SOURCE == "trigger"
599
+ - if: $CI_MERGE_REQUEST_ID
600
+ needs: []
601
+ retry: *a1
602
+ interruptible: true
603
+ 'api ๐Ÿงช test | review ':
604
+ stage: test
605
+ image: path/to/docker/jobs-testing-chrome:the-version
606
+ variables:
607
+ KUBERNETES_CPU_REQUEST: '0.45'
608
+ KUBERNETES_MEMORY_REQUEST: 1Gi
609
+ KUBERNETES_MEMORY_LIMIT: 4Gi
610
+ script:
611
+ - collapseable_section_start "injectvars" "Injecting variables"
612
+ - export APP_PATH="api"
613
+ - collapseable_section_end "injectvars"
614
+ - collapseable_section_start "nodeinstall" "Ensure node version"
615
+ - if [ -f ~/.nvm/nvm.sh ]; then source ~/.nvm/nvm.sh; fi
616
+ - if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi
617
+ - collapseable_section_end "nodeinstall"
618
+ - cd api
619
+ - collapseable_section_start "nodeinstall" "Ensure node version"
620
+ - if [ -f ~/.nvm/nvm.sh ]; then source ~/.nvm/nvm.sh; fi
621
+ - if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi
622
+ - collapseable_section_end "nodeinstall"
623
+ - collapseable_section_start "yarninstall" "Yarn install"
624
+ - yarn install --immutable
625
+ - collapseable_section_end "yarninstall"
626
+ - yarn test
627
+ cache:
628
+ - key: api-yarn-mr$CI_MERGE_REQUEST_IID
629
+ policy: pull-push
630
+ paths:
631
+ - api/.yarn
632
+ fallback_keys:
633
+ - api-yarn
634
+ - key: api-node-modules-mr$CI_MERGE_REQUEST_IID
635
+ policy: pull-push
636
+ paths:
637
+ - api/node_modules
638
+ fallback_keys:
639
+ - api-node-modules
640
+ rules:
641
+ - when: never
642
+ if: $CI_PIPELINE_SOURCE == "trigger"
643
+ - if: $CI_MERGE_REQUEST_ID
644
+ needs: []
645
+ retry: *a1
646
+ interruptible: true
547
647
  'api ๐Ÿ”จ app | review ':
548
648
  stage: build
549
649
  image: path/to/docker/jobs-default:the-version
@@ -603,14 +703,18 @@ api ๐Ÿงช test:
603
703
  - collapseable_section_end "yarninstall"
604
704
  - yarn build
605
705
  cache:
606
- - key: api-yarn
706
+ - key: api-yarn-mr$CI_MERGE_REQUEST_IID
607
707
  policy: pull-push
608
708
  paths:
609
709
  - api/.yarn
610
- - key: api-node-modules
710
+ fallback_keys:
711
+ - api-yarn
712
+ - key: api-node-modules-mr$CI_MERGE_REQUEST_IID
611
713
  policy: pull-push
612
714
  paths:
613
715
  - api/node_modules
716
+ fallback_keys:
717
+ - api-node-modules
614
718
  artifacts:
615
719
  paths:
616
720
  - api/__build_info.json
@@ -677,10 +781,12 @@ api ๐Ÿงช test:
677
781
  - docker push $DOCKER_CACHE_IMAGE
678
782
  - collapseable_section_end "docker-push"
679
783
  cache:
680
- - key: api-yarn
784
+ - key: api-yarn-mr$CI_MERGE_REQUEST_IID
681
785
  policy: pull
682
786
  paths:
683
787
  - api/.yarn
788
+ fallback_keys:
789
+ - api-yarn
684
790
  rules:
685
791
  - when: never
686
792
  if: $CI_PIPELINE_SOURCE == "trigger"
@@ -823,17 +929,17 @@ api ๐Ÿงช test:
823
929
  - when: on_success
824
930
  if: $CI_MERGE_REQUEST_ID
825
931
  needs:
826
- - job: api ๐Ÿ‘ฎ lint
932
+ - job: 'api ๐Ÿ‘ฎ lint | review '
827
933
  artifacts: false
828
934
  - job: 'api ๐Ÿ”จ app | review '
829
935
  artifacts: false
830
936
  - job: 'api ๐Ÿ”จ docker | review '
831
937
  artifacts: false
832
- - job: api ๐Ÿงช test
938
+ - job: 'api ๐Ÿงช test | review '
833
939
  artifacts: false
834
940
  - job: 'api ๐Ÿงพ sbom | review '
835
941
  artifacts: true
836
- - job: api ๐Ÿ›ก audit
942
+ - job: 'api ๐Ÿ›ก audit | review '
837
943
  artifacts: false
838
944
  retry: *a1
839
945
  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
@@ -493,17 +484,17 @@ api ๐Ÿงช test:
493
484
  - when: on_success
494
485
  if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && $CI_COMMIT_MESSAGE !~ /^chore\\(release\\).*/
495
486
  needs:
496
- - job: api ๐Ÿ‘ฎ lint
487
+ - job: 'api ๐Ÿ‘ฎ lint | dev '
497
488
  artifacts: false
498
489
  - job: 'api ๐Ÿ”จ app | dev '
499
490
  artifacts: false
500
491
  - job: 'api ๐Ÿ”จ docker | dev '
501
492
  artifacts: false
502
- - job: api ๐Ÿงช test
493
+ - job: 'api ๐Ÿงช test | dev '
503
494
  artifacts: false
504
495
  - job: 'api ๐Ÿงพ sbom | dev '
505
496
  artifacts: true
506
- - job: api ๐Ÿ›ก audit
497
+ - job: 'api ๐Ÿ›ก audit | dev '
507
498
  artifacts: false
508
499
  retry: *a1
509
500
  interruptible: true
@@ -544,6 +535,115 @@ api ๐Ÿงช test:
544
535
  retry: *a1
545
536
  interruptible: true
546
537
  allow_failure: true
538
+ 'api ๐Ÿ›ก audit | review ':
539
+ stage: test
540
+ image: path/to/docker/jobs-default:the-version
541
+ variables:
542
+ KUBERNETES_CPU_REQUEST: '0.45'
543
+ KUBERNETES_MEMORY_REQUEST: 1Gi
544
+ KUBERNETES_MEMORY_LIMIT: 4Gi
545
+ script:
546
+ - collapseable_section_start "injectvars" "Injecting variables"
547
+ - export APP_PATH="api"
548
+ - collapseable_section_end "injectvars"
549
+ - cd api
550
+ - yarn npm audit --environment production
551
+ rules:
552
+ - when: never
553
+ if: $CI_PIPELINE_SOURCE == "trigger"
554
+ - if: $CI_MERGE_REQUEST_ID
555
+ needs: []
556
+ retry: *a1
557
+ interruptible: true
558
+ allow_failure: true
559
+ 'api ๐Ÿ‘ฎ lint | review ':
560
+ stage: test
561
+ image: path/to/docker/jobs-default:the-version
562
+ variables:
563
+ KUBERNETES_CPU_REQUEST: '0.45'
564
+ KUBERNETES_MEMORY_REQUEST: 1Gi
565
+ KUBERNETES_MEMORY_LIMIT: 4Gi
566
+ script:
567
+ - collapseable_section_start "injectvars" "Injecting variables"
568
+ - export APP_PATH="api"
569
+ - collapseable_section_end "injectvars"
570
+ - collapseable_section_start "nodeinstall" "Ensure node version"
571
+ - if [ -f ~/.nvm/nvm.sh ]; then source ~/.nvm/nvm.sh; fi
572
+ - if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi
573
+ - collapseable_section_end "nodeinstall"
574
+ - cd api
575
+ - collapseable_section_start "nodeinstall" "Ensure node version"
576
+ - if [ -f ~/.nvm/nvm.sh ]; then source ~/.nvm/nvm.sh; fi
577
+ - if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi
578
+ - collapseable_section_end "nodeinstall"
579
+ - collapseable_section_start "yarninstall" "Yarn install"
580
+ - yarn install --immutable
581
+ - collapseable_section_end "yarninstall"
582
+ - yarn lint
583
+ cache:
584
+ - key: api-yarn-mr$CI_MERGE_REQUEST_IID
585
+ policy: pull-push
586
+ paths:
587
+ - api/.yarn
588
+ fallback_keys:
589
+ - api-yarn
590
+ - key: api-node-modules-mr$CI_MERGE_REQUEST_IID
591
+ policy: pull-push
592
+ paths:
593
+ - api/node_modules
594
+ fallback_keys:
595
+ - api-node-modules
596
+ rules:
597
+ - when: never
598
+ if: $CI_PIPELINE_SOURCE == "trigger"
599
+ - if: $CI_MERGE_REQUEST_ID
600
+ needs: []
601
+ retry: *a1
602
+ interruptible: true
603
+ 'api ๐Ÿงช test | review ':
604
+ stage: test
605
+ image: path/to/docker/jobs-testing-chrome:the-version
606
+ variables:
607
+ KUBERNETES_CPU_REQUEST: '0.45'
608
+ KUBERNETES_MEMORY_REQUEST: 1Gi
609
+ KUBERNETES_MEMORY_LIMIT: 4Gi
610
+ script:
611
+ - collapseable_section_start "injectvars" "Injecting variables"
612
+ - export APP_PATH="api"
613
+ - collapseable_section_end "injectvars"
614
+ - collapseable_section_start "nodeinstall" "Ensure node version"
615
+ - if [ -f ~/.nvm/nvm.sh ]; then source ~/.nvm/nvm.sh; fi
616
+ - if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi
617
+ - collapseable_section_end "nodeinstall"
618
+ - cd api
619
+ - collapseable_section_start "nodeinstall" "Ensure node version"
620
+ - if [ -f ~/.nvm/nvm.sh ]; then source ~/.nvm/nvm.sh; fi
621
+ - if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi
622
+ - collapseable_section_end "nodeinstall"
623
+ - collapseable_section_start "yarninstall" "Yarn install"
624
+ - yarn install --immutable
625
+ - collapseable_section_end "yarninstall"
626
+ - yarn test
627
+ cache:
628
+ - key: api-yarn-mr$CI_MERGE_REQUEST_IID
629
+ policy: pull-push
630
+ paths:
631
+ - api/.yarn
632
+ fallback_keys:
633
+ - api-yarn
634
+ - key: api-node-modules-mr$CI_MERGE_REQUEST_IID
635
+ policy: pull-push
636
+ paths:
637
+ - api/node_modules
638
+ fallback_keys:
639
+ - api-node-modules
640
+ rules:
641
+ - when: never
642
+ if: $CI_PIPELINE_SOURCE == "trigger"
643
+ - if: $CI_MERGE_REQUEST_ID
644
+ needs: []
645
+ retry: *a1
646
+ interruptible: true
547
647
  'api ๐Ÿ”จ app | review ':
548
648
  stage: build
549
649
  image: path/to/docker/jobs-default:the-version
@@ -603,14 +703,18 @@ api ๐Ÿงช test:
603
703
  - collapseable_section_end "yarninstall"
604
704
  - yarn build
605
705
  cache:
606
- - key: api-yarn
706
+ - key: api-yarn-mr$CI_MERGE_REQUEST_IID
607
707
  policy: pull-push
608
708
  paths:
609
709
  - api/.yarn
610
- - key: api-node-modules
710
+ fallback_keys:
711
+ - api-yarn
712
+ - key: api-node-modules-mr$CI_MERGE_REQUEST_IID
611
713
  policy: pull-push
612
714
  paths:
613
715
  - api/node_modules
716
+ fallback_keys:
717
+ - api-node-modules
614
718
  artifacts:
615
719
  paths:
616
720
  - api/__build_info.json
@@ -677,10 +781,12 @@ api ๐Ÿงช test:
677
781
  - docker push $DOCKER_CACHE_IMAGE
678
782
  - collapseable_section_end "docker-push"
679
783
  cache:
680
- - key: api-yarn
784
+ - key: api-yarn-mr$CI_MERGE_REQUEST_IID
681
785
  policy: pull
682
786
  paths:
683
787
  - api/.yarn
788
+ fallback_keys:
789
+ - api-yarn
684
790
  rules:
685
791
  - when: never
686
792
  if: $CI_PIPELINE_SOURCE == "trigger"
@@ -823,17 +929,17 @@ api ๐Ÿงช test:
823
929
  - when: on_success
824
930
  if: $CI_MERGE_REQUEST_ID
825
931
  needs:
826
- - job: api ๐Ÿ‘ฎ lint
932
+ - job: 'api ๐Ÿ‘ฎ lint | review '
827
933
  artifacts: false
828
934
  - job: 'api ๐Ÿ”จ app | review '
829
935
  artifacts: false
830
936
  - job: 'api ๐Ÿ”จ docker | review '
831
937
  artifacts: false
832
- - job: api ๐Ÿงช test
938
+ - job: 'api ๐Ÿงช test | review '
833
939
  artifacts: false
834
940
  - job: 'api ๐Ÿงพ sbom | review '
835
941
  artifacts: true
836
- - job: api ๐Ÿ›ก audit
942
+ - job: 'api ๐Ÿ›ก audit | review '
837
943
  artifacts: false
838
944
  retry: *a1
839
945
  interruptible: true