@catladder/pipeline 3.24.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 (75) hide show
  1. package/dist/build/custom/testJob.js +1 -2
  2. package/dist/build/index.js +2 -1
  3. package/dist/build/node/testJob.js +1 -2
  4. package/dist/build/rails/test.js +1 -2
  5. package/dist/constants.js +1 -1
  6. package/dist/pipeline/agent/createAgentReviewJob.js +1 -0
  7. package/dist/pipeline/agent/shared.d.ts +1 -1
  8. package/dist/pipeline/agent/shared.js +0 -1
  9. package/dist/pipeline/createMainPipeline.js +1 -0
  10. package/dist/pipeline/gitlab/cache.d.ts +9 -0
  11. package/dist/pipeline/gitlab/cache.js +47 -0
  12. package/dist/pipeline/gitlab/createGitlabJobs.js +7 -7
  13. package/dist/tsconfig.tsbuildinfo +1 -1
  14. package/dist/types/jobs.d.ts +2 -3
  15. package/examples/__snapshots__/automatic-releases.test.ts.snap +131 -21
  16. package/examples/__snapshots__/cloud-run-health-check-defaults.test.ts.snap +131 -21
  17. package/examples/__snapshots__/cloud-run-health-check-only-startup.test.ts.snap +131 -21
  18. package/examples/__snapshots__/cloud-run-health-check.test.ts.snap +131 -21
  19. package/examples/__snapshots__/cloud-run-http2.test.ts.snap +131 -21
  20. package/examples/__snapshots__/cloud-run-memory-limit.test.ts.snap +131 -21
  21. package/examples/__snapshots__/cloud-run-meteor-with-worker.test.ts.snap +127 -21
  22. package/examples/__snapshots__/cloud-run-nextjs.test.ts.snap +134 -22
  23. package/examples/__snapshots__/cloud-run-no-cpu-throttling.test.ts.snap +131 -21
  24. package/examples/__snapshots__/cloud-run-no-service.test.ts.snap +131 -21
  25. package/examples/__snapshots__/cloud-run-non-public.test.ts.snap +131 -21
  26. package/examples/__snapshots__/cloud-run-post-stop-job.test.ts.snap +131 -21
  27. package/examples/__snapshots__/cloud-run-service-custom-vpc-connector.test.ts.snap +131 -21
  28. package/examples/__snapshots__/cloud-run-service-custom-vpc.test.ts.snap +131 -21
  29. package/examples/__snapshots__/cloud-run-service-gen2.test.ts.snap +131 -21
  30. package/examples/__snapshots__/cloud-run-service-increase-timout.test.ts.snap +131 -21
  31. package/examples/__snapshots__/cloud-run-service-with-volumes.test.ts.snap +131 -21
  32. package/examples/__snapshots__/cloud-run-storybook.test.ts.snap +13 -3
  33. package/examples/__snapshots__/cloud-run-with-agents.test.ts.snap +134 -22
  34. package/examples/__snapshots__/cloud-run-with-gpu.test.ts.snap +131 -21
  35. package/examples/__snapshots__/cloud-run-with-ngnix.test.ts.snap +131 -21
  36. package/examples/__snapshots__/cloud-run-with-sql-legacy-jobs.test.ts.snap +131 -21
  37. package/examples/__snapshots__/cloud-run-with-sql-multiple-dbs.test.ts.snap +393 -63
  38. package/examples/__snapshots__/cloud-run-with-sql-reuse-db.test.ts.snap +262 -42
  39. package/examples/__snapshots__/cloud-run-with-sql.test.ts.snap +131 -21
  40. package/examples/__snapshots__/cloud-run-with-worker.test.ts.snap +131 -21
  41. package/examples/__snapshots__/custom-build-job-with-tests.test.ts.snap +93 -22
  42. package/examples/__snapshots__/custom-deploy.test.ts.snap +131 -21
  43. package/examples/__snapshots__/custom-envs.test.ts.snap +326 -32
  44. package/examples/__snapshots__/custom-verify-job.test.ts.snap +134 -22
  45. package/examples/__snapshots__/git-submodule.test.ts.snap +131 -21
  46. package/examples/__snapshots__/kubernetes-application-customization.test.ts.snap +135 -21
  47. package/examples/__snapshots__/kubernetes-with-cloud-sql.test.ts.snap +135 -21
  48. package/examples/__snapshots__/kubernetes-with-jobs.test.ts.snap +266 -42
  49. package/examples/__snapshots__/kubernetes-with-mongodb.test.ts.snap +135 -21
  50. package/examples/__snapshots__/local-dot-env.test.ts.snap +135 -21
  51. package/examples/__snapshots__/meteor-kubernetes.test.ts.snap +127 -21
  52. package/examples/__snapshots__/modify-generated-files.test.ts.snap +122 -14
  53. package/examples/__snapshots__/modify-generated-yaml.test.ts.snap +122 -14
  54. package/examples/__snapshots__/multiline-var.test.ts.snap +393 -63
  55. package/examples/__snapshots__/native-app.test.ts.snap +265 -41
  56. package/examples/__snapshots__/node-build-with-custom-image.test.ts.snap +131 -21
  57. package/examples/__snapshots__/node-build-with-docker-additions.test.ts.snap +131 -21
  58. package/examples/__snapshots__/override-secrets.test.ts.snap +131 -21
  59. package/examples/__snapshots__/rails-k8s-with-worker-dockerfile.test.ts.snap +84 -22
  60. package/examples/__snapshots__/rails-k8s-with-worker.test.ts.snap +84 -22
  61. package/examples/__snapshots__/referencing-other-vars.test.ts.snap +393 -63
  62. package/examples/__snapshots__/wait-for-other-deploy.test.ts.snap +256 -40
  63. package/examples/__snapshots__/workspace-api-www-turbo-cache.test.ts.snap +147 -29
  64. package/examples/__snapshots__/workspace-api-www.test.ts.snap +147 -29
  65. package/package.json +1 -1
  66. package/src/build/custom/testJob.ts +0 -1
  67. package/src/build/index.ts +1 -0
  68. package/src/build/node/testJob.ts +0 -1
  69. package/src/build/rails/test.ts +0 -1
  70. package/src/pipeline/agent/createAgentReviewJob.ts +1 -0
  71. package/src/pipeline/agent/shared.ts +2 -2
  72. package/src/pipeline/createMainPipeline.ts +1 -0
  73. package/src/pipeline/gitlab/cache.ts +49 -0
  74. package/src/pipeline/gitlab/createGitlabJobs.ts +7 -9
  75. 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
