@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
- 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
@@ -512,17 +503,17 @@ api ๐Ÿงช test:
512
503
  - when: on_success
513
504
  if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && $CI_COMMIT_MESSAGE !~ /^chore\\(release\\).*/
514
505
  needs:
515
- - job: api ๐Ÿ‘ฎ lint
506
+ - job: 'api ๐Ÿ‘ฎ lint | dev '
516
507
  artifacts: false
517
508
  - job: 'api ๐Ÿ”จ app | dev '
518
509
  artifacts: false
519
510
  - job: 'api ๐Ÿ”จ docker | dev '
520
511
  artifacts: false
521
- - job: api ๐Ÿงช test
512
+ - job: 'api ๐Ÿงช test | dev '
522
513
  artifacts: false
523
514
  - job: 'api ๐Ÿงพ sbom | dev '
524
515
  artifacts: true
525
- - job: api ๐Ÿ›ก audit
516
+ - job: 'api ๐Ÿ›ก audit | dev '
526
517
  artifacts: false
527
518
  retry: *a1
528
519
  interruptible: true
@@ -561,6 +552,115 @@ api ๐Ÿงช test:
561
552
  retry: *a1
562
553
  interruptible: true
563
554
  allow_failure: true
555
+ 'api ๐Ÿ›ก audit | review ':
556
+ stage: test
557
+ image: path/to/docker/jobs-default:the-version
558
+ variables:
559
+ KUBERNETES_CPU_REQUEST: '0.45'
560
+ KUBERNETES_MEMORY_REQUEST: 1Gi
561
+ KUBERNETES_MEMORY_LIMIT: 4Gi
562
+ script:
563
+ - collapseable_section_start "injectvars" "Injecting variables"
564
+ - export APP_PATH="api"
565
+ - collapseable_section_end "injectvars"
566
+ - cd api
567
+ - yarn npm audit --environment production
568
+ rules:
569
+ - when: never
570
+ if: $CI_PIPELINE_SOURCE == "trigger"
571
+ - if: $CI_MERGE_REQUEST_ID
572
+ needs: []
573
+ retry: *a1
574
+ interruptible: true
575
+ allow_failure: true
576
+ 'api ๐Ÿ‘ฎ lint | 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="api"
586
+ - collapseable_section_end "injectvars"
587
+ - collapseable_section_start "nodeinstall" "Ensure node version"
588
+ - if [ -f ~/.nvm/nvm.sh ]; then source ~/.nvm/nvm.sh; fi
589
+ - if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi
590
+ - collapseable_section_end "nodeinstall"
591
+ - cd api
592
+ - collapseable_section_start "nodeinstall" "Ensure node version"
593
+ - if [ -f ~/.nvm/nvm.sh ]; then source ~/.nvm/nvm.sh; fi
594
+ - if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi
595
+ - collapseable_section_end "nodeinstall"
596
+ - collapseable_section_start "yarninstall" "Yarn install"
597
+ - yarn install --immutable
598
+ - collapseable_section_end "yarninstall"
599
+ - yarn lint
600
+ cache:
601
+ - key: api-yarn-mr$CI_MERGE_REQUEST_IID
602
+ policy: pull-push
603
+ paths:
604
+ - api/.yarn
605
+ fallback_keys:
606
+ - api-yarn
607
+ - key: api-node-modules-mr$CI_MERGE_REQUEST_IID
608
+ policy: pull-push
609
+ paths:
610
+ - api/node_modules
611
+ fallback_keys:
612
+ - api-node-modules
613
+ rules:
614
+ - when: never
615
+ if: $CI_PIPELINE_SOURCE == "trigger"
616
+ - if: $CI_MERGE_REQUEST_ID
617
+ needs: []
618
+ retry: *a1
619
+ interruptible: true
620
+ 'api ๐Ÿงช test | review ':
621
+ stage: test
622
+ image: path/to/docker/jobs-testing-chrome:the-version
623
+ variables:
624
+ KUBERNETES_CPU_REQUEST: '0.45'
625
+ KUBERNETES_MEMORY_REQUEST: 1Gi
626
+ KUBERNETES_MEMORY_LIMIT: 4Gi
627
+ script:
628
+ - collapseable_section_start "injectvars" "Injecting variables"
629
+ - export APP_PATH="api"
630
+ - collapseable_section_end "injectvars"
631
+ - collapseable_section_start "nodeinstall" "Ensure node version"
632
+ - if [ -f ~/.nvm/nvm.sh ]; then source ~/.nvm/nvm.sh; fi
633
+ - if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi
634
+ - collapseable_section_end "nodeinstall"
635
+ - cd api
636
+ - collapseable_section_start "nodeinstall" "Ensure node version"
637
+ - if [ -f ~/.nvm/nvm.sh ]; then source ~/.nvm/nvm.sh; fi
638
+ - if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi
639
+ - collapseable_section_end "nodeinstall"
640
+ - collapseable_section_start "yarninstall" "Yarn install"
641
+ - yarn install --immutable
642
+ - collapseable_section_end "yarninstall"
643
+ - yarn test
644
+ cache:
645
+ - key: api-yarn-mr$CI_MERGE_REQUEST_IID
646
+ policy: pull-push
647
+ paths:
648
+ - api/.yarn
649
+ fallback_keys:
650
+ - api-yarn
651
+ - key: api-node-modules-mr$CI_MERGE_REQUEST_IID
652
+ policy: pull-push
653
+ paths:
654
+ - api/node_modules
655
+ fallback_keys:
656
+ - api-node-modules
657
+ rules:
658
+ - when: never
659
+ if: $CI_PIPELINE_SOURCE == "trigger"
660
+ - if: $CI_MERGE_REQUEST_ID
661
+ needs: []
662
+ retry: *a1
663
+ interruptible: true
564
664
  'api ๐Ÿ”จ app | review ':
