@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
- app ๐Ÿ›ก audit:
106
+ 'app ๐Ÿ›ก audit | dev ':
107
107
  stage: test
108
108
  image: path/to/docker/jobs-default:the-version
109
109
  variables:
@@ -122,9 +122,6 @@ app ๐Ÿ›ก audit:
122
122
  - when: never
123
123
  if: $CI_PIPELINE_SOURCE == "trigger"
124
124
  - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && $CI_COMMIT_MESSAGE !~ /^chore\\(release\\).*/
125
- - when: never
126
- if: $CI_PIPELINE_SOURCE == "trigger"
127
- - if: $CI_MERGE_REQUEST_ID
128
125
  needs: []
129
126
  retry: &a1
130
127
  max: 2
@@ -133,7 +130,7 @@ app ๐Ÿ›ก audit:
133
130
  - stuck_or_timeout_failure
134
131
  interruptible: true
135
132
  allow_failure: true
136
- app ๐Ÿ‘ฎ lint:
133
+ 'app ๐Ÿ‘ฎ lint | dev ':
137
134
  stage: test
138
135
  image: path/to/docker/jobs-default:the-version
139
136
  variables:
@@ -172,13 +169,10 @@ app ๐Ÿ‘ฎ lint:
172
169
  - when: never
173
170
  if: $CI_PIPELINE_SOURCE == "trigger"
174
171
  - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && $CI_COMMIT_MESSAGE !~ /^chore\\(release\\).*/
175
- - when: never
176
- if: $CI_PIPELINE_SOURCE == "trigger"
177
- - if: $CI_MERGE_REQUEST_ID
178
172
  needs: []
179
173
  retry: *a1
180
174
  interruptible: true
181
- app ๐Ÿงช test:
175
+ 'app ๐Ÿงช test | dev ':
182
176
  stage: test
183
177
  image: path/to/docker/jobs-testing-chrome:the-version
184
178
  variables:
@@ -217,9 +211,6 @@ app ๐Ÿงช test:
217
211
  - when: never
218
212
  if: $CI_PIPELINE_SOURCE == "trigger"
219
213
  - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && $CI_COMMIT_MESSAGE !~ /^chore\\(release\\).*/
220
- - when: never
221
- if: $CI_PIPELINE_SOURCE == "trigger"
222
- - if: $CI_MERGE_REQUEST_ID
223
214
  needs: []
224
215
  retry: *a1
225
216
  interruptible: true
@@ -398,19 +389,134 @@ app ๐Ÿงช test:
398
389
  - when: on_success
399
390
  if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && $CI_COMMIT_MESSAGE !~ /^chore\\(release\\).*/
400
391
  needs:
401
- - job: app ๐Ÿ‘ฎ lint
392
+ - job: 'app ๐Ÿ‘ฎ lint | dev '
402
393
  artifacts: false
403
394
  - job: 'app ๐Ÿ”จ app | dev '
404
395
  artifacts: true
405
- - job: app ๐Ÿงช test
396
+ - job: 'app ๐Ÿงช test | dev '
406
397
  artifacts: false
407
398
  - job: 'app ๐Ÿงพ sbom | dev '
408
399
  artifacts: true
409
- - job: app ๐Ÿ›ก audit
400
+ - job: 'app ๐Ÿ›ก audit | dev '
410
401
  artifacts: false
411
402
  retry: *a1
412
403
  interruptible: true
413
404
  allow_failure: false