@@ -281,6 +272,7 @@ api ๐Ÿงช test:
281
272
  - api/dist
282
273
  exclude:
283
274
  - api/.env
275
+ - api/.next/cache/**/*
284
276
  expire_in: 1 day
285
277
  when: always
286
278
  reports: {}
@@ -351,19 +343,128 @@ api ๐Ÿงช test:
351
343
  - when: on_success
352
344
  if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && $CI_COMMIT_MESSAGE !~ /^chore\\(release\\).*/
353
345
  needs:
354
- - job: api ๐Ÿ‘ฎ lint
346
+ - job: 'api ๐Ÿ‘ฎ lint | dev '
355
347
  artifacts: false
356
348
  - job: 'api ๐Ÿ”จ app | dev '
357
349
  artifacts: true
358
- - job: api ๐Ÿงช test
350
+ - job: 'api ๐Ÿงช test | dev '
359
351
  artifacts: false
360
352
  - job: 'api ๐Ÿงพ sbom | dev '
361
353
  artifacts: true
362
- - job: api ๐Ÿ›ก audit
354
+ - job: 'api ๐Ÿ›ก audit | dev '
363
355
  artifacts: false
364
356
  retry: *a1
365
357
  interruptible: true
366
358
  allow_failure: false
359
+ 'api ๐Ÿ›ก audit | review ':
360
+ stage: test
361
+ image: path/to/docker/jobs-default:the-version
362
+ variables:
363
+ KUBERNETES_CPU_REQUEST: '0.45'
364
+ KUBERNETES_MEMORY_REQUEST: 1Gi
365
+ KUBERNETES_MEMORY_LIMIT: 4Gi
366
+ script:
367
+ - collapseable_section_start "injectvars" "Injecting variables"
368
+ - export APP_PATH="api"
369
+ - collapseable_section_end "injectvars"
370
+ - cd api
371
+ - yarn npm audit --environment production
372
+ rules:
373
+ - when: never
374
+ if: $CI_PIPELINE_SOURCE == "trigger"
375
+ - if: $CI_MERGE_REQUEST_ID
376
+ needs: []
377
+ retry: *a1
378
+ interruptible: true
379
+ allow_failure: true
380
+ 'api ๐Ÿ‘ฎ lint | review ':
381
+ stage: test
382
+ image: path/to/docker/jobs-default:the-version
383
+ variables:
384
+ KUBERNETES_CPU_REQUEST: '0.45'
385
+ KUBERNETES_MEMORY_REQUEST: 1Gi
386
+ KUBERNETES_MEMORY_LIMIT: 4Gi
387
+ script:
388
+ - collapseable_section_start "injectvars" "Injecting variables"
389
+ - export APP_PATH="api"
390
+ - collapseable_section_end "injectvars"
391
+ - collapseable_section_start "nodeinstall" "Ensure node version"
392
+ - if [ -f ~/.nvm/nvm.sh ]; then source ~/.nvm/nvm.sh; fi
393
+ - if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi
394
+ - collapseable_section_end "nodeinstall"
395
+ - cd api
396
+ - collapseable_section_start "nodeinstall" "Ensure node version"
397
+ - if [ -f ~/.nvm/nvm.sh ]; then source ~/.nvm/nvm.sh; fi
398
+ - if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi
399
+ - collapseable_section_end "nodeinstall"
400
+ - collapseable_section_start "yarninstall" "Yarn install"
401
+ - yarn install --immutable
402
+ - collapseable_section_end "yarninstall"
403
+ - yarn lint
404
+ cache:
405
+ - key: api-yarn-mr$CI_MERGE_REQUEST_IID
406
+ policy: pull-push
407
+ paths:
408
+ - api/.yarn
409
+ fallback_keys:
410
+ - api-yarn
411
+ - key: api-node-modules-mr$CI_MERGE_REQUEST_IID
412
+ policy: pull-push
413
+ paths:
414
+ - api/node_modules
415
+ fallback_keys:
416
+ - api-node-modules
417
+ rules:
418
+ - when: never
419
+ if: $CI_PIPELINE_SOURCE == "trigger"
420
+ - if: $CI_MERGE_REQUEST_ID
421
+ needs: []
422
+ retry: *a1
423
+ interruptible: true
424
+ 'api ๐Ÿงช test | review ':
425
+ stage: test
426
+ image: path/to/docker/jobs-testing-chrome:the-version
427
+ variables:
428
+ KUBERNETES_CPU_REQUEST: '0.45'
429
+ KUBERNETES_MEMORY_REQUEST: 1Gi
430
+ KUBERNETES_MEMORY_LIMIT: 4Gi
431
+ script:
432
+ - collapseable_section_start "injectvars" "Injecting variables"
433
+ - export APP_PATH="api"
434
+ - collapseable_section_end "injectvars"
435
+ - collapseable_section_start "nodeinstall" "Ensure node version"
436
+ - if [ -f ~/.nvm/nvm.sh ]; then source ~/.nvm/nvm.sh; fi
437
+ - if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi
438
+ - collapseable_section_end "nodeinstall"
439
+ - cd api
440
+ - collapseable_section_start "nodeinstall" "Ensure node version"
441
+ - if [ -f ~/.nvm/nvm.sh ]; then source ~/.nvm/nvm.sh; fi
442
+ - if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi
443
+ - collapseable_section_end "nodeinstall"
444
+ - collapseable_section_start "yarninstall" "Yarn install"
445
+ - yarn install --immutable
446
+ - collapseable_section_end "yarninstall"
447
+ - yarn test
448
+ cache:
449
+ - key: api-yarn-mr$CI_MERGE_REQUEST_IID
450
+ policy: pull-push
451
+ paths:
452
+ - api/.yarn
453
+ fallback_keys:
454
+ - api-yarn
455
+ - key: api-node-modules-mr$CI_MERGE_REQUEST_IID
456
+ policy: pull-push
457
+ paths:
458
+ - api/node_modules
459
+ fallback_keys:
460
+ - api-node-modules
461
+ rules:
462
+ - when: never
463
+ if: $CI_PIPELINE_SOURCE == "trigger"
464
+ - if: $CI_MERGE_REQUEST_ID
465
+ needs: []
466
+ retry: *a1
467
+ interruptible: true
367
468
  'api ๐Ÿ”จ app | review ':