565
665
  stage: build
566
666
  image: path/to/docker/jobs-default:the-version
@@ -630,14 +730,18 @@ api ๐Ÿงช test:
630
730
  - collapseable_section_end "yarninstall"
631
731
  - yarn build
632
732
  cache:
633
- - key: api-yarn
733
+ - key: api-yarn-mr$CI_MERGE_REQUEST_IID
634
734
  policy: pull-push
635
735
  paths:
636
736
  - api/.yarn
637
- - key: api-node-modules
737
+ fallback_keys:
738
+ - api-yarn
739
+ - key: api-node-modules-mr$CI_MERGE_REQUEST_IID
638
740
  policy: pull-push
639
741
  paths:
640
742
  - api/node_modules
743
+ fallback_keys:
744
+ - api-node-modules
641
745
  artifacts:
642
746
  paths:
643
747
  - api/__build_info.json
@@ -704,10 +808,12 @@ api ๐Ÿงช test:
704
808
  - docker push $DOCKER_CACHE_IMAGE
705
809
  - collapseable_section_end "docker-push"
706
810
  cache:
707
- - key: api-yarn
811
+ - key: api-yarn-mr$CI_MERGE_REQUEST_IID
708
812
  policy: pull
709
813
  paths:
710
814
  - api/.yarn
815
+ fallback_keys:
816
+ - api-yarn
711
817
  rules:
712
818
  - when: never
713
819
  if: $CI_PIPELINE_SOURCE == "trigger"
@@ -859,17 +965,17 @@ api ๐Ÿงช test:
859
965
  - when: on_success
860
966
  if: $CI_MERGE_REQUEST_ID
861
967
  needs:
862
- - job: api ๐Ÿ‘ฎ lint
968
+ - job: 'api ๐Ÿ‘ฎ lint | review '
863
969
  artifacts: false
864
970
  - job: 'api ๐Ÿ”จ app | review '
865
971
  artifacts: false
866
972
  - job: 'api ๐Ÿ”จ docker | review '
867
973
  artifacts: false
868
- - job: api ๐Ÿงช test
974
+ - job: 'api ๐Ÿงช test | review '
869
975
  artifacts: false
870
976
  - job: 'api ๐Ÿงพ sbom | review '
871
977
  artifacts: true