405
+ 'app ๐Ÿ›ก audit | review ':
406
+ stage: test
407
+ image: path/to/docker/jobs-default:the-version
408
+ variables:
409
+ KUBERNETES_CPU_REQUEST: '0.45'
410
+ KUBERNETES_MEMORY_REQUEST: 1Gi
411
+ KUBERNETES_MEMORY_LIMIT: 4Gi
412
+ script:
413
+ - collapseable_section_start "injectvars" "Injecting variables"
414
+ - export APP_PATH="app"
415
+ - export LC_A="L=en_US.UTF-8"
416
+ - export LANG="en_US.UTF-8"
417
+ - collapseable_section_end "injectvars"
418
+ - cd app
419
+ - yarn npm audit --environment production
420
+ rules:
421
+ - when: never
422
+ if: $CI_PIPELINE_SOURCE == "trigger"
423
+ - if: $CI_MERGE_REQUEST_ID
424
+ needs: []
425
+ retry: *a1
426
+ interruptible: true
427
+ allow_failure: true
428
+ 'app ๐Ÿ‘ฎ lint | review ':
429
+ stage: test
430
+ image: path/to/docker/jobs-default:the-version
431
+ variables:
432
+ KUBERNETES_CPU_REQUEST: '0.45'
433
+ KUBERNETES_MEMORY_REQUEST: 1Gi
434
+ KUBERNETES_MEMORY_LIMIT: 4Gi
435
+ script:
436
+ - collapseable_section_start "injectvars" "Injecting variables"
437
+ - export APP_PATH="app"
438
+ - export LC_A="L=en_US.UTF-8"
439
+ - export LANG="en_US.UTF-8"
440
+ - collapseable_section_end "injectvars"
441
+ - collapseable_section_start "nodeinstall" "Ensure node version"
442
+ - if [ -f ~/.nvm/nvm.sh ]; then source ~/.nvm/nvm.sh; fi
443
+ - if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi
444
+ - collapseable_section_end "nodeinstall"
445
+ - cd app
446
+ - collapseable_section_start "nodeinstall" "Ensure node version"
447
+ - if [ -f ~/.nvm/nvm.sh ]; then source ~/.nvm/nvm.sh; fi
448
+ - if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi
449
+ - collapseable_section_end "nodeinstall"
450
+ - collapseable_section_start "yarninstall" "Yarn install"
451
+ - yarn install --immutable
452
+ - collapseable_section_end "yarninstall"
453
+ - yarn lint
454
+ cache:
455
+ - key: app-yarn-mr$CI_MERGE_REQUEST_IID
456
+ policy: pull-push
457
+ paths:
458
+ - app/.yarn
459
+ fallback_keys:
460
+ - app-yarn
461
+ - key: app-node-modules-mr$CI_MERGE_REQUEST_IID
462
+ policy: pull-push
463
+ paths:
464
+ - app/node_modules
465
+ fallback_keys:
466
+ - app-node-modules
467
+ rules:
468
+ - when: never
469
+ if: $CI_PIPELINE_SOURCE == "trigger"
470
+ - if: $CI_MERGE_REQUEST_ID
471
+ needs: []
472
+ retry: *a1
473
+ interruptible: true
474
+ 'app ๐Ÿงช test | review ':
475
+ stage: test
476
+ image: path/to/docker/jobs-testing-chrome:the-version
477
+ variables:
478
+ KUBERNETES_CPU_REQUEST: '0.45'
479
+ KUBERNETES_MEMORY_REQUEST: 1Gi
480
+ KUBERNETES_MEMORY_LIMIT: 4Gi
481
+ script:
482
+ - collapseable_section_start "injectvars" "Injecting variables"
483
+ - export APP_PATH="app"
484
+ - export LC_A="L=en_US.UTF-8"
485
+ - export LANG="en_US.UTF-8"
486
+ - collapseable_section_end "injectvars"
487
+ - collapseable_section_start "nodeinstall" "Ensure node version"
488
+ - if [ -f ~/.nvm/nvm.sh ]; then source ~/.nvm/nvm.sh; fi
489
+ - if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi
490
+ - collapseable_section_end "nodeinstall"
491
+ - cd app
492
+ - collapseable_section_start "nodeinstall" "Ensure node version"
493
+ - if [ -f ~/.nvm/nvm.sh ]; then source ~/.nvm/nvm.sh; fi
494
+ - if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi
495
+ - collapseable_section_end "nodeinstall"
496
+ - collapseable_section_start "yarninstall" "Yarn install"
497
+ - yarn install --immutable
498
+ - collapseable_section_end "yarninstall"
499
+ - yarn test
500
+ cache:
501
+ - key: app-yarn-mr$CI_MERGE_REQUEST_IID
502
+ policy: pull-push
503
+ paths:
504
+ - app/.yarn
505
+ fallback_keys:
506
+ - app-yarn
507
+ - key: app-node-modules-mr$CI_MERGE_REQUEST_IID
508
+ policy: pull-push
509
+ paths:
510
+ - app/node_modules
511
+ fallback_keys:
512
+ - app-node-modules
513
+ rules:
514
+ - when: never
515
+ if: $CI_PIPELINE_SOURCE == "trigger"
516
+ - if: $CI_MERGE_REQUEST_ID
517
+ needs: []
518
+ retry: *a1
519
+ interruptible: true
414
520
  'app ๐Ÿ”จ app | review ':
415
521
  stage: build
416
522
  tags:
@@ -476,14 +582,18 @@ app ๐Ÿงช test:
476
582
  - bundle exec pod install --project-directory=ios
477
583
  - bundle exec fastlane build
