@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
- 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
@@ -478,17 +469,17 @@ www ๐Ÿงช test:
478
469
  - when: on_success
479
470
  if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && $CI_COMMIT_MESSAGE !~ /^chore\\(release\\).*/
480
471
  needs:
481
- - job: www ๐Ÿ‘ฎ lint
472
+ - job: 'www ๐Ÿ‘ฎ lint | dev '
482
473
  artifacts: false
483
474
  - job: 'www ๐Ÿ”จ app | dev '
484
475
  artifacts: false
485
476
  - job: 'www ๐Ÿ”จ docker | dev '
486
477
  artifacts: false
487
- - job: www ๐Ÿงช test
478
+ - job: 'www ๐Ÿงช test | dev '
488
479
  artifacts: false
489
480
  - job: 'www ๐Ÿงพ sbom | dev '
490
481
  artifacts: true
491
- - job: www ๐Ÿ›ก audit
482
+ - job: 'www ๐Ÿ›ก audit | dev '
492
483
  artifacts: false
493
484
  retry: *a1
494
485
  interruptible: true
@@ -582,6 +573,115 @@ www ๐Ÿงช test:
582
573
  artifacts: false
583
574
  retry: *a1
584
575
  interruptible: true
576
+ 'www ๐Ÿ›ก audit | review ':
577
+ stage: test
578
+ image: path/to/docker/jobs-default:the-version
579
+ variables:
580
+ KUBERNETES_CPU_REQUEST: '0.45'
581
+ KUBERNETES_MEMORY_REQUEST: 1Gi
582
+ KUBERNETES_MEMORY_LIMIT: 4Gi
583
+ script:
584
+ - collapseable_section_start "injectvars" "Injecting variables"
585
+ - export APP_PATH="www"
586
+ - collapseable_section_end "injectvars"
587
+ - cd www
588
+ - yarn npm audit --environment production
589
+ rules:
590
+ - when: never
591
+ if: $CI_PIPELINE_SOURCE == "trigger"
592
+ - if: $CI_MERGE_REQUEST_ID
593
+ needs: []
594
+ retry: *a1
595
+ interruptible: true
596
+ allow_failure: true
597
+ 'www ๐Ÿ‘ฎ lint | review ':
598
+ stage: test
599
+ image: path/to/docker/jobs-default:the-version
600
+ variables:
601
+ KUBERNETES_CPU_REQUEST: '0.45'
602
+ KUBERNETES_MEMORY_REQUEST: 1Gi
603
+ KUBERNETES_MEMORY_LIMIT: 4Gi
604
+ script:
605
+ - collapseable_section_start "injectvars" "Injecting variables"
606
+ - export APP_PATH="www"
607
+ - collapseable_section_end "injectvars"
608
+ - collapseable_section_start "nodeinstall" "Ensure node version"
609
+ - if [ -f ~/.nvm/nvm.sh ]; then source ~/.nvm/nvm.sh; fi
610
+ - if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi
611
+ - collapseable_section_end "nodeinstall"
612
+ - cd www
613
+ - collapseable_section_start "nodeinstall" "Ensure node version"
614
+ - if [ -f ~/.nvm/nvm.sh ]; then source ~/.nvm/nvm.sh; fi
615
+ - if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi
616
+ - collapseable_section_end "nodeinstall"
617
+ - collapseable_section_start "yarninstall" "Yarn install"
618
+ - yarn install --immutable
619
+ - collapseable_section_end "yarninstall"
620
+ - yarn lint
621
+ cache:
622
+ - key: www-yarn-mr$CI_MERGE_REQUEST_IID
623
+ policy: pull-push
624
+ paths:
625
+ - www/.yarn
626
+ fallback_keys:
627
+ - www-yarn
628
+ - key: www-node-modules-mr$CI_MERGE_REQUEST_IID
629
+ policy: pull-push
630
+ paths:
631
+ - www/node_modules
632
+ fallback_keys:
633
+ - www-node-modules
634
+ rules:
635
+ - when: never
636
+ if: $CI_PIPELINE_SOURCE == "trigger"
637
+ - if: $CI_MERGE_REQUEST_ID
638
+ needs: []
639
+ retry: *a1
640
+ interruptible: true
641
+ 'www ๐Ÿงช test | review ':
642
+ stage: test
643
+ image: path/to/docker/jobs-testing-chrome:the-version
644
+ variables:
645
+ KUBERNETES_CPU_REQUEST: '0.45'
646
+ KUBERNETES_MEMORY_REQUEST: 1Gi
647
+ KUBERNETES_MEMORY_LIMIT: 4Gi
648
+ script:
649
+ - collapseable_section_start "injectvars" "Injecting variables"
650
+ - export APP_PATH="www"
651
+ - collapseable_section_end "injectvars"
652
+ - collapseable_section_start "nodeinstall" "Ensure node version"
653
+ - if [ -f ~/.nvm/nvm.sh ]; then source ~/.nvm/nvm.sh; fi
654
+ - if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi
655
+ - collapseable_section_end "nodeinstall"
656
+ - cd www
657
+ - collapseable_section_start "nodeinstall" "Ensure node version"
658
+ - if [ -f ~/.nvm/nvm.sh ]; then source ~/.nvm/nvm.sh; fi
659
+ - if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi
660
+ - collapseable_section_end "nodeinstall"
661
+ - collapseable_section_start "yarninstall" "Yarn install"
662
+ - yarn install --immutable
663
+ - collapseable_section_end "yarninstall"
664
+ - yarn test
665
+ cache:
666
+ - key: www-yarn-mr$CI_MERGE_REQUEST_IID
667
+ policy: pull-push
668
+ paths:
669
+ - www/.yarn
670
+ fallback_keys:
671
+ - www-yarn
672
+ - key: www-node-modules-mr$CI_MERGE_REQUEST_IID
673
+ policy: pull-push
674
+ paths:
675
+ - www/node_modules
676
+ fallback_keys:
677
+ - www-node-modules
678
+ rules:
679
+ - when: never
680
+ if: $CI_PIPELINE_SOURCE == "trigger"
681
+ - if: $CI_MERGE_REQUEST_ID
682
+ needs: []
683
+ retry: *a1
684
+ interruptible: true
585
685
  'www ๐Ÿ”จ app | review ':
