@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
@@ -485,17 +476,17 @@ api ๐Ÿงช test:
485
476
  - when: on_success
486
477
  if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && $CI_COMMIT_MESSAGE !~ /^chore\\(release\\).*/
487
478
  needs:
488
- - job: api ๐Ÿ‘ฎ lint
479
+ - job: 'api ๐Ÿ‘ฎ lint | dev '
489
480
  artifacts: false
490
481
  - job: 'api ๐Ÿ”จ app | dev '
491
482
  artifacts: false
492
483
  - job: 'api ๐Ÿ”จ docker | dev '
493
484
  artifacts: false
494
- - job: api ๐Ÿงช test
485
+ - job: 'api ๐Ÿงช test | dev '
495
486
  artifacts: false
496
487
  - job: 'api ๐Ÿงพ sbom | dev '
497
488
  artifacts: true
498
- - job: api ๐Ÿ›ก audit
489
+ - job: 'api ๐Ÿ›ก audit | dev '
499
490
  artifacts: false
500
491
  retry: *a1
501
492
  interruptible: true
@@ -600,6 +591,115 @@ api ๐Ÿงช test:
600
591
  retry: *a1
601
592
  interruptible: true
602
593
  allow_failure: true
594
+ 'api ๐Ÿ›ก audit | review ':
595
+ stage: test
596
+ image: path/to/docker/jobs-default:the-version
597
+ variables:
598
+ KUBERNETES_CPU_REQUEST: '0.45'
599
+ KUBERNETES_MEMORY_REQUEST: 1Gi
600
+ KUBERNETES_MEMORY_LIMIT: 4Gi
601
+ script:
602
+ - collapseable_section_start "injectvars" "Injecting variables"
603
+ - export APP_PATH="api"
604
+ - collapseable_section_end "injectvars"
605
+ - cd api
606
+ - yarn npm audit --environment production
607
+ rules:
608
+ - when: never
609
+ if: $CI_PIPELINE_SOURCE == "trigger"
610
+ - if: $CI_MERGE_REQUEST_ID
611
+ needs: []
612
+ retry: *a1
613
+ interruptible: true
614
+ allow_failure: true
615
+ 'api ๐Ÿ‘ฎ lint | review ':
616
+ stage: test
617
+ image: path/to/docker/jobs-default:the-version
618
+ variables:
619
+ KUBERNETES_CPU_REQUEST: '0.45'
620
+ KUBERNETES_MEMORY_REQUEST: 1Gi
621
+ KUBERNETES_MEMORY_LIMIT: 4Gi
622
+ script:
623
+ - collapseable_section_start "injectvars" "Injecting variables"
624
+ - export APP_PATH="api"
625
+ - collapseable_section_end "injectvars"
626
+ - collapseable_section_start "nodeinstall" "Ensure node version"
627
+ - if [ -f ~/.nvm/nvm.sh ]; then source ~/.nvm/nvm.sh; fi
628
+ - if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi
629
+ - collapseable_section_end "nodeinstall"
630
+ - cd api
631
+ - collapseable_section_start "nodeinstall" "Ensure node version"
632
+ - if [ -f ~/.nvm/nvm.sh ]; then source ~/.nvm/nvm.sh; fi
633
+ - if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi
634
+ - collapseable_section_end "nodeinstall"
635
+ - collapseable_section_start "yarninstall" "Yarn install"
636
+ - yarn install --immutable
637
+ - collapseable_section_end "yarninstall"
638
+ - yarn lint
639
+ cache:
640
+ - key: api-yarn-mr$CI_MERGE_REQUEST_IID
641
+ policy: pull-push
642
+ paths:
643
+ - api/.yarn
644
+ fallback_keys:
645
+ - api-yarn
646
+ - key: api-node-modules-mr$CI_MERGE_REQUEST_IID
647
+ policy: pull-push
648
+ paths:
649
+ - api/node_modules
650
+ fallback_keys:
651
+ - api-node-modules
652
+ rules:
653
+ - when: never
654
+ if: $CI_PIPELINE_SOURCE == "trigger"
655
+ - if: $CI_MERGE_REQUEST_ID
656
+ needs: []
657
+ retry: *a1
658
+ interruptible: true
659
+ 'api ๐Ÿงช test | review ':
660
+ stage: test
661
+ image: path/to/docker/jobs-testing-chrome:the-version
662
+ variables:
663
+ KUBERNETES_CPU_REQUEST: '0.45'
664
+ KUBERNETES_MEMORY_REQUEST: 1Gi
665
+ KUBERNETES_MEMORY_LIMIT: 4Gi
666
+ script:
667
+ - collapseable_section_start "injectvars" "Injecting variables"
668
+ - export APP_PATH="api"
669
+ - collapseable_section_end "injectvars"
670
+ - collapseable_section_start "nodeinstall" "Ensure node version"
671
+ - if [ -f ~/.nvm/nvm.sh ]; then source ~/.nvm/nvm.sh; fi
672
+ - if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi
673
+ - collapseable_section_end "nodeinstall"
674
+ - cd api
675
+ - collapseable_section_start "nodeinstall" "Ensure node version"
676
+ - if [ -f ~/.nvm/nvm.sh ]; then source ~/.nvm/nvm.sh; fi
677
+ - if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi
678
+ - collapseable_section_end "nodeinstall"
679
+ - collapseable_section_start "yarninstall" "Yarn install"
680
+ - yarn install --immutable
681
+ - collapseable_section_end "yarninstall"
682
+ - yarn test
683
+ cache:
684
+ - key: api-yarn-mr$CI_MERGE_REQUEST_IID
685
+ policy: pull-push
686
+ paths:
687
+ - api/.yarn
688
+ fallback_keys:
689
+ - api-yarn
690
+ - key: api-node-modules-mr$CI_MERGE_REQUEST_IID
691
+ policy: pull-push
692
+ paths:
693
+ - api/node_modules
694
+ fallback_keys:
695
+ - api-node-modules
696
+ rules:
697
+ - when: never
698
+ if: $CI_PIPELINE_SOURCE == "trigger"
699
+ - if: $CI_MERGE_REQUEST_ID
700
+ needs: []
701
+ retry: *a1
702
+ interruptible: true
603
703
  'api ๐Ÿ”จ app | review ':