478
584
  cache:
479
- - key: app-yarn
585
+ - key: app-yarn-mr$CI_MERGE_REQUEST_IID
480
586
  policy: pull-push
481
587
  paths:
482
588
  - app/.yarn
483
- - key: app-node-modules
589
+ fallback_keys:
590
+ - app-yarn
591
+ - key: app-node-modules-mr$CI_MERGE_REQUEST_IID
484
592
  policy: pull-push
485
593
  paths:
486
594
  - app/node_modules
595
+ fallback_keys:
596
+ - app-node-modules
487
597
  - key:
488
598
  files:
489
599
  - app/Gemfile.lock
@@ -586,15 +696,15 @@ app ๐Ÿงช test:
586
696
  - when: on_success
587
697
  if: $CI_MERGE_REQUEST_ID
588
698
  needs:
589
- - job: app ๐Ÿ‘ฎ lint
699
+ - job: 'app ๐Ÿ‘ฎ lint | review '
590
700
  artifacts: false
591
701
  - job: 'app ๐Ÿ”จ app | review '
592
702
  artifacts: true
593
- - job: app ๐Ÿงช test
703
+ - job: 'app ๐Ÿงช test | review '
594
704
  artifacts: false
595
705
  - job: 'app ๐Ÿงพ sbom | review '
596
706
  artifacts: true
597
- - job: app ๐Ÿ›ก audit
707
+ - job: 'app ๐Ÿ›ก audit | review '
598
708
  artifacts: false
599
709
  retry: *a1
600
710
  interruptible: true
@@ -963,7 +1073,7 @@ app ๐Ÿงช test:
963
1073
  retry: *a1
964
1074
  interruptible: true
965
1075
  allow_failure: true
966
- api ๐Ÿ›ก audit:
1076
+ 'api ๐Ÿ›ก audit | dev ':
967
1077
  stage: test
968
1078
  image: path/to/docker/jobs-default:the-version
969
1079
  variables:
@@ -980,14 +1090,11 @@ api ๐Ÿ›ก audit:
980
1090
  - when: never
981
1091
  if: $CI_PIPELINE_SOURCE == "trigger"
982
1092
  - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && $CI_COMMIT_MESSAGE !~ /^chore\\(release\\).*/
983
- - when: never
984
- if: $CI_PIPELINE_SOURCE == "trigger"
985
- - if: $CI_MERGE_REQUEST_ID
986
1093
  needs: []
987
1094
  retry: *a1
988
1095
  interruptible: true
989
1096
  allow_failure: true
990
- api ๐Ÿ‘ฎ lint:
1097
+ 'api ๐Ÿ‘ฎ lint | dev ':
991
1098
  stage: test
992
1099
  image: path/to/docker/jobs-default:the-version
993
1100
  variables:
@@ -1024,13 +1131,10 @@ api ๐Ÿ‘ฎ lint:
1024
1131
  - when: never
1025
1132
  if: $CI_PIPELINE_SOURCE == "trigger"
1026
1133
  - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && $CI_COMMIT_MESSAGE !~ /^chore\\(release\\).*/
1027
- - when: never
1028
- if: $CI_PIPELINE_SOURCE == "trigger"
1029
- - if: $CI_MERGE_REQUEST_ID
1030
1134
  needs: []
1031
1135
  retry: *a1
1032
1136
  interruptible: true
1033
- api ๐Ÿงช test:
1137
+ 'api ๐Ÿงช test | dev ':
1034
1138
  stage: test
1035
1139
  image: path/to/docker/jobs-testing-chrome:the-version
1036
1140
  variables:
@@ -1067,9 +1171,6 @@ api ๐Ÿงช test:
1067
1171
  - when: never
1068
1172
  if: $CI_PIPELINE_SOURCE == "trigger"
1069
1173
  - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && $CI_COMMIT_MESSAGE !~ /^chore\\(release\\).*/
1070
- - when: never
1071
- if: $CI_PIPELINE_SOURCE == "trigger"
1072
- - if: $CI_MERGE_REQUEST_ID
1073
1174
  needs: []
1074
1175
  retry: *a1
1075
1176
  interruptible: true
@@ -1334,17 +1435,17 @@ api ๐Ÿงช test:
1334
1435
  - when: on_success
1335
1436
  if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && $CI_COMMIT_MESSAGE !~ /^chore\\(release\\).*/
1336
1437
  needs:
1337
- - job: api ๐Ÿ‘ฎ lint
1438
+ - job: 'api ๐Ÿ‘ฎ lint | dev '
1338
1439
  artifacts: false