368
469
  stage: build
369
470
  image: path/to/docker/jobs-default:the-version
@@ -413,14 +514,18 @@ api ๐Ÿงช test:
413
514
  - collapseable_section_end "yarninstall"
414
515
  - yarn build
415
516
  cache:
416
- - key: api-yarn
517
+ - key: api-yarn-mr$CI_MERGE_REQUEST_IID
417
518
  policy: pull-push
418
519
  paths:
419
520
  - api/.yarn
420
- - key: api-node-modules
521
+ fallback_keys:
522
+ - api-yarn
523
+ - key: api-node-modules-mr$CI_MERGE_REQUEST_IID
421
524
  policy: pull-push
422
525
  paths:
423
526
  - api/node_modules
527
+ fallback_keys:
528
+ - api-node-modules
424
529
  artifacts:
425
530
  paths:
426
531
  - api/__build_info.json
@@ -428,6 +533,7 @@ api ๐Ÿงช test:
428
533
  - api/dist
429
534
  exclude:
430
535
  - api/.env
536
+ - api/.next/cache/**/*
431
537
  expire_in: 1 day
432
538
  when: always
433
539
  reports: {}
@@ -498,15 +604,15 @@ api ๐Ÿงช test:
498
604
  - when: on_success
499
605
  if: $CI_MERGE_REQUEST_ID