604
704
  stage: build
605
705
  image: path/to/docker/jobs-default:the-version
@@ -639,14 +739,18 @@ api ๐Ÿงช test:
639
739
  - collapseable_section_end "yarninstall"
640
740
  - yarn build
641
741
  cache:
642
- - key: api-yarn
742
+ - key: api-yarn-mr$CI_MERGE_REQUEST_IID
643
743
  policy: pull-push
644
744
  paths:
645
745
  - api/.yarn
646
- - key: api-node-modules
746
+ fallback_keys:
747
+ - api-yarn
748
+ - key: api-node-modules-mr$CI_MERGE_REQUEST_IID
647
749
  policy: pull-push
648
750
  paths:
649
751
  - api/node_modules
752
+ fallback_keys:
753
+ - api-node-modules
650
754
  artifacts:
651
755
  paths:
652
756
  - api/__build_info.json
@@ -712,10 +816,12 @@ api ๐Ÿงช test:
712
816
  - docker push $DOCKER_CACHE_IMAGE
713
817
  - collapseable_section_end "docker-push"
714
818
  cache:
715
- - key: api-yarn
819
+ - key: api-yarn-mr$CI_MERGE_REQUEST_IID
716
820
  policy: pull
717
821
  paths:
718
822
  - api/.yarn
823
+ fallback_keys:
824
+ - api-yarn
719
825
  rules:
720
826
  - when: never
721
827
  if: $CI_PIPELINE_SOURCE == "trigger"
@@ -864,17 +970,17 @@ api ๐Ÿงช test:
864
970
  - when: on_success
865
971
  if: $CI_MERGE_REQUEST_ID
866
972
  needs:
867
- - job: api ๐Ÿ‘ฎ lint
973
+ - job: 'api ๐Ÿ‘ฎ lint | review '
868
974
  artifacts: false
869
975
  - job: 'api ๐Ÿ”จ app | review '
870
976
  artifacts: false
871
977
  - job: 'api ๐Ÿ”จ docker | review '
872
978
  artifacts: false