586
686
  stage: build
587
687
  image: path/to/docker/jobs-default:the-version
@@ -639,14 +739,18 @@ www ๐Ÿงช test:
639
739
  - collapseable_section_end "yarninstall"
640
740
  - yarn build
641
741
  cache:
642
- - key: www-yarn
742
+ - key: www-yarn-mr$CI_MERGE_REQUEST_IID
643
743
  policy: pull-push
644
744
  paths:
645
745
  - www/.yarn
646
- - key: www-node-modules
746
+ fallback_keys:
747
+ - www-yarn
748
+ - key: www-node-modules-mr$CI_MERGE_REQUEST_IID
647
749
  policy: pull-push
648
750
  paths:
649
751
  - www/node_modules
752
+ fallback_keys:
753
+ - www-node-modules
650
754
  artifacts:
651
755
  paths:
652
756
  - www/__build_info.json
@@ -713,10 +817,12 @@ www ๐Ÿงช test:
713
817
  - docker push $DOCKER_CACHE_IMAGE
714
818
  - collapseable_section_end "docker-push"
715
819
  cache:
716
- - key: www-yarn
820
+ - key: www-yarn-mr$CI_MERGE_REQUEST_IID
717
821
  policy: pull
718
822
  paths:
719
823
  - www/.yarn
824
+ fallback_keys:
825
+ - www-yarn
720
826
  rules:
721
827
  - when: never
722
828
  if: $CI_PIPELINE_SOURCE == "trigger"
@@ -846,17 +952,17 @@ www ๐Ÿงช test:
846
952
  - when: on_success
847
953
  if: $CI_MERGE_REQUEST_ID
848
954
  needs:
849
- - job: www ๐Ÿ‘ฎ lint
955
+ - job: 'www ๐Ÿ‘ฎ lint | review '
850
956
  artifacts: false
851
957
  - job: 'www ๐Ÿ”จ app | review '
852
958
  artifacts: false
853
959
  - job: 'www ๐Ÿ”จ docker | review '
854
960
  artifacts: false