500
606
  needs:
501
- - job: api ๐Ÿ‘ฎ lint
607
+ - job: 'api ๐Ÿ‘ฎ lint | review '
502
608
  artifacts: false
503
609
  - job: 'api ๐Ÿ”จ app | review '
504
610
  artifacts: true
505
- - job: api ๐Ÿงช test
611
+ - job: 'api ๐Ÿงช test | review '
506
612
  artifacts: false
507
613
  - job: 'api ๐Ÿงพ sbom | review '
508
614
  artifacts: true
509
- - job: api ๐Ÿ›ก audit
615
+ - job: 'api ๐Ÿ›ก audit | review '
510
616
  artifacts: false
511
617
  retry: *a1
512
618
  interruptible: true
@@ -575,6 +681,7 @@ api ๐Ÿงช test:
575
681
  - api/dist
576
682
  exclude:
577
683
  - api/.env
684
+ - api/.next/cache/**/*
578
685
  expire_in: 1 day
579
686
  when: always
580
687
  reports: {}
@@ -716,6 +823,7 @@ api ๐Ÿงช test:
716
823
  - api/dist
717
824
  exclude:
718
825
  - api/.env
826
+ - api/.next/cache/**/*
719
827
  expire_in: 1 day
720
828
  when: always
721
829
  reports: {}
@@ -793,7 +901,7 @@ api ๐Ÿงช test:
793
901
  retry: *a1
794
902
  interruptible: true
795
903
  allow_failure: true
