@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
- web 🛡 audit:
106
+ 'web 🛡 audit | dev ':
107
107
  stage: test
108
108
  image: path/to/docker/jobs-default:the-version
109
109
  variables:
@@ -120,9 +120,6 @@ web 🛡 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 @@ web 🛡 audit:
131
128
  - stuck_or_timeout_failure
132
129
  interruptible: true
133
130
  allow_failure: true
134
- web 👮 lint:
131
+ 'web 👮 lint | dev ':
135
132
  stage: test
136
133
  image: path/to/docker/jobs-default:the-version
137
134
  variables:
@@ -168,13 +165,10 @@ web 👮 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
- web 🧪 test:
171
+ 'web 🧪 test | dev ':
178
172
  stage: test
179
173
  image: path/to/docker/jobs-testing-chrome:the-version
180
174
  variables:
@@ -211,9 +205,6 @@ web 🧪 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
@@ -476,17 +467,17 @@ web 🧪 test:
476
467
  - when: on_success
477
468
  if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && $CI_COMMIT_MESSAGE !~ /^chore\\(release\\).*/
478
469
  needs:
479
- - job: web 👮 lint
470
+ - job: 'web 👮 lint | dev '
480
471
  artifacts: false
481
472
  - job: 'web 🔨 app | dev '
482
473
  artifacts: false
483
474
  - job: 'web 🔨 docker | dev '
484
475
  artifacts: false
485
- - job: web 🧪 test
476
+ - job: 'web 🧪 test | dev '
486
477
  artifacts: false
487
478
  - job: 'web 🧾 sbom | dev '
488
479
  artifacts: true
489
- - job: web 🛡 audit
480
+ - job: 'web 🛡 audit | dev '
490
481
  artifacts: false
491
482
  retry: *a1
492
483
  interruptible: true
@@ -526,6 +517,115 @@ web 🧪 test:
526
517
  retry: *a1
527
518
  interruptible: true
528
519
  allow_failure: true