1339
1440
  - job: 'api ๐Ÿ”จ app | dev '
1340
1441
  artifacts: false
1341
1442
  - job: 'api ๐Ÿ”จ docker | dev '
1342
1443
  artifacts: false
1343
- - job: api ๐Ÿงช test
1444
+ - job: 'api ๐Ÿงช test | dev '
1344
1445
  artifacts: false
1345
1446
  - job: 'api ๐Ÿงพ sbom | dev '
1346
1447
  artifacts: true
1347
- - job: api ๐Ÿ›ก audit
1448
+ - job: 'api ๐Ÿ›ก audit | dev '
1348
1449
  artifacts: false
1349
1450
  retry: *a1
1350
1451
  interruptible: true
@@ -1383,6 +1484,115 @@ api ๐Ÿงช test:
1383
1484
  retry: *a1
1384
1485
  interruptible: true
1385
1486
  allow_failure: true
1487
+ 'api ๐Ÿ›ก audit | review ':
1488
+ stage: test
1489
+ image: path/to/docker/jobs-default:the-version
1490
+ variables:
1491
+ KUBERNETES_CPU_REQUEST: '0.45'
1492
+ KUBERNETES_MEMORY_REQUEST: 1Gi
1493
+ KUBERNETES_MEMORY_LIMIT: 4Gi
1494
+ script:
1495
+ - collapseable_section_start "injectvars" "Injecting variables"
1496
+ - export APP_PATH="api"
1497
+ - collapseable_section_end "injectvars"
1498
+ - cd api
1499
+ - yarn npm audit --environment production
1500
+ rules:
1501
+ - when: never
1502
+ if: $CI_PIPELINE_SOURCE == "trigger"
1503
+ - if: $CI_MERGE_REQUEST_ID
1504
+ needs: []
1505
+ retry: *a1
1506
+ interruptible: true
1507
+ allow_failure: true
1508
+ 'api ๐Ÿ‘ฎ lint | review ':
1509
+ stage: test
1510
+ image: path/to/docker/jobs-default:the-version
1511
+ variables:
1512
+ KUBERNETES_CPU_REQUEST: '0.45'
1513
+ KUBERNETES_MEMORY_REQUEST: 1Gi
1514
+ KUBERNETES_MEMORY_LIMIT: 4Gi
1515
+ script:
1516
+ - collapseable_section_start "injectvars" "Injecting variables"
1517
+ - export APP_PATH="api"
1518
+ - collapseable_section_end "injectvars"
1519
+ - collapseable_section_start "nodeinstall" "Ensure node version"
1520
+ - if [ -f ~/.nvm/nvm.sh ]; then source ~/.nvm/nvm.sh; fi
1521
+ - if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi
1522
+ - collapseable_section_end "nodeinstall"
1523
+ - cd api
1524
+ - collapseable_section_start "nodeinstall" "Ensure node version"
1525
+ - if [ -f ~/.nvm/nvm.sh ]; then source ~/.nvm/nvm.sh; fi
1526
+ - if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi
1527
+ - collapseable_section_end "nodeinstall"
1528
+ - collapseable_section_start "yarninstall" "Yarn install"
1529
+ - yarn install --immutable
1530
+ - collapseable_section_end "yarninstall"
1531
+ - yarn lint
1532
+ cache:
1533
+ - key: api-yarn-mr$CI_MERGE_REQUEST_IID
1534
+ policy: pull-push
1535
+ paths:
1536
+ - api/.yarn
1537
+ fallback_keys:
1538
+ - api-yarn
1539
+ - key: api-node-modules-mr$CI_MERGE_REQUEST_IID
1540
+ policy: pull-push
1541
+ paths:
1542
+ - api/node_modules
1543
+ fallback_keys:
1544
+ - api-node-modules
1545
+ rules:
1546
+ - when: never
1547
+ if: $CI_PIPELINE_SOURCE == "trigger"
1548
+ - if: $CI_MERGE_REQUEST_ID
1549
+ needs: []
1550
+ retry: *a1
1551
+ interruptible: true
1552
+ 'api ๐Ÿงช test | review ':
1553
+ stage: test
1554
+ image: path/to/docker/jobs-testing-chrome:the-version
1555
+ variables:
1556
+ KUBERNETES_CPU_REQUEST: '0.45'
1557
+ KUBERNETES_MEMORY_REQUEST: 1Gi
1558
+ KUBERNETES_MEMORY_LIMIT: 4Gi
1559
+ script:
1560
+ - collapseable_section_start "injectvars" "Injecting variables"
1561
+ - export APP_PATH="api"
1562
+ - collapseable_section_end "injectvars"
1563
+ - collapseable_section_start "nodeinstall" "Ensure node version"
1564
+ - if [ -f ~/.nvm/nvm.sh ]; then source ~/.nvm/nvm.sh; fi
1565
+ - if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi
1566
+ - collapseable_section_end "nodeinstall"
1567
+ - cd api
1568
+ - collapseable_section_start "nodeinstall" "Ensure node version"
1569
+ - if [ -f ~/.nvm/nvm.sh ]; then source ~/.nvm/nvm.sh; fi
1570
+ - if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi
1571
+ - collapseable_section_end "nodeinstall"
1572
+ - collapseable_section_start "yarninstall" "Yarn install"
1573
+ - yarn install --immutable
1574
+ - collapseable_section_end "yarninstall"
1575
+ - yarn test
1576
+ cache:
1577
+ - key: api-yarn-mr$CI_MERGE_REQUEST_IID
1578
+ policy: pull-push
1579
+ paths:
1580
+ - api/.yarn
1581
+ fallback_keys:
1582
+ - api-yarn
1583
+ - key: api-node-modules-mr$CI_MERGE_REQUEST_IID
1584
+ policy: pull-push
1585
+ paths:
1586
+ - api/node_modules
1587
+ fallback_keys:
1588
+ - api-node-modules
1589
+ rules:
1590
+ - when: never
1591
+ if: $CI_PIPELINE_SOURCE == "trigger"
1592
+ - if: $CI_MERGE_REQUEST_ID
1593
+ needs: []
1594
+ retry: *a1
1595
+ interruptible: true
1386
1596
  'api ๐Ÿ”จ app | review ':
