@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
- 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
@@ -482,17 +473,17 @@ www ๐Ÿงช test:
482
473
  - when: on_success
483
474
  if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && $CI_COMMIT_MESSAGE !~ /^chore\\(release\\).*/
484
475
  needs:
485
- - job: www ๐Ÿ‘ฎ lint
476
+ - job: 'www ๐Ÿ‘ฎ lint | dev '
486
477
  artifacts: false
487
478
  - job: 'www ๐Ÿ”จ app | dev '
488
479
  artifacts: false
489
480
  - job: 'www ๐Ÿ”จ docker | dev '
490
481
  artifacts: false
491
- - job: www ๐Ÿงช test
482
+ - job: 'www ๐Ÿงช test | dev '
492
483
  artifacts: false
493
484
  - job: 'www ๐Ÿงพ sbom | dev '
494
485
  artifacts: true
495
- - job: www ๐Ÿ›ก audit
486
+ - job: 'www ๐Ÿ›ก audit | dev '
496
487
  artifacts: false
497
488
  retry: *a1
498
489
  interruptible: true
@@ -531,6 +522,115 @@ www ๐Ÿงช test:
531
522
  retry: *a1
532
523
  interruptible: true
533
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
534
634
  'www ๐Ÿ”จ app | review ':
535
635
  stage: build
536
636
  image: path/to/docker/jobs-default:the-version
@@ -588,18 +688,24 @@ www ๐Ÿงช test:
588
688
  - collapseable_section_end "yarninstall"
589
689
  - yarn build
590
690
  cache:
591
- - key: www-yarn
691
+ - key: www-yarn-mr$CI_MERGE_REQUEST_IID
592
692
  policy: pull-push
593
693
  paths:
594
694
  - www/.yarn
595
- - key: www-node-modules
695
+ fallback_keys:
696
+ - www-yarn
697
+ - key: www-node-modules-mr$CI_MERGE_REQUEST_IID
596
698
  policy: pull-push
597
699
  paths:
598
700
  - www/node_modules
599
- - key: www-default
701
+ fallback_keys:
702
+ - www-node-modules
703
+ - key: www-default-mr$CI_MERGE_REQUEST_IID
600
704
  policy: pull-push
601
705
  paths:
602
706
  - www/.next/cache
707
+ fallback_keys:
708
+ - www-default
603
709
  artifacts:
604
710
  paths:
605
711
  - www/__build_info.json
@@ -666,10 +772,12 @@ www ๐Ÿงช test:
666
772
  - docker push $DOCKER_CACHE_IMAGE
667
773
  - collapseable_section_end "docker-push"
668
774
  cache:
669
- - key: www-yarn
775
+ - key: www-yarn-mr$CI_MERGE_REQUEST_IID
670
776
  policy: pull
671
777
  paths:
672
778
  - www/.yarn
779
+ fallback_keys:
780
+ - www-yarn
673
781
  rules:
674
782
  - when: never
675
783
  if: $CI_PIPELINE_SOURCE == "trigger"
@@ -799,17 +907,17 @@ www ๐Ÿงช test:
799
907
  - when: on_success
800
908
  if: $CI_MERGE_REQUEST_ID
801
909
  needs:
802
- - job: www ๐Ÿ‘ฎ lint
910
+ - job: 'www ๐Ÿ‘ฎ lint | review '
803
911
  artifacts: false
804
912
  - job: 'www ๐Ÿ”จ app | review '
805
913
  artifacts: false
806
914
  - job: 'www ๐Ÿ”จ docker | review '
807
915
  artifacts: false
808
- - job: www ๐Ÿงช test
916
+ - job: 'www ๐Ÿงช test | review '
809
917
  artifacts: false
810
918
  - job: 'www ๐Ÿงพ sbom | review '
811
919
  artifacts: true
812
- - job: www ๐Ÿ›ก audit
920
+ - job: 'www ๐Ÿ›ก audit | review '
813
921
  artifacts: false
814
922
  retry: *a1
815
923
  interruptible: true