520
+ 'web 🛡 audit | review ':
521
+ stage: test
522
+ image: path/to/docker/jobs-default:the-version
523
+ variables:
524
+ KUBERNETES_CPU_REQUEST: '0.45'
525
+ KUBERNETES_MEMORY_REQUEST: 1Gi
526
+ KUBERNETES_MEMORY_LIMIT: 4Gi
527
+ script:
528
+ - collapseable_section_start "injectvars" "Injecting variables"
529
+ - export APP_PATH="web"
530
+ - collapseable_section_end "injectvars"
531
+ - cd web
532
+ - yarn npm audit --environment production
533
+ rules:
534
+ - when: never
535
+ if: $CI_PIPELINE_SOURCE == "trigger"
536
+ - if: $CI_MERGE_REQUEST_ID
537
+ needs: []
538
+ retry: *a1
539
+ interruptible: true
540
+ allow_failure: true
541
+ 'web 👮 lint | review ':
542
+ stage: test
543
+ image: path/to/docker/jobs-default:the-version
544
+ variables:
545
+ KUBERNETES_CPU_REQUEST: '0.45'
546
+ KUBERNETES_MEMORY_REQUEST: 1Gi
547
+ KUBERNETES_MEMORY_LIMIT: 4Gi
548
+ script:
549
+ - collapseable_section_start "injectvars" "Injecting variables"
550
+ - export APP_PATH="web"
551
+ - collapseable_section_end "injectvars"
552
+ - collapseable_section_start "nodeinstall" "Ensure node version"
553
+ - if [ -f ~/.nvm/nvm.sh ]; then source ~/.nvm/nvm.sh; fi
554
+ - if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi
555
+ - collapseable_section_end "nodeinstall"
556
+ - cd web
557
+ - collapseable_section_start "nodeinstall" "Ensure node version"
558
+ - if [ -f ~/.nvm/nvm.sh ]; then source ~/.nvm/nvm.sh; fi
559
+ - if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi
560
+ - collapseable_section_end "nodeinstall"
561
+ - collapseable_section_start "yarninstall" "Yarn install"
562
+ - yarn install --immutable
563
+ - collapseable_section_end "yarninstall"
564
+ - yarn lint
565
+ cache:
566
+ - key: web-yarn-mr$CI_MERGE_REQUEST_IID
567
+ policy: pull-push
568
+ paths:
569
+ - web/.yarn
570
+ fallback_keys:
571
+ - web-yarn
572
+ - key: web-node-modules-mr$CI_MERGE_REQUEST_IID
573
+ policy: pull-push
574
+ paths:
575
+ - web/node_modules
576
+ fallback_keys:
577
+ - web-node-modules
578
+ rules:
579
+ - when: never
580
+ if: $CI_PIPELINE_SOURCE == "trigger"
581
+ - if: $CI_MERGE_REQUEST_ID
582
+ needs: []
583
+ retry: *a1
584
+ interruptible: true
585
+ 'web 🧪 test | review ':
586
+ stage: test
587
+ image: path/to/docker/jobs-testing-chrome:the-version
588
+ variables:
589
+ KUBERNETES_CPU_REQUEST: '0.45'
590
+ KUBERNETES_MEMORY_REQUEST: 1Gi
591
+ KUBERNETES_MEMORY_LIMIT: 4Gi
592
+ script:
593
+ - collapseable_section_start "injectvars" "Injecting variables"
594
+ - export APP_PATH="web"
595
+ - collapseable_section_end "injectvars"
596
+ - collapseable_section_start "nodeinstall" "Ensure node version"
597
+ - if [ -f ~/.nvm/nvm.sh ]; then source ~/.nvm/nvm.sh; fi
598
+ - if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi
599
+ - collapseable_section_end "nodeinstall"
600
+ - cd web
601
+ - collapseable_section_start "nodeinstall" "Ensure node version"
602
+ - if [ -f ~/.nvm/nvm.sh ]; then source ~/.nvm/nvm.sh; fi
603
+ - if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi
604
+ - collapseable_section_end "nodeinstall"
605
+ - collapseable_section_start "yarninstall" "Yarn install"
606
+ - yarn install --immutable
607
+ - collapseable_section_end "yarninstall"
608
+ - yarn test
609
+ cache:
610
+ - key: web-yarn-mr$CI_MERGE_REQUEST_IID
611
+ policy: pull-push
612
+ paths:
613
+ - web/.yarn
614
+ fallback_keys:
615
+ - web-yarn
616
+ - key: web-node-modules-mr$CI_MERGE_REQUEST_IID
617
+ policy: pull-push
618
+ paths:
619
+ - web/node_modules
620
+ fallback_keys:
621
+ - web-node-modules
622
+ rules:
623
+ - when: never
624
+ if: $CI_PIPELINE_SOURCE == "trigger"
625
+ - if: $CI_MERGE_REQUEST_ID
626
+ needs: []
627
+ retry: *a1
628
+ interruptible: true
529
629
  'web 🔨 app | review ':
530
630
  stage: build
531
631
  image: path/to/docker/jobs-meteor:the-version
@@ -588,21 +688,27 @@ web 🧪 test:
588
688
  - TOOL_NODE_FLAGS="--max_old_space_size=3584 --min_semi_space_size=8 --max_semi_space_size=256 --optimize_for_size" meteor build ./dist --architecture os.linux.x86_64 --allow-superuser --server-only --directory
589
689
  - cp ./__build_info.json ./dist/bundle/programs/server
590
690
  cache:
591
- - key: web-yarn
691
+ - key: web-yarn-mr$CI_MERGE_REQUEST_IID
592
692
  policy: pull-push
593
693
  paths:
594
694
  - web/.yarn
595
- - key: web-node-modules
695
+ fallback_keys:
696
+ - web-yarn
697
+ - key: web-node-modules-mr$CI_MERGE_REQUEST_IID
596
698
  policy: pull-push
597
699
  paths:
598
700
  - web/node_modules