855
- - job: www ๐Ÿงช test
961
+ - job: 'www ๐Ÿงช test | review '
856
962
  artifacts: false
857
963
  - job: 'www ๐Ÿงพ sbom | review '
858
964
  artifacts: true
859
- - job: www ๐Ÿ›ก audit
965
+ - job: 'www ๐Ÿ›ก audit | review '
860
966
  artifacts: false
861
967
  retry: *a1
862
968
  interruptible: true
@@ -925,12 +1031,14 @@ www ๐Ÿงช test:
925
1031
  - echo "custom job for env 'review'"
926
1032
  - CYPRESS_BASE_URL=$CI_ENVIRONMENT_URL yarn cypress:run:ci
927
1033
  cache:
928
- key: cypress
1034
+ key: cypress-mr$CI_MERGE_REQUEST_IID
929
1035
  policy: pull-push
930
1036
  paths:
931
1037
  - .yarn/cache
932
1038
  - node_modules/
933
1039
  - cache/cypress
1040
+ fallback_keys:
1041
+ - cypress
934
1042
  environment:
935
1043
  name: review/$CI_COMMIT_REF_NAME/www
936
1044
  action: access
@@ -104,7 +104,7 @@ before_script:
104
104
  local section_title="\${1}"
105
105
  echo -e "section_end:\`date +%s\`:\${section_title}\\r\\e[0K"
106
106
  }
107
- app ๐Ÿ›ก audit:
107
+ 'app ๐Ÿ›ก audit | dev ':
108
108
  stage: test
109
109
  image: path/to/docker/jobs-default:the-version
110
110
  variables:
@@ -121,9 +121,6 @@ app ๐Ÿ›ก audit:
121
121
  - when: never
122
122
  if: $CI_PIPELINE_SOURCE == "trigger"
123
123
  - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && $CI_COMMIT_MESSAGE !~ /^chore\\(release\\).*/
124
- - when: never
125
- if: $CI_PIPELINE_SOURCE == "trigger"
126
- - if: $CI_MERGE_REQUEST_ID
127
124
  needs: []
128
125
  retry: &a1
129
126
  max: 2
@@ -132,7 +129,7 @@ app ๐Ÿ›ก audit:
132
129
  - stuck_or_timeout_failure
133
130
  interruptible: true
134
131
  allow_failure: true
135
- app ๐Ÿ‘ฎ lint:
132
+ 'app ๐Ÿ‘ฎ lint | dev ':
136
133
  stage: test
137
134
  image: path/to/docker/jobs-default:the-version
138
135
  variables:
@@ -169,13 +166,10 @@ app ๐Ÿ‘ฎ lint:
169
166
  - when: never
170
167
  if: $CI_PIPELINE_SOURCE == "trigger"
171
168
  - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && $CI_COMMIT_MESSAGE !~ /^chore\\(release\\).*/
172
- - when: never
173
- if: $CI_PIPELINE_SOURCE == "trigger"
174
- - if: $CI_MERGE_REQUEST_ID
175
169
  needs: []
176
170
  retry: *a1
177
171
  interruptible: true
178
- app ๐Ÿงช test:
172
+ 'app ๐Ÿงช test | dev ':
179
173
  stage: test
180
174
  image: path/to/docker/jobs-testing-chrome:the-version
181
175
  variables:
@@ -212,9 +206,6 @@ app ๐Ÿงช test:
212
206
  - when: never
213
207
  if: $CI_PIPELINE_SOURCE == "trigger"
214
208
  - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && $CI_COMMIT_MESSAGE !~ /^chore\\(release\\).*/
215
- - when: never
216
- if: $CI_PIPELINE_SOURCE == "trigger"
217
- - if: $CI_MERGE_REQUEST_ID
218
209
  needs: []
219
210
  retry: *a1
220
211
  interruptible: true
@@ -479,17 +470,17 @@ app ๐Ÿงช test:
479
470
  - when: on_success
480
471
  if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && $CI_COMMIT_MESSAGE !~ /^chore\\(release\\).*/
481
472
  needs:
482
- - job: app ๐Ÿ‘ฎ lint
473
+ - job: 'app ๐Ÿ‘ฎ lint | dev '
483
474
  artifacts: false