796
- www ๐Ÿ›ก audit:
904
+ 'www ๐Ÿ›ก audit | dev ':
797
905
  stage: test
798
906
  image: path/to/docker/jobs-default:the-version
799
907
  variables:
@@ -810,14 +918,11 @@ www ๐Ÿ›ก audit:
810
918
  - when: never
811
919
  if: $CI_PIPELINE_SOURCE == "trigger"
812
920
  - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && $CI_COMMIT_MESSAGE !~ /^chore\\(release\\).*/
813
- - when: never
814
- if: $CI_PIPELINE_SOURCE == "trigger"
815
- - if: $CI_MERGE_REQUEST_ID
816
921
  needs: []
817
922
  retry: *a1
818
923
  interruptible: true
819
924
  allow_failure: true
820
- www ๐Ÿ‘ฎ lint:
925
+ 'www ๐Ÿ‘ฎ lint | dev ':
821
926
  stage: test
822
927
  image: path/to/docker/jobs-default:the-version
823
928
  variables:
@@ -854,13 +959,10 @@ www ๐Ÿ‘ฎ lint:
854
959
  - when: never
855
960
  if: $CI_PIPELINE_SOURCE == "trigger"
856
961
  - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && $CI_COMMIT_MESSAGE !~ /^chore\\(release\\).*/
857
- - when: never
858
- if: $CI_PIPELINE_SOURCE == "trigger"
859
- - if: $CI_MERGE_REQUEST_ID
860
962
  needs: []
861
963
  retry: *a1
862
964
  interruptible: true
863
- www ๐Ÿงช test:
965
+ 'www ๐Ÿงช test | dev ':
864
966
  stage: test
865
967
  image: path/to/docker/jobs-testing-chrome:the-version
866
968
  variables:
@@ -897,9 +999,6 @@ www ๐Ÿงช test:
897
999
  - when: never
898
1000
  if: $CI_PIPELINE_SOURCE == "trigger"
899
1001
  - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && $CI_COMMIT_MESSAGE !~ /^chore\\(release\\).*/
900
- - when: never
901
- if: $CI_PIPELINE_SOURCE == "trigger"
902
- - if: $CI_MERGE_REQUEST_ID
903
1002
  needs: []
904
1003
  retry: *a1
905
1004
  interruptible: true
@@ -967,6 +1066,7 @@ www ๐Ÿงช test:
967
1066
  - www/dist
968
1067
  exclude:
969
1068
  - www/.env
1069
+ - www/.next/cache/**/*
970
1070
  expire_in: 1 day
971
1071
  when: always
972
1072
  reports: {}
@@ -1039,19 +1139,128 @@ www ๐Ÿงช test:
1039
1139
  needs:
1040
1140
  - job: 'api ๐Ÿš€ Deploy | dev '
1041
1141
  artifacts: false
1042
- - job: www ๐Ÿ‘ฎ lint
1142
+ - job: 'www ๐Ÿ‘ฎ lint | dev '
1043
1143
  artifacts: false
1044
1144
  - job: 'www ๐Ÿ”จ app | dev '
1045
1145
  artifacts: true
1046
- - job: www ๐Ÿงช test
1146
+ - job: 'www ๐Ÿงช test | dev '
1047
1147
  artifacts: false
1048
1148
  - job: 'www ๐Ÿงพ sbom | dev '
1049
1149
  artifacts: true
1050
- - job: www ๐Ÿ›ก audit
1150
+ - job: 'www ๐Ÿ›ก audit | dev '
1051
1151
  artifacts: false
1052
1152
  retry: *a1
1053
1153
  interruptible: true
1054
1154
  allow_failure: false