599
- - key: web-meteor-build-cache
701
+ fallback_keys:
702
+ - web-node-modules
703
+ - key: web-meteor-build-cache-mr$CI_MERGE_REQUEST_IID
600
704
  policy: pull-push
601
705
  paths:
602
706
  - web/.meteor/local/resolver-result-cache.json
603
707
  - web/.meteor/local/plugin-cache
604
708
  - web/.meteor/local/isopacks
605
709
  - web/.meteor/local/bundler-cache/scanner
710
+ fallback_keys:
711
+ - web-meteor-build-cache
606
712
  artifacts:
607
713
  paths:
608
714
  - web/__build_info.json
@@ -788,17 +894,17 @@ web 🧪 test:
788
894
  - when: on_success
789
895
  if: $CI_MERGE_REQUEST_ID
790
896
  needs:
791
- - job: web 👮 lint
897
+ - job: 'web 👮 lint | review '
792
898
  artifacts: false
793
899
  - job: 'web 🔨 app | review '
794
900
  artifacts: false
795
901
  - job: 'web 🔨 docker | review '
796
902
  artifacts: false
797
- - job: web 🧪 test
903
+ - job: 'web 🧪 test | review '
798
904
  artifacts: false
799
905
  - job: 'web 🧾 sbom | review '
800
906
  artifacts: true
801
- - job: web 🛡 audit
907
+ - job: 'web 🛡 audit | review '
802
908
  artifacts: false
803
909
  retry: *a1
804
910
  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
- www 🛡 audit:
106
+ 'www 🛡 audit | dev ':
107
107
  stage: test
108
108
  image: path/to/docker/jobs-default:the-version
109
109
  variables:
@@ -120,9 +120,6 @@ www 🛡 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 @@ www 🛡 audit:
131
128
  - stuck_or_timeout_failure
132
129
  interruptible: true
133
130
  allow_failure: true
134
- www 👮 lint:
131
+ 'www 👮 lint | dev ':
135
132
  stage: test
136
133
  image: path/to/docker/jobs-default:the-version
137
134
  variables:
@@ -168,13 +165,10 @@ www 👮 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
- www 🧪 test:
171
+ 'www 🧪 test | dev ':
178
172
  stage: test
179
173
  image: path/to/docker/jobs-testing-chrome:the-version
180
174
  variables:
@@ -211,9 +205,6 @@ www 🧪 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
@@ -293,6 +284,7 @@ www 🧪 test:
293
284
  - www/dist
294
285
  exclude:
295
286
  - www/.env
287
+ - www/.next/cache/**/*
296
288
  expire_in: 1 day
297
289
  when: always
298
290
  reports: {}
@@ -481,17 +473,17 @@ www 🧪 test:
481
473
  - when: on_success
482
474
  if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && $CI_COMMIT_MESSAGE !~ /^chore\\(release\\).*/
483
475
  needs:
484
- - job: www 👮 lint
476
+ - job: 'www 👮 lint | dev '
485
477
  artifacts: false
486
478
  - job: 'www 🔨 app | dev '
487
479
  artifacts: false
488
480
  - job: 'www 🔨 docker | dev '
489
481
  artifacts: false
490
- - job: www 🧪 test
482
+ - job: 'www 🧪 test | dev '
491
483
  artifacts: false
492
484
  - job: 'www 🧾 sbom | dev '
493
485
  artifacts: true
494
- - job: www 🛡 audit
486
+ - job: 'www 🛡 audit | dev '
495
487
  artifacts: false
496
488
  retry: *a1
497
489
  interruptible: true
@@ -530,6 +522,115 @@ www 🧪 test:
530
522
  retry: *a1
531
523
  interruptible: true
532
524
  allow_failure: true