484
475
  - job: 'app ๐Ÿ”จ app | dev '
485
476
  artifacts: false
486
477
  - job: 'app ๐Ÿ”จ docker | dev '
487
478
  artifacts: false
488
- - job: app ๐Ÿงช test
479
+ - job: 'app ๐Ÿงช test | dev '
489
480
  artifacts: false
490
481
  - job: 'app ๐Ÿงพ sbom | dev '
491
482
  artifacts: true
492
- - job: app ๐Ÿ›ก audit
483
+ - job: 'app ๐Ÿ›ก audit | dev '
493
484
  artifacts: false
494
485
  retry: *a1
495
486
  interruptible: true
@@ -528,6 +519,115 @@ app ๐Ÿงช test:
528
519
  retry: *a1
529
520
  interruptible: true
530
521
  allow_failure: true
522
+ 'app ๐Ÿ›ก audit | review ':
523
+ stage: test
524
+ image: path/to/docker/jobs-default:the-version
525
+ variables:
526
+ KUBERNETES_CPU_REQUEST: '0.45'
527
+ KUBERNETES_MEMORY_REQUEST: 1Gi
528
+ KUBERNETES_MEMORY_LIMIT: 4Gi
529
+ script:
530
+ - collapseable_section_start "injectvars" "Injecting variables"
531
+ - export APP_PATH="app"
532
+ - collapseable_section_end "injectvars"
533
+ - cd app
534
+ - yarn npm audit --environment production
535
+ rules:
536
+ - when: never
537
+ if: $CI_PIPELINE_SOURCE == "trigger"
538
+ - if: $CI_MERGE_REQUEST_ID
539
+ needs: []
540
+ retry: *a1
541
+ interruptible: true
542
+ allow_failure: true
543
+ 'app ๐Ÿ‘ฎ lint | review ':
544
+ stage: test
545
+ image: path/to/docker/jobs-default:the-version
546
+ variables:
547
+ KUBERNETES_CPU_REQUEST: '0.45'
548
+ KUBERNETES_MEMORY_REQUEST: 1Gi
549
+ KUBERNETES_MEMORY_LIMIT: 4Gi
550
+ script:
551
+ - collapseable_section_start "injectvars" "Injecting variables"
552
+ - export APP_PATH="app"
553
+ - collapseable_section_end "injectvars"
554
+ - collapseable_section_start "nodeinstall" "Ensure node version"
555
+ - if [ -f ~/.nvm/nvm.sh ]; then source ~/.nvm/nvm.sh; fi
556
+ - if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi
557
+ - collapseable_section_end "nodeinstall"
558
+ - cd app
559
+ - collapseable_section_start "nodeinstall" "Ensure node version"
560
+ - if [ -f ~/.nvm/nvm.sh ]; then source ~/.nvm/nvm.sh; fi
561
+ - if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi
562
+ - collapseable_section_end "nodeinstall"
563
+ - collapseable_section_start "yarninstall" "Yarn install"
564
+ - yarn install --immutable
565
+ - collapseable_section_end "yarninstall"
566
+ - yarn lint
567
+ cache:
568
+ - key: app-yarn-mr$CI_MERGE_REQUEST_IID
569
+ policy: pull-push
570
+ paths:
571
+ - app/.yarn
572
+ fallback_keys:
573
+ - app-yarn
574
+ - key: app-node-modules-mr$CI_MERGE_REQUEST_IID
575
+ policy: pull-push
576
+ paths:
577
+ - app/node_modules
578
+ fallback_keys:
579
+ - app-node-modules
580
+ rules:
581
+ - when: never
582
+ if: $CI_PIPELINE_SOURCE == "trigger"
583
+ - if: $CI_MERGE_REQUEST_ID
584
+ needs: []
585
+ retry: *a1
586
+ interruptible: true
587
+ 'app ๐Ÿงช test | review ':
588
+ stage: test
589
+ image: path/to/docker/jobs-testing-chrome:the-version
590
+ variables:
591
+ KUBERNETES_CPU_REQUEST: '0.45'
592
+ KUBERNETES_MEMORY_REQUEST: 1Gi
593
+ KUBERNETES_MEMORY_LIMIT: 4Gi
594
+ script:
595
+ - collapseable_section_start "injectvars" "Injecting variables"
596
+ - export APP_PATH="app"
597
+ - collapseable_section_end "injectvars"
598
+ - collapseable_section_start "nodeinstall" "Ensure node version"
599
+ - if [ -f ~/.nvm/nvm.sh ]; then source ~/.nvm/nvm.sh; fi
600
+ - if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi
601
+ - collapseable_section_end "nodeinstall"
602
+ - cd app
603
+ - collapseable_section_start "nodeinstall" "Ensure node version"
604
+ - if [ -f ~/.nvm/nvm.sh ]; then source ~/.nvm/nvm.sh; fi
605
+ - if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi
606
+ - collapseable_section_end "nodeinstall"
607
+ - collapseable_section_start "yarninstall" "Yarn install"
608
+ - yarn install --immutable
609
+ - collapseable_section_end "yarninstall"
610
+ - yarn test
611
+ cache:
612
+ - key: app-yarn-mr$CI_MERGE_REQUEST_IID
613
+ policy: pull-push
614
+ paths:
615
+ - app/.yarn
616
+ fallback_keys:
617
+ - app-yarn
618
+ - key: app-node-modules-mr$CI_MERGE_REQUEST_IID
619
+ policy: pull-push
620
+ paths:
621
+ - app/node_modules
622
+ fallback_keys:
623
+ - app-node-modules
624
+ rules:
625
+ - when: never
626
+ if: $CI_PIPELINE_SOURCE == "trigger"
627
+ - if: $CI_MERGE_REQUEST_ID
628
+ needs: []
629
+ retry: *a1
630
+ interruptible: true
531
631
  'app ๐Ÿ”จ app | review ':