1387
1597
  stage: build
1388
1598
  image: path/to/docker/jobs-default:the-version
@@ -1440,14 +1650,18 @@ api ๐Ÿงช test:
1440
1650
  - collapseable_section_end "yarninstall"
1441
1651
  - yarn build
1442
1652
  cache:
1443
- - key: api-yarn
1653
+ - key: api-yarn-mr$CI_MERGE_REQUEST_IID
1444
1654
  policy: pull-push
1445
1655
  paths:
1446
1656
  - api/.yarn
1447
- - key: api-node-modules
1657
+ fallback_keys:
1658
+ - api-yarn
1659
+ - key: api-node-modules-mr$CI_MERGE_REQUEST_IID
1448
1660
  policy: pull-push
1449
1661
  paths:
1450
1662
  - api/node_modules
1663
+ fallback_keys:
1664
+ - api-node-modules
1451
1665
  artifacts:
1452
1666
  paths:
1453
1667
  - api/__build_info.json
@@ -1514,10 +1728,12 @@ api ๐Ÿงช test:
1514
1728
  - docker push $DOCKER_CACHE_IMAGE
1515
1729
  - collapseable_section_end "docker-push"
1516
1730
  cache:
1517
- - key: api-yarn
1731
+ - key: api-yarn-mr$CI_MERGE_REQUEST_IID
1518
1732
  policy: pull
1519
1733
  paths:
1520
1734
  - api/.yarn
1735
+ fallback_keys:
1736
+ - api-yarn
1521
1737
  rules:
1522
1738
  - when: never
1523
1739
  if: $CI_PIPELINE_SOURCE == "trigger"
@@ -1647,17 +1863,17 @@ api ๐Ÿงช test:
1647
1863
  - when: on_success
1648
1864
  if: $CI_MERGE_REQUEST_ID
1649
1865
  needs:
1650
- - job: api ๐Ÿ‘ฎ lint
1866
+ - job: 'api ๐Ÿ‘ฎ lint | review '
1651
1867
  artifacts: false
1652
1868
  - job: 'api ๐Ÿ”จ app | review '
1653
1869
  artifacts: false
1654
1870
  - job: 'api ๐Ÿ”จ docker | review '
1655
1871
  artifacts: false
1656
- - job: api ๐Ÿงช test
1872
+ - job: 'api ๐Ÿงช test | review '
1657
1873
  artifacts: false
1658
1874
  - job: 'api ๐Ÿงพ sbom | review '
1659
1875
  artifacts: true
1660
- - job: api ๐Ÿ›ก audit
1876
+ - job: 'api ๐Ÿ›ก audit | review '
1661
1877
  artifacts: false
1662
1878
  retry: *a1
1663
1879
  interruptible: true