525
+ 'www 🛡 audit | review ':
526
+ stage: test
527
+ image: path/to/docker/jobs-default:the-version
528
+ variables:
529
+ KUBERNETES_CPU_REQUEST: '0.45'
530
+ KUBERNETES_MEMORY_REQUEST: 1Gi
531
+ KUBERNETES_MEMORY_LIMIT: 4Gi
532
+ script:
533
+ - collapseable_section_start "injectvars" "Injecting variables"
534
+ - export APP_PATH="www"
535
+ - collapseable_section_end "injectvars"
536
+ - cd www
537
+ - yarn npm audit --environment production
538
+ rules:
539
+ - when: never
540
+ if: $CI_PIPELINE_SOURCE == "trigger"
541
+ - if: $CI_MERGE_REQUEST_ID
542
+ needs: []
543
+ retry: *a1
544
+ interruptible: true
545
+ allow_failure: true
546
+ 'www 👮 lint | review ':
547
+ stage: test
548
+ image: path/to/docker/jobs-default:the-version
549
+ variables:
550
+ KUBERNETES_CPU_REQUEST: '0.45'
551
+ KUBERNETES_MEMORY_REQUEST: 1Gi
552
+ KUBERNETES_MEMORY_LIMIT: 4Gi
553
+ script:
554
+ - collapseable_section_start "injectvars" "Injecting variables"
555
+ - export APP_PATH="www"
556
+ - collapseable_section_end "injectvars"
557
+ - collapseable_section_start "nodeinstall" "Ensure node version"
558
+ - if [ -f ~/.nvm/nvm.sh ]; then source ~/.nvm/nvm.sh; fi
559
+ - if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi
560
+ - collapseable_section_end "nodeinstall"
561
+ - cd www
562
+ - collapseable_section_start "nodeinstall" "Ensure node version"
563
+ - if [ -f ~/.nvm/nvm.sh ]; then source ~/.nvm/nvm.sh; fi
564
+ - if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi
565
+ - collapseable_section_end "nodeinstall"
566
+ - collapseable_section_start "yarninstall" "Yarn install"
567
+ - yarn install --immutable
568
+ - collapseable_section_end "yarninstall"
569
+ - yarn lint
570
+ cache:
571
+ - key: www-yarn-mr$CI_MERGE_REQUEST_IID
572
+ policy: pull-push
573
+ paths:
574
+ - www/.yarn
575
+ fallback_keys:
576
+ - www-yarn
577
+ - key: www-node-modules-mr$CI_MERGE_REQUEST_IID
578
+ policy: pull-push
579
+ paths:
580
+ - www/node_modules
581
+ fallback_keys:
582
+ - www-node-modules
583
+ rules:
584
+ - when: never
585
+ if: $CI_PIPELINE_SOURCE == "trigger"
586
+ - if: $CI_MERGE_REQUEST_ID
587
+ needs: []
588
+ retry: *a1
589
+ interruptible: true
590
+ 'www 🧪 test | review ':
591
+ stage: test
592
+ image: path/to/docker/jobs-testing-chrome:the-version
593
+ variables:
594
+ KUBERNETES_CPU_REQUEST: '0.45'
595
+ KUBERNETES_MEMORY_REQUEST: 1Gi
596
+ KUBERNETES_MEMORY_LIMIT: 4Gi
597
+ script:
598
+ - collapseable_section_start "injectvars" "Injecting variables"
599
+ - export APP_PATH="www"
600
+ - collapseable_section_end "injectvars"
601
+ - collapseable_section_start "nodeinstall" "Ensure node version"
602
+ - if [ -f ~/.nvm/nvm.sh ]; then source ~/.nvm/nvm.sh; fi
603
+ - if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi
604
+ - collapseable_section_end "nodeinstall"
605
+ - cd www
606
+ - collapseable_section_start "nodeinstall" "Ensure node version"
607
+ - if [ -f ~/.nvm/nvm.sh ]; then source ~/.nvm/nvm.sh; fi
608
+ - if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi
609
+ - collapseable_section_end "nodeinstall"
610
+ - collapseable_section_start "yarninstall" "Yarn install"
611
+ - yarn install --immutable
612
+ - collapseable_section_end "yarninstall"
613
+ - yarn test
614
+ cache:
615
+ - key: www-yarn-mr$CI_MERGE_REQUEST_IID
616
+ policy: pull-push
617
+ paths:
618
+ - www/.yarn
619
+ fallback_keys:
620
+ - www-yarn
621
+ - key: www-node-modules-mr$CI_MERGE_REQUEST_IID
622
+ policy: pull-push
623
+ paths:
624
+ - www/node_modules
625
+ fallback_keys:
626
+ - www-node-modules
627
+ rules:
628
+ - when: never
629
+ if: $CI_PIPELINE_SOURCE == "trigger"
630
+ - if: $CI_MERGE_REQUEST_ID
631
+ needs: []
632
+ retry: *a1
633
+ interruptible: true
533
634
  'www 🔨 app | review ':