872
- - job: api ๐Ÿ›ก audit
978
+ - job: 'api ๐Ÿ›ก audit | review '
873
979
  artifacts: false
874
980
  retry: *a1
875
981
  interruptible: true
@@ -1588,7 +1694,7 @@ api ๐Ÿงช test:
1588
1694
  retry: *a1
1589
1695
  interruptible: true
1590
1696
  allow_failure: true
1591
- worker ๐Ÿ›ก audit:
1697
+ 'worker ๐Ÿ›ก audit | dev ':
1592
1698
  stage: test
1593
1699
  image: path/to/docker/jobs-default:the-version
1594
1700
  variables:
@@ -1605,14 +1711,11 @@ worker ๐Ÿ›ก audit:
1605
1711
  - when: never
1606
1712
  if: $CI_PIPELINE_SOURCE == "trigger"
1607
1713
  - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && $CI_COMMIT_MESSAGE !~ /^chore\\(release\\).*/
1608
- - when: never
1609
- if: $CI_PIPELINE_SOURCE == "trigger"
1610
- - if: $CI_MERGE_REQUEST_ID
1611
1714
  needs: []
1612
1715
  retry: *a1
1613
1716
  interruptible: true
1614
1717
  allow_failure: true
1615
- worker ๐Ÿ‘ฎ lint:
1718
+ 'worker ๐Ÿ‘ฎ lint | dev ':
1616
1719
  stage: test
1617
1720
  image: path/to/docker/jobs-default:the-version
1618
1721
  variables:
@@ -1649,13 +1752,10 @@ worker ๐Ÿ‘ฎ lint:
1649
1752
  - when: never
1650
1753
  if: $CI_PIPELINE_SOURCE == "trigger"
1651
1754
  - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && $CI_COMMIT_MESSAGE !~ /^chore\\(release\\).*/
1652
- - when: never
1653
- if: $CI_PIPELINE_SOURCE == "trigger"
1654
- - if: $CI_MERGE_REQUEST_ID
1655
1755
  needs: []
1656
1756
  retry: *a1
1657
1757
  interruptible: true
1658
- worker ๐Ÿงช test:
1758
+ 'worker ๐Ÿงช test | dev ':
1659
1759
  stage: test
1660
1760
  image: path/to/docker/jobs-testing-chrome:the-version
1661
1761
  variables:
@@ -1692,9 +1792,6 @@ worker ๐Ÿงช test:
1692
1792
  - when: never
1693
1793
  if: $CI_PIPELINE_SOURCE == "trigger"
1694
1794
  - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && $CI_COMMIT_MESSAGE !~ /^chore\\(release\\).*/
1695
- - when: never
1696
- if: $CI_PIPELINE_SOURCE == "trigger"
1697
- - if: $CI_MERGE_REQUEST_ID
1698
1795
  needs: []
1699
1796
  retry: *a1
1700
1797
  interruptible: true
@@ -1993,17 +2090,17 @@ worker ๐Ÿงช test:
1993
2090
  - when: on_success
1994
2091
  if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && $CI_COMMIT_MESSAGE !~ /^chore\\(release\\).*/
1995
2092
  needs:
1996
- - job: worker ๐Ÿ‘ฎ lint
2093
+ - job: 'worker ๐Ÿ‘ฎ lint | dev '
1997
2094
  artifacts: false
1998
2095
  - job: 'worker ๐Ÿ”จ app | dev '
1999
2096
  artifacts: false
2000
2097
  - job: 'worker ๐Ÿ”จ docker | dev '
2001
2098
  artifacts: false
2002
- - job: worker ๐Ÿงช test
2099
+ - job: 'worker ๐Ÿงช test | dev '
2003
2100
  artifacts: false
2004
2101
  - job: 'worker ๐Ÿงพ sbom | dev '
2005
2102
  artifacts: true
2006
- - job: worker ๐Ÿ›ก audit
2103
+ - job: 'worker ๐Ÿ›ก audit | dev '
2007
2104
  artifacts: false
2008
2105
  retry: *a1
2009
2106
  interruptible: true
@@ -2042,6 +2139,115 @@ worker ๐Ÿงช test:
2042
2139
  retry: *a1