532
632
  stage: build
533
633
  image: path/to/docker/jobs-default:the-version
@@ -585,14 +685,18 @@ app ๐Ÿงช test:
585
685
  - collapseable_section_end "yarninstall"
586
686
  - yarn build
587
687
  cache:
588
- - key: app-yarn
688
+ - key: app-yarn-mr$CI_MERGE_REQUEST_IID
589
689
  policy: pull-push
590
690
  paths:
591
691
  - app/.yarn
592
- - key: app-node-modules
692
+ fallback_keys:
693
+ - app-yarn
694
+ - key: app-node-modules-mr$CI_MERGE_REQUEST_IID
593
695
  policy: pull-push
594
696
  paths:
595
697
  - app/node_modules
698
+ fallback_keys:
699
+ - app-node-modules
596
700
  artifacts:
597
701
  paths:
598
702
  - app/__build_info.json
@@ -659,10 +763,12 @@ app ๐Ÿงช test:
659
763
  - docker push $DOCKER_CACHE_IMAGE
660
764
  - collapseable_section_end "docker-push"
661
765
  cache:
662
- - key: app-yarn
766
+ - key: app-yarn-mr$CI_MERGE_REQUEST_IID
663
767
  policy: pull
664
768
  paths:
665
769
  - app/.yarn
770
+ fallback_keys:
771
+ - app-yarn
666
772
  rules:
667
773
  - when: never
668
774
  if: $CI_PIPELINE_SOURCE == "trigger"
@@ -792,17 +898,17 @@ app ๐Ÿงช test:
792
898
  - when: on_success
793
899
  if: $CI_MERGE_REQUEST_ID
794
900
  needs:
795
- - job: app ๐Ÿ‘ฎ lint
901
+ - job: 'app ๐Ÿ‘ฎ lint | review '
796
902
  artifacts: false
797
903
  - job: 'app ๐Ÿ”จ app | review '
798
904
  artifacts: false
799
905
  - job: 'app ๐Ÿ”จ docker | review '
800
906
  artifacts: false
801
- - job: app ๐Ÿงช test
907
+ - job: 'app ๐Ÿงช test | review '
802
908
  artifacts: false
803
909
  - job: 'app ๐Ÿงพ sbom | review '
804
910
  artifacts: true
805
- - job: app ๐Ÿ›ก audit
911
+ - job: 'app ๐Ÿ›ก audit | review '
806
912
  artifacts: false
807
913
  retry: *a1
808
914
  interruptible: true