1155
+ 'www ๐Ÿ›ก audit | review ':
1156
+ stage: test
1157
+ image: path/to/docker/jobs-default:the-version
1158
+ variables:
1159
+ KUBERNETES_CPU_REQUEST: '0.45'
1160
+ KUBERNETES_MEMORY_REQUEST: 1Gi
1161
+ KUBERNETES_MEMORY_LIMIT: 4Gi
1162
+ script:
1163
+ - collapseable_section_start "injectvars" "Injecting variables"
1164
+ - export APP_PATH="www"
1165
+ - collapseable_section_end "injectvars"
1166
+ - cd www
1167
+ - yarn npm audit --environment production
1168
+ rules:
1169
+ - when: never
1170
+ if: $CI_PIPELINE_SOURCE == "trigger"
1171
+ - if: $CI_MERGE_REQUEST_ID
1172
+ needs: []
1173
+ retry: *a1
1174
+ interruptible: true
1175
+ allow_failure: true
1176
+ 'www ๐Ÿ‘ฎ lint | review ':
1177
+ stage: test
1178
+ image: path/to/docker/jobs-default:the-version
1179
+ variables:
1180
+ KUBERNETES_CPU_REQUEST: '0.45'
1181
+ KUBERNETES_MEMORY_REQUEST: 1Gi
1182
+ KUBERNETES_MEMORY_LIMIT: 4Gi
1183
+ script:
1184
+ - collapseable_section_start "injectvars" "Injecting variables"
1185
+ - export APP_PATH="www"
1186
+ - collapseable_section_end "injectvars"
1187
+ - collapseable_section_start "nodeinstall" "Ensure node version"
1188
+ - if [ -f ~/.nvm/nvm.sh ]; then source ~/.nvm/nvm.sh; fi
1189
+ - if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi
1190
+ - collapseable_section_end "nodeinstall"
1191
+ - cd www
1192
+ - collapseable_section_start "nodeinstall" "Ensure node version"
1193
+ - if [ -f ~/.nvm/nvm.sh ]; then source ~/.nvm/nvm.sh; fi
1194
+ - if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi
1195
+ - collapseable_section_end "nodeinstall"
1196
+ - collapseable_section_start "yarninstall" "Yarn install"
1197
+ - yarn install --immutable
1198
+ - collapseable_section_end "yarninstall"
1199
+ - yarn lint
1200
+ cache:
1201
+ - key: www-yarn-mr$CI_MERGE_REQUEST_IID
1202
+ policy: pull-push
1203
+ paths:
1204
+ - www/.yarn
1205
+ fallback_keys:
1206
+ - www-yarn
1207
+ - key: www-node-modules-mr$CI_MERGE_REQUEST_IID
1208
+ policy: pull-push
1209
+ paths:
1210
+ - www/node_modules
1211
+ fallback_keys:
1212
+ - www-node-modules
1213
+ rules:
1214
+ - when: never
1215
+ if: $CI_PIPELINE_SOURCE == "trigger"
1216
+ - if: $CI_MERGE_REQUEST_ID
1217
+ needs: []
1218
+ retry: *a1
1219
+ interruptible: true
1220
+ 'www ๐Ÿงช test | review ':
1221
+ stage: test
1222
+ image: path/to/docker/jobs-testing-chrome:the-version
1223
+ variables:
1224
+ KUBERNETES_CPU_REQUEST: '0.45'
1225
+ KUBERNETES_MEMORY_REQUEST: 1Gi
1226
+ KUBERNETES_MEMORY_LIMIT: 4Gi
1227
+ script:
1228
+ - collapseable_section_start "injectvars" "Injecting variables"
1229
+ - export APP_PATH="www"
1230
+ - collapseable_section_end "injectvars"
1231
+ - collapseable_section_start "nodeinstall" "Ensure node version"
1232
+ - if [ -f ~/.nvm/nvm.sh ]; then source ~/.nvm/nvm.sh; fi
1233
+ - if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi
1234
+ - collapseable_section_end "nodeinstall"
1235
+ - cd www
1236
+ - collapseable_section_start "nodeinstall" "Ensure node version"
1237
+ - if [ -f ~/.nvm/nvm.sh ]; then source ~/.nvm/nvm.sh; fi
1238
+ - if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi
1239
+ - collapseable_section_end "nodeinstall"
1240
+ - collapseable_section_start "yarninstall" "Yarn install"
1241
+ - yarn install --immutable
1242
+ - collapseable_section_end "yarninstall"
1243
+ - yarn test
1244
+ cache:
1245
+ - key: www-yarn-mr$CI_MERGE_REQUEST_IID
1246
+ policy: pull-push
1247
+ paths:
1248
+ - www/.yarn
1249
+ fallback_keys:
1250
+ - www-yarn
1251
+ - key: www-node-modules-mr$CI_MERGE_REQUEST_IID
1252
+ policy: pull-push
1253
+ paths:
1254
+ - www/node_modules
1255
+ fallback_keys:
1256
+ - www-node-modules
1257
+ rules:
1258
+ - when: never
1259
+ if: $CI_PIPELINE_SOURCE == "trigger"
1260
+ - if: $CI_MERGE_REQUEST_ID
1261
+ needs: []
1262
+ retry: *a1
1263
+ interruptible: true
1055
1264
  'www ๐Ÿ”จ app | review ':