534
635
  stage: build
535
636
  image: path/to/docker/jobs-default:the-version
@@ -587,18 +688,24 @@ www 🧪 test:
587
688
  - collapseable_section_end "yarninstall"
588
689
  - yarn build
589
690
  cache:
590
- - key: www-yarn
691
+ - key: www-yarn-mr$CI_MERGE_REQUEST_IID
591
692
  policy: pull-push
592
693
  paths:
593
694
  - www/.yarn
594
- - key: www-node-modules
695
+ fallback_keys:
696
+ - www-yarn
697
+ - key: www-node-modules-mr$CI_MERGE_REQUEST_IID
595
698
  policy: pull-push
596
699
  paths:
597
700
  - www/node_modules
598
- - key: www-default
701
+ fallback_keys:
702
+ - www-node-modules
703
+ - key: www-default-mr$CI_MERGE_REQUEST_IID
599
704
  policy: pull-push
600
705
  paths:
601
706
  - www/.next/cache
707
+ fallback_keys:
708
+ - www-default
602
709
  artifacts:
603
710
  paths:
604
711
  - www/__build_info.json
@@ -606,6 +713,7 @@ www 🧪 test:
606
713
  - www/dist
607
714
  exclude:
608
715
  - www/.env
716
+ - www/.next/cache/**/*
609
717
  expire_in: 1 day
610
718
  when: always
611
719
  reports: {}
@@ -664,10 +772,12 @@ www 🧪 test:
664
772
  - docker push $DOCKER_CACHE_IMAGE
665
773
  - collapseable_section_end "docker-push"
666
774
  cache:
667
- - key: www-yarn
775
+ - key: www-yarn-mr$CI_MERGE_REQUEST_IID
668
776
  policy: pull
669
777
  paths:
670
778
  - www/.yarn
779
+ fallback_keys:
780
+ - www-yarn
671
781
  rules:
672
782
  - when: never
673
783
  if: $CI_PIPELINE_SOURCE == "trigger"
@@ -797,17 +907,17 @@ www 🧪 test:
797
907
  - when: on_success
798
908
  if: $CI_MERGE_REQUEST_ID
799
909
  needs:
800
- - job: www 👮 lint
910
+ - job: 'www 👮 lint | review '
801
911
  artifacts: false
802
912
  - job: 'www 🔨 app | review '
803
913
  artifacts: false
804
914
  - job: 'www 🔨 docker | review '
805
915
  artifacts: false
806
- - job: www 🧪 test
916
+ - job: 'www 🧪 test | review '
807
917
  artifacts: false
808
918
  - job: 'www 🧾 sbom | review '
809
919
  artifacts: true
810
- - job: www 🛡 audit
920
+ - job: 'www 🛡 audit | review '
811
921
  artifacts: false
812
922
  retry: *a1
813
923
  interruptible: true
@@ -925,6 +1035,7 @@ www 🧪 test:
925
1035
  - www/dist
926
1036
  exclude:
927
1037
  - www/.env
1038
+ - www/.next/cache/**/*
928
1039
  expire_in: 1 day
929
1040
  when: always
930
1041
  reports: {}
@@ -1231,6 +1342,7 @@ www 🧪 test:
1231
1342
  - www/dist
1232
1343
  exclude:
1233
1344
  - www/.env
1345
+ - www/.next/cache/**/*
1234
1346
  expire_in: 1 day
1235
1347
  when: always
1236
1348
  reports: {}