873
- - job: api ๐Ÿงช test
979
+ - job: 'api ๐Ÿงช test | review '
874
980
  artifacts: false
875
981
  - job: 'api ๐Ÿงพ sbom | review '
876
982
  artifacts: true
877
- - job: api ๐Ÿ›ก audit
983
+ - job: 'api ๐Ÿ›ก audit | review '
878
984
  artifacts: false
879
985
  retry: *a1
880
986
  interruptible: true
@@ -1731,7 +1837,7 @@ api ๐Ÿงช test:
1731
1837
  retry: *a1
1732
1838
  interruptible: true
1733
1839
  allow_failure: true
1734
- www ๐Ÿ›ก audit:
1840
+ 'www ๐Ÿ›ก audit | dev ':
1735
1841
  stage: test
1736
1842
  image: path/to/docker/jobs-default:the-version
1737
1843
  variables:
@@ -1748,14 +1854,11 @@ www ๐Ÿ›ก audit:
1748
1854
  - when: never
1749
1855
  if: $CI_PIPELINE_SOURCE == "trigger"
1750
1856
  - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && $CI_COMMIT_MESSAGE !~ /^chore\\(release\\).*/
1751
- - when: never
1752
- if: $CI_PIPELINE_SOURCE == "trigger"
1753
- - if: $CI_MERGE_REQUEST_ID
1754
1857
  needs: []
1755
1858
  retry: *a1
1756
1859
  interruptible: true
1757
1860
  allow_failure: true
1758
- www ๐Ÿ‘ฎ lint:
1861
+ 'www ๐Ÿ‘ฎ lint | dev ':
1759
1862
  stage: test
1760
1863
  image: path/to/docker/jobs-default:the-version
1761
1864
  variables:
@@ -1792,13 +1895,10 @@ www ๐Ÿ‘ฎ lint:
1792
1895
  - when: never
1793
1896
  if: $CI_PIPELINE_SOURCE == "trigger"
1794
1897
  - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && $CI_COMMIT_MESSAGE !~ /^chore\\(release\\).*/
1795
- - when: never
1796
- if: $CI_PIPELINE_SOURCE == "trigger"
1797
- - if: $CI_MERGE_REQUEST_ID
1798
1898
  needs: []
1799
1899
  retry: *a1
1800
1900
  interruptible: true
1801
- www ๐Ÿงช test:
1901
+ 'www ๐Ÿงช test | dev ':
1802
1902
  stage: test
1803
1903
  image: path/to/docker/jobs-testing-chrome:the-version
1804
1904
  variables:
@@ -1835,9 +1935,6 @@ www ๐Ÿงช test:
1835
1935
  - when: never
1836
1936
  if: $CI_PIPELINE_SOURCE == "trigger"
1837
1937
  - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && $CI_COMMIT_MESSAGE !~ /^chore\\(release\\).*/
1838
- - when: never
1839
- if: $CI_PIPELINE_SOURCE == "trigger"
1840
- - if: $CI_MERGE_REQUEST_ID
1841
1938
  needs: []
1842
1939
  retry: *a1
1843
1940
  interruptible: true
@@ -2116,17 +2213,17 @@ www ๐Ÿงช test:
2116
2213
  - when: on_success
2117
2214
  if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && $CI_COMMIT_MESSAGE !~ /^chore\\(release\\).*/
2118
2215
  needs:
2119
- - job: www ๐Ÿ‘ฎ lint
2216
+ - job: 'www ๐Ÿ‘ฎ lint | dev '
2120
2217
  artifacts: false
2121
2218
  - job: 'www ๐Ÿ”จ app | dev '
2122
2219
  artifacts: false
2123
2220
  - job: 'www ๐Ÿ”จ docker | dev '
2124
2221
  artifacts: false
2125
- - job: www ๐Ÿงช test
2222
+ - job: 'www ๐Ÿงช test | dev '
2126
2223
  artifacts: false
2127
2224
  - job: 'www ๐Ÿงพ sbom | dev '
2128
2225
  artifacts: true
2129
- - job: www ๐Ÿ›ก audit
2226
+ - job: 'www ๐Ÿ›ก audit | dev '
2130
2227
  artifacts: false