2043
2140
  interruptible: true
2044
2141
  allow_failure: true
2142
+ 'worker ๐Ÿ›ก audit | review ':
2143
+ stage: test
2144
+ image: path/to/docker/jobs-default:the-version
2145
+ variables:
2146
+ KUBERNETES_CPU_REQUEST: '0.45'
2147
+ KUBERNETES_MEMORY_REQUEST: 1Gi
2148
+ KUBERNETES_MEMORY_LIMIT: 4Gi
2149
+ script:
2150
+ - collapseable_section_start "injectvars" "Injecting variables"
2151
+ - export APP_PATH="api"
2152
+ - collapseable_section_end "injectvars"
2153
+ - cd api
2154
+ - yarn npm audit --environment production
2155
+ rules:
2156
+ - when: never
2157
+ if: $CI_PIPELINE_SOURCE == "trigger"
2158
+ - if: $CI_MERGE_REQUEST_ID
2159
+ needs: []
2160
+ retry: *a1
2161
+ interruptible: true
2162
+ allow_failure: true
2163
+ 'worker ๐Ÿ‘ฎ lint | review ':
2164
+ stage: test
2165
+ image: path/to/docker/jobs-default:the-version
2166
+ variables:
2167
+ KUBERNETES_CPU_REQUEST: '0.45'
2168
+ KUBERNETES_MEMORY_REQUEST: 1Gi
2169
+ KUBERNETES_MEMORY_LIMIT: 4Gi
2170
+ script:
2171
+ - collapseable_section_start "injectvars" "Injecting variables"
2172
+ - export APP_PATH="api"
2173
+ - collapseable_section_end "injectvars"
2174
+ - collapseable_section_start "nodeinstall" "Ensure node version"
2175
+ - if [ -f ~/.nvm/nvm.sh ]; then source ~/.nvm/nvm.sh; fi
2176
+ - if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi
2177
+ - collapseable_section_end "nodeinstall"
2178
+ - cd api
2179
+ - collapseable_section_start "nodeinstall" "Ensure node version"
2180
+ - if [ -f ~/.nvm/nvm.sh ]; then source ~/.nvm/nvm.sh; fi
2181
+ - if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi
2182
+ - collapseable_section_end "nodeinstall"
2183
+ - collapseable_section_start "yarninstall" "Yarn install"
2184
+ - yarn install --immutable
2185
+ - collapseable_section_end "yarninstall"
2186
+ - yarn lint
2187
+ cache:
2188
+ - key: api-yarn-mr$CI_MERGE_REQUEST_IID
2189
+ policy: pull-push
2190
+ paths:
2191
+ - api/.yarn
2192
+ fallback_keys:
2193
+ - api-yarn
2194
+ - key: api-node-modules-mr$CI_MERGE_REQUEST_IID
2195
+ policy: pull-push
2196
+ paths:
2197
+ - api/node_modules
2198
+ fallback_keys:
2199
+ - api-node-modules
2200
+ rules:
2201
+ - when: never
2202
+ if: $CI_PIPELINE_SOURCE == "trigger"
2203
+ - if: $CI_MERGE_REQUEST_ID
2204
+ needs: []
2205
+ retry: *a1
2206
+ interruptible: true
2207
+ 'worker ๐Ÿงช test | review ':
2208
+ stage: test
2209
+ image: path/to/docker/jobs-testing-chrome:the-version
2210
+ variables:
2211
+ KUBERNETES_CPU_REQUEST: '0.45'
2212
+ KUBERNETES_MEMORY_REQUEST: 1Gi
2213
+ KUBERNETES_MEMORY_LIMIT: 4Gi
2214
+ script:
2215
+ - collapseable_section_start "injectvars" "Injecting variables"
2216
+ - export APP_PATH="api"
2217
+ - collapseable_section_end "injectvars"
2218
+ - collapseable_section_start "nodeinstall" "Ensure node version"
2219
+ - if [ -f ~/.nvm/nvm.sh ]; then source ~/.nvm/nvm.sh; fi
2220
+ - if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi
2221
+ - collapseable_section_end "nodeinstall"
2222
+ - cd api
2223
+ - collapseable_section_start "nodeinstall" "Ensure node version"
2224
+ - if [ -f ~/.nvm/nvm.sh ]; then source ~/.nvm/nvm.sh; fi
2225
+ - if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi
2226
+ - collapseable_section_end "nodeinstall"
2227
+ - collapseable_section_start "yarninstall" "Yarn install"
2228
+ - yarn install --immutable
2229
+ - collapseable_section_end "yarninstall"
2230
+ - yarn test
2231
+ cache:
2232
+ - key: api-yarn-mr$CI_MERGE_REQUEST_IID
2233
+ policy: pull-push
2234
+ paths:
2235
+ - api/.yarn
2236
+ fallback_keys:
2237
+ - api-yarn
2238
+ - key: api-node-modules-mr$CI_MERGE_REQUEST_IID
2239
+ policy: pull-push
2240
+ paths:
2241
+ - api/node_modules
2242
+ fallback_keys:
2243
+ - api-node-modules
2244
+ rules:
2245
+ - when: never
2246
+ if: $CI_PIPELINE_SOURCE == "trigger"
2247
+ - if: $CI_MERGE_REQUEST_ID
2248
+ needs: []
2249
+ retry: *a1
2250
+ interruptible: true
2045
2251
  'worker ๐Ÿ”จ app | review ':