1056
1265
  stage: build
1057
1266
  image: path/to/docker/jobs-default:the-version
@@ -1101,14 +1310,18 @@ www ๐Ÿงช test:
1101
1310
  - collapseable_section_end "yarninstall"
1102
1311
  - yarn build
1103
1312
  cache:
1104
- - key: www-yarn
1313
+ - key: www-yarn-mr$CI_MERGE_REQUEST_IID
1105
1314
  policy: pull-push
1106
1315
  paths:
1107
1316
  - www/.yarn
1108
- - key: www-node-modules
1317
+ fallback_keys:
1318
+ - www-yarn
1319
+ - key: www-node-modules-mr$CI_MERGE_REQUEST_IID
1109
1320
  policy: pull-push
1110
1321
  paths:
1111
1322
  - www/node_modules
1323
+ fallback_keys:
1324
+ - www-node-modules
1112
1325
  artifacts:
1113
1326
  paths:
1114
1327
  - www/__build_info.json
@@ -1116,6 +1329,7 @@ www ๐Ÿงช test:
1116
1329
  - www/dist
1117
1330
  exclude:
1118
1331
  - www/.env
1332
+ - www/.next/cache/**/*
1119
1333
  expire_in: 1 day
1120
1334
  when: always
1121
1335
  reports: {}
@@ -1188,15 +1402,15 @@ www ๐Ÿงช test:
1188
1402
  needs:
1189
1403
  - job: 'api ๐Ÿš€ Deploy | review '
1190
1404
  artifacts: false
1191
- - job: www ๐Ÿ‘ฎ lint
1405
+ - job: 'www ๐Ÿ‘ฎ lint | review '
1192
1406
  artifacts: false
1193
1407
  - job: 'www ๐Ÿ”จ app | review '
1194
1408
  artifacts: true
1195
- - job: www ๐Ÿงช test
1409
+ - job: 'www ๐Ÿงช test | review '
1196
1410
  artifacts: false
1197
1411
  - job: 'www ๐Ÿงพ sbom | review '
1198
1412
  artifacts: true
1199
- - job: www ๐Ÿ›ก audit
1413
+ - job: 'www ๐Ÿ›ก audit | review '
1200
1414
  artifacts: false
1201
1415
  retry: *a1
1202
1416
  interruptible: true
@@ -1265,6 +1479,7 @@ www ๐Ÿงช test:
1265
1479
  - www/dist
1266
1480
  exclude:
1267
1481
  - www/.env
1482
+ - www/.next/cache/**/*
1268
1483
  expire_in: 1 day
1269
1484
  when: always
1270
1485
  reports: {}
@@ -1408,6 +1623,7 @@ www ๐Ÿงช test:
1408
1623
  - www/dist
1409
1624
  exclude:
1410
1625
  - www/.env
1626
+ - www/.next/cache/**/*
1411
1627
  expire_in: 1 day
1412
1628
  when: always
1413
1629
  reports: {}