2131
2228
  retry: *a1
2132
2229
  interruptible: true
@@ -2231,6 +2328,115 @@ www ๐Ÿงช test:
2231
2328
  retry: *a1
2232
2329
  interruptible: true
2233
2330
  allow_failure: true
2331
+ 'www ๐Ÿ›ก audit | review ':
2332
+ stage: test
2333
+ image: path/to/docker/jobs-default:the-version
2334
+ variables:
2335
+ KUBERNETES_CPU_REQUEST: '0.45'
2336
+ KUBERNETES_MEMORY_REQUEST: 1Gi
2337
+ KUBERNETES_MEMORY_LIMIT: 4Gi
2338
+ script:
2339
+ - collapseable_section_start "injectvars" "Injecting variables"
2340
+ - export APP_PATH="www"
2341
+ - collapseable_section_end "injectvars"
2342
+ - cd www
2343
+ - yarn npm audit --environment production
2344
+ rules:
2345
+ - when: never
2346
+ if: $CI_PIPELINE_SOURCE == "trigger"
2347
+ - if: $CI_MERGE_REQUEST_ID
2348
+ needs: []
2349
+ retry: *a1
2350
+ interruptible: true
2351
+ allow_failure: true
2352
+ 'www ๐Ÿ‘ฎ lint | review ':
2353
+ stage: test
2354
+ image: path/to/docker/jobs-default:the-version
2355
+ variables:
2356
+ KUBERNETES_CPU_REQUEST: '0.45'
2357
+ KUBERNETES_MEMORY_REQUEST: 1Gi
2358
+ KUBERNETES_MEMORY_LIMIT: 4Gi
2359
+ script:
2360
+ - collapseable_section_start "injectvars" "Injecting variables"
2361
+ - export APP_PATH="www"
2362
+ - collapseable_section_end "injectvars"
2363
+ - collapseable_section_start "nodeinstall" "Ensure node version"
2364
+ - if [ -f ~/.nvm/nvm.sh ]; then source ~/.nvm/nvm.sh; fi
2365
+ - if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi
2366
+ - collapseable_section_end "nodeinstall"
2367
+ - cd www
2368
+ - collapseable_section_start "nodeinstall" "Ensure node version"
2369
+ - if [ -f ~/.nvm/nvm.sh ]; then source ~/.nvm/nvm.sh; fi
2370
+ - if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi
2371
+ - collapseable_section_end "nodeinstall"
2372
+ - collapseable_section_start "yarninstall" "Yarn install"
2373
+ - yarn install --immutable
2374
+ - collapseable_section_end "yarninstall"
2375
+ - yarn lint
2376
+ cache:
2377
+ - key: www-yarn-mr$CI_MERGE_REQUEST_IID
2378
+ policy: pull-push
2379
+ paths:
2380
+ - www/.yarn
2381
+ fallback_keys:
2382
+ - www-yarn
2383
+ - key: www-node-modules-mr$CI_MERGE_REQUEST_IID
2384
+ policy: pull-push
2385
+ paths:
2386
+ - www/node_modules
2387
+ fallback_keys:
2388
+ - www-node-modules
2389
+ rules:
2390
+ - when: never
2391
+ if: $CI_PIPELINE_SOURCE == "trigger"
2392
+ - if: $CI_MERGE_REQUEST_ID
2393
+ needs: []
2394
+ retry: *a1
2395
+ interruptible: true
2396
+ 'www ๐Ÿงช test | review ':
2397
+ stage: test
2398
+ image: path/to/docker/jobs-testing-chrome:the-version
2399
+ variables:
2400
+ KUBERNETES_CPU_REQUEST: '0.45'
2401
+ KUBERNETES_MEMORY_REQUEST: 1Gi
2402
+ KUBERNETES_MEMORY_LIMIT: 4Gi
2403
+ script:
2404
+ - collapseable_section_start "injectvars" "Injecting variables"
2405
+ - export APP_PATH="www"
2406
+ - collapseable_section_end "injectvars"
2407
+ - collapseable_section_start "nodeinstall" "Ensure node version"
2408
+ - if [ -f ~/.nvm/nvm.sh ]; then source ~/.nvm/nvm.sh; fi
2409
+ - if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi
2410
+ - collapseable_section_end "nodeinstall"
2411
+ - cd www
2412
+ - collapseable_section_start "nodeinstall" "Ensure node version"
2413
+ - if [ -f ~/.nvm/nvm.sh ]; then source ~/.nvm/nvm.sh; fi
2414
+ - if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi
2415
+ - collapseable_section_end "nodeinstall"
2416
+ - collapseable_section_start "yarninstall" "Yarn install"
2417
+ - yarn install --immutable
2418
+ - collapseable_section_end "yarninstall"
2419
+ - yarn test
2420
+ cache:
2421
+ - key: www-yarn-mr$CI_MERGE_REQUEST_IID
2422
+ policy: pull-push
2423
+ paths:
2424
+ - www/.yarn
2425
+ fallback_keys:
2426
+ - www-yarn
2427
+ - key: www-node-modules-mr$CI_MERGE_REQUEST_IID
2428
+ policy: pull-push
2429
+ paths:
2430
+ - www/node_modules
2431
+ fallback_keys:
2432
+ - www-node-modules
2433
+ rules:
2434
+ - when: never
2435
+ if: $CI_PIPELINE_SOURCE == "trigger"
2436
+ - if: $CI_MERGE_REQUEST_ID
2437
+ needs: []
2438
+ retry: *a1
2439
+ interruptible: true
2234
2440
  'www ๐Ÿ”จ app | review ':