2046
2252
  stage: build
2047
2253
  image: path/to/docker/jobs-default:the-version
@@ -2111,14 +2317,18 @@ worker ๐Ÿงช test:
2111
2317
  - collapseable_section_end "yarninstall"
2112
2318
  - yarn build:worker
2113
2319
  cache:
2114
- - key: api-yarn
2320
+ - key: api-yarn-mr$CI_MERGE_REQUEST_IID
2115
2321
  policy: pull-push
2116
2322
  paths:
2117
2323
  - api/.yarn
2118
- - key: api-node-modules
2324
+ fallback_keys:
2325
+ - api-yarn
2326
+ - key: api-node-modules-mr$CI_MERGE_REQUEST_IID
2119
2327
  policy: pull-push
2120
2328
  paths:
2121
2329
  - api/node_modules
2330
+ fallback_keys:
2331
+ - api-node-modules
2122
2332
  artifacts:
2123
2333
  paths:
2124
2334
  - api/__build_info.json
@@ -2185,10 +2395,12 @@ worker ๐Ÿงช test:
2185
2395
  - docker push $DOCKER_CACHE_IMAGE
2186
2396
  - collapseable_section_end "docker-push"
2187
2397
  cache:
2188
- - key: api-yarn
2398
+ - key: api-yarn-mr$CI_MERGE_REQUEST_IID
2189
2399
  policy: pull
2190
2400
  paths:
2191
2401
  - api/.yarn
2402
+ fallback_keys:
2403
+ - api-yarn
2192
2404
  rules:
2193
2405
  - when: never
2194
2406
  if: $CI_PIPELINE_SOURCE == "trigger"
@@ -2340,17 +2552,17 @@ worker ๐Ÿงช test:
2340
2552
  - when: on_success
2341
2553
  if: $CI_MERGE_REQUEST_ID
2342
2554
  needs:
2343
- - job: worker ๐Ÿ‘ฎ lint
2555
+ - job: 'worker ๐Ÿ‘ฎ lint | review '
2344
2556
  artifacts: false
2345
2557
  - job: 'worker ๐Ÿ”จ app | review '
2346
2558
  artifacts: false
2347
2559
  - job: 'worker ๐Ÿ”จ docker | review '
2348
2560
  artifacts: false
2349
- - job: worker ๐Ÿงช test
2561
+ - job: 'worker ๐Ÿงช test | review '
2350
2562
  artifacts: false
2351
2563
  - job: 'worker ๐Ÿงพ sbom | review '
2352
2564
  artifacts: true
2353
- - job: worker ๐Ÿ›ก audit
2565
+ - job: 'worker ๐Ÿ›ก audit | review '
2354
2566
  artifacts: false
2355
2567
  retry: *a1
2356
2568
  interruptible: true