2235
2441
  stage: build
2236
2442
  image: path/to/docker/jobs-default:the-version
@@ -2286,14 +2492,18 @@ www ๐Ÿงช test:
2286
2492
  - collapseable_section_end "yarninstall"
2287
2493
  - yarn build
2288
2494
  cache:
2289
- - key: www-yarn
2495
+ - key: www-yarn-mr$CI_MERGE_REQUEST_IID
2290
2496
  policy: pull-push
2291
2497
  paths:
2292
2498
  - www/.yarn
2293
- - key: www-node-modules
2499
+ fallback_keys:
2500
+ - www-yarn
2501
+ - key: www-node-modules-mr$CI_MERGE_REQUEST_IID
2294
2502
  policy: pull-push
2295
2503
  paths:
2296
2504
  - www/node_modules
2505
+ fallback_keys:
2506
+ - www-node-modules
2297
2507
  artifacts:
2298
2508
  paths:
2299
2509
  - www/__build_info.json
@@ -2360,10 +2570,12 @@ www ๐Ÿงช test:
2360
2570
  - docker push $DOCKER_CACHE_IMAGE
2361
2571
  - collapseable_section_end "docker-push"
2362
2572
  cache:
2363
- - key: www-yarn
2573
+ - key: www-yarn-mr$CI_MERGE_REQUEST_IID
2364
2574
  policy: pull
2365
2575
  paths:
2366
2576
  - www/.yarn
2577
+ fallback_keys:
2578
+ - www-yarn
2367
2579
  rules:
2368
2580
  - when: never
2369
2581
  if: $CI_PIPELINE_SOURCE == "trigger"
@@ -2507,17 +2719,17 @@ www ๐Ÿงช test:
2507
2719
  - when: on_success
2508
2720
  if: $CI_MERGE_REQUEST_ID
2509
2721
  needs:
2510
- - job: www ๐Ÿ‘ฎ lint
2722
+ - job: 'www ๐Ÿ‘ฎ lint | review '
2511
2723
  artifacts: false
2512
2724
  - job: 'www ๐Ÿ”จ app | review '
2513
2725
  artifacts: false
2514
2726
  - job: 'www ๐Ÿ”จ docker | review '
2515
2727
  artifacts: false
2516
- - job: www ๐Ÿงช test
2728
+ - job: 'www ๐Ÿงช test | review '
2517
2729
  artifacts: false
2518
2730
  - job: 'www ๐Ÿงพ sbom | review '
2519
2731
  artifacts: true
2520
- - job: www ๐Ÿ›ก audit
2732
+ - job: 'www ๐Ÿ›ก audit | review '
2521
2733
  artifacts: false
2522
2734
  retry: *a1
2523
2735
  interruptible: true