@catladder/pipeline 3.25.0 → 3.27.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 (77) hide show
  1. package/dist/build/custom/testJob.js +1 -2
  2. package/dist/build/node/testJob.js +1 -2
  3. package/dist/build/node/yarn.js +3 -2
  4. package/dist/build/rails/test.js +1 -2
  5. package/dist/constants.js +1 -1
  6. package/dist/deploy/types/googleCloudRun.d.ts +1 -1
  7. package/dist/pipeline/agent/createAgentReviewJob.js +1 -0
  8. package/dist/pipeline/agent/shared.d.ts +1 -1
  9. package/dist/pipeline/agent/shared.js +0 -1
  10. package/dist/pipeline/createMainPipeline.js +1 -0
  11. package/dist/pipeline/gitlab/cache.d.ts +9 -0
  12. package/dist/pipeline/gitlab/cache.js +47 -0
  13. package/dist/pipeline/gitlab/createGitlabJobs.js +7 -7
  14. package/dist/tsconfig.tsbuildinfo +1 -1
  15. package/dist/types/jobs.d.ts +2 -3
  16. package/examples/__snapshots__/automatic-releases.test.ts.snap +141 -31
  17. package/examples/__snapshots__/cloud-run-health-check-defaults.test.ts.snap +141 -31
  18. package/examples/__snapshots__/cloud-run-health-check-only-startup.test.ts.snap +141 -31
  19. package/examples/__snapshots__/cloud-run-health-check.test.ts.snap +141 -31
  20. package/examples/__snapshots__/cloud-run-http2.test.ts.snap +141 -31
  21. package/examples/__snapshots__/cloud-run-memory-limit.test.ts.snap +141 -31
  22. package/examples/__snapshots__/cloud-run-meteor-with-worker.test.ts.snap +133 -27
  23. package/examples/__snapshots__/cloud-run-nextjs.test.ts.snap +144 -32
  24. package/examples/__snapshots__/cloud-run-no-cpu-throttling.test.ts.snap +141 -31
  25. package/examples/__snapshots__/cloud-run-no-service.test.ts.snap +141 -31
  26. package/examples/__snapshots__/cloud-run-non-public.test.ts.snap +141 -31
  27. package/examples/__snapshots__/cloud-run-post-stop-job.test.ts.snap +141 -31
  28. package/examples/__snapshots__/cloud-run-service-custom-vpc-connector.test.ts.snap +141 -31
  29. package/examples/__snapshots__/cloud-run-service-custom-vpc.test.ts.snap +141 -31
  30. package/examples/__snapshots__/cloud-run-service-gen2.test.ts.snap +141 -31
  31. package/examples/__snapshots__/cloud-run-service-increase-timout.test.ts.snap +141 -31
  32. package/examples/__snapshots__/cloud-run-service-with-volumes.test.ts.snap +141 -31
  33. package/examples/__snapshots__/cloud-run-storybook.test.ts.snap +21 -11
  34. package/examples/__snapshots__/cloud-run-with-agents.test.ts.snap +144 -32
  35. package/examples/__snapshots__/cloud-run-with-gpu.test.ts.snap +141 -31
  36. package/examples/__snapshots__/cloud-run-with-ngnix.test.ts.snap +141 -31
  37. package/examples/__snapshots__/cloud-run-with-sql-legacy-jobs.test.ts.snap +141 -31
  38. package/examples/__snapshots__/cloud-run-with-sql-multiple-dbs.test.ts.snap +423 -93
  39. package/examples/__snapshots__/cloud-run-with-sql-reuse-db.test.ts.snap +282 -62
  40. package/examples/__snapshots__/cloud-run-with-sql.test.ts.snap +141 -31
  41. package/examples/__snapshots__/cloud-run-with-worker.test.ts.snap +141 -31
  42. package/examples/__snapshots__/custom-build-job-with-tests.test.ts.snap +93 -22
  43. package/examples/__snapshots__/custom-deploy.test.ts.snap +141 -31
  44. package/examples/__snapshots__/custom-envs.test.ts.snap +328 -40
  45. package/examples/__snapshots__/custom-verify-job.test.ts.snap +144 -32
  46. package/examples/__snapshots__/git-submodule.test.ts.snap +141 -31
  47. package/examples/__snapshots__/kubernetes-application-customization.test.ts.snap +141 -31
  48. package/examples/__snapshots__/kubernetes-with-cloud-sql.test.ts.snap +141 -31
  49. package/examples/__snapshots__/kubernetes-with-jobs.test.ts.snap +282 -62
  50. package/examples/__snapshots__/kubernetes-with-mongodb.test.ts.snap +141 -31
  51. package/examples/__snapshots__/local-dot-env.test.ts.snap +141 -31
  52. package/examples/__snapshots__/meteor-kubernetes.test.ts.snap +133 -27
  53. package/examples/__snapshots__/modify-generated-files.test.ts.snap +124 -20
  54. package/examples/__snapshots__/modify-generated-yaml.test.ts.snap +124 -20
  55. package/examples/__snapshots__/multiline-var.test.ts.snap +423 -93
  56. package/examples/__snapshots__/native-app.test.ts.snap +277 -57
  57. package/examples/__snapshots__/node-build-with-custom-image.test.ts.snap +141 -31
  58. package/examples/__snapshots__/node-build-with-docker-additions.test.ts.snap +141 -31
  59. package/examples/__snapshots__/override-secrets.test.ts.snap +141 -31
  60. package/examples/__snapshots__/rails-k8s-with-worker-dockerfile.test.ts.snap +84 -22
  61. package/examples/__snapshots__/rails-k8s-with-worker.test.ts.snap +84 -22
  62. package/examples/__snapshots__/referencing-other-vars.test.ts.snap +423 -93
  63. package/examples/__snapshots__/wait-for-other-deploy.test.ts.snap +260 -52
  64. package/examples/__snapshots__/workspace-api-www-turbo-cache.test.ts.snap +161 -43
  65. package/examples/__snapshots__/workspace-api-www.test.ts.snap +161 -43
  66. package/package.json +1 -1
  67. package/src/build/custom/testJob.ts +0 -1
  68. package/src/build/node/testJob.ts +0 -1
  69. package/src/build/node/yarn.ts +3 -2
  70. package/src/build/rails/test.ts +0 -1
  71. package/src/deploy/types/googleCloudRun.ts +1 -1
  72. package/src/pipeline/agent/createAgentReviewJob.ts +1 -0
  73. package/src/pipeline/agent/shared.ts +2 -2
  74. package/src/pipeline/createMainPipeline.ts +1 -0
  75. package/src/pipeline/gitlab/cache.ts +49 -0
  76. package/src/pipeline/gitlab/createGitlabJobs.ts +7 -9
  77. 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:
@@ -152,7 +149,7 @@ api 👮 lint:
152
149
  - if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi
153
150
  - collapseable_section_end "nodeinstall"
154
151
  - collapseable_section_start "yarninstall" "Yarn install"
155
- - yarn install --immutable
152
+ - yarn install --immutable --inline-builds
156
153
  - collapseable_section_end "yarninstall"
157
154
  - yarn lint
158
155
  cache:
@@ -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:
@@ -195,7 +189,7 @@ api 🧪 test:
195
189
  - if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi
196
190
  - collapseable_section_end "nodeinstall"
197
191
  - collapseable_section_start "yarninstall" "Yarn install"
198
- - yarn install --immutable
192
+ - yarn install --immutable --inline-builds
199
193
  - collapseable_section_end "yarninstall"
200
194
  - yarn test
201
195
  cache:
@@ -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
@@ -252,7 +243,7 @@ api 🧪 test:
252
243
  - if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi
253
244
  - collapseable_section_end "nodeinstall"
254
245
  - collapseable_section_start "yarninstall" "Yarn install"
255
- - yarn install --immutable
246
+ - yarn install --immutable --inline-builds
256
247
  - collapseable_section_end "yarninstall"
257
248
  - yarn build
258
249
  cache:
@@ -307,7 +298,8 @@ api 🧪 test:
307
298
  - export DOCKER_IMAGE="$CI_REGISTRY_IMAGE/$DOCKER_IMAGE_NAME"
308
299
  - export DOCKER_IMAGE_TAG="$CI_COMMIT_SHA"
309
300
  - |-
310
- export DOCKER_COPY_AND_INSTALL_APP="COPY --chown=node:node $APP_DIR .
301
+ export DOCKER_COPY_AND_INSTALL_APP="ENV YARN_ENABLE_INLINE_BUILDS=1
302
+ COPY --chown=node:node $APP_DIR .
311
303
  RUN yarn plugin import workspace-tools
312
304
  RUN yarn workspaces focus --production && yarn rebuild"
313
305
  - |-
@@ -494,17 +486,17 @@ api 🧪 test:
494
486
  - when: on_success
495
487
  if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && $CI_COMMIT_MESSAGE !~ /^chore\\(release\\).*/
496
488
  needs:
497
- - job: api 👮 lint
489
+ - job: 'api 👮 lint | dev '
498
490
  artifacts: false
499
491
  - job: 'api 🔨 app | dev '
500
492
  artifacts: false
501
493
  - job: 'api 🔨 docker | dev '
502
494
  artifacts: false
503
- - job: api 🧪 test
495
+ - job: 'api 🧪 test | dev '
504
496
  artifacts: false
505
497
  - job: 'api 🧾 sbom | dev '
506
498
  artifacts: true
507
- - job: api 🛡 audit
499
+ - job: 'api 🛡 audit | dev '
508
500
  artifacts: false
509
501
  retry: *a1
510
502
  interruptible: true
@@ -609,6 +601,115 @@ api 🧪 test:
609
601
  retry: *a1
610
602
  interruptible: true
611
603
  allow_failure: true
604
+ 'api 🛡 audit | review ':
605
+ stage: test
606
+ image: path/to/docker/jobs-default:the-version
607
+ variables:
608
+ KUBERNETES_CPU_REQUEST: '0.45'
609
+ KUBERNETES_MEMORY_REQUEST: 1Gi
610
+ KUBERNETES_MEMORY_LIMIT: 4Gi
611
+ script:
612
+ - collapseable_section_start "injectvars" "Injecting variables"
613
+ - export APP_PATH="api"
614
+ - collapseable_section_end "injectvars"
615
+ - cd api
616
+ - yarn npm audit --environment production
617
+ rules:
618
+ - when: never
619
+ if: $CI_PIPELINE_SOURCE == "trigger"
620
+ - if: $CI_MERGE_REQUEST_ID
621
+ needs: []
622
+ retry: *a1
623
+ interruptible: true
624
+ allow_failure: true
625
+ 'api 👮 lint | review ':
626
+ stage: test
627
+ image: path/to/docker/jobs-default:the-version
628
+ variables:
629
+ KUBERNETES_CPU_REQUEST: '0.45'
630
+ KUBERNETES_MEMORY_REQUEST: 1Gi
631
+ KUBERNETES_MEMORY_LIMIT: 4Gi
632
+ script:
633
+ - collapseable_section_start "injectvars" "Injecting variables"
634
+ - export APP_PATH="api"
635
+ - collapseable_section_end "injectvars"
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
+ - cd api
641
+ - collapseable_section_start "nodeinstall" "Ensure node version"
642
+ - if [ -f ~/.nvm/nvm.sh ]; then source ~/.nvm/nvm.sh; fi
643
+ - if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi
644
+ - collapseable_section_end "nodeinstall"
645
+ - collapseable_section_start "yarninstall" "Yarn install"
646
+ - yarn install --immutable --inline-builds
647
+ - collapseable_section_end "yarninstall"
648
+ - yarn lint
649
+ cache:
650
+ - key: api-yarn-mr$CI_MERGE_REQUEST_IID
651
+ policy: pull-push
652
+ paths:
653
+ - api/.yarn
654
+ fallback_keys:
655
+ - api-yarn
656
+ - key: api-node-modules-mr$CI_MERGE_REQUEST_IID
657
+ policy: pull-push
658
+ paths:
659
+ - api/node_modules
660
+ fallback_keys:
661
+ - api-node-modules
662
+ rules:
663
+ - when: never
664
+ if: $CI_PIPELINE_SOURCE == "trigger"
665
+ - if: $CI_MERGE_REQUEST_ID
666
+ needs: []
667
+ retry: *a1
668
+ interruptible: true
669
+ 'api 🧪 test | review ':
670
+ stage: test
671
+ image: path/to/docker/jobs-testing-chrome:the-version
672
+ variables:
673
+ KUBERNETES_CPU_REQUEST: '0.45'
674
+ KUBERNETES_MEMORY_REQUEST: 1Gi
675
+ KUBERNETES_MEMORY_LIMIT: 4Gi
676
+ script:
677
+ - collapseable_section_start "injectvars" "Injecting variables"
678
+ - export APP_PATH="api"
679
+ - collapseable_section_end "injectvars"
680
+ - collapseable_section_start "nodeinstall" "Ensure node version"
681
+ - if [ -f ~/.nvm/nvm.sh ]; then source ~/.nvm/nvm.sh; fi
682
+ - if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi
683
+ - collapseable_section_end "nodeinstall"
684
+ - cd api
685
+ - collapseable_section_start "nodeinstall" "Ensure node version"
686
+ - if [ -f ~/.nvm/nvm.sh ]; then source ~/.nvm/nvm.sh; fi
687
+ - if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi
688
+ - collapseable_section_end "nodeinstall"
689
+ - collapseable_section_start "yarninstall" "Yarn install"
690
+ - yarn install --immutable --inline-builds
691
+ - collapseable_section_end "yarninstall"
692
+ - yarn test
693
+ cache:
694
+ - key: api-yarn-mr$CI_MERGE_REQUEST_IID
695
+ policy: pull-push
696
+ paths:
697
+ - api/.yarn
698
+ fallback_keys:
699
+ - api-yarn
700
+ - key: api-node-modules-mr$CI_MERGE_REQUEST_IID
701
+ policy: pull-push
702
+ paths:
703
+ - api/node_modules
704
+ fallback_keys:
705
+ - api-node-modules
706
+ rules:
707
+ - when: never
708
+ if: $CI_PIPELINE_SOURCE == "trigger"
709
+ - if: $CI_MERGE_REQUEST_ID
710
+ needs: []
711
+ retry: *a1
712
+ interruptible: true
612
713
  'api 🔨 app | review ':
613
714
  stage: build
614
715
  image: path/to/docker/jobs-default:the-version
@@ -644,18 +745,22 @@ api 🧪 test:
644
745
  - if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi
645
746
  - collapseable_section_end "nodeinstall"
646
747
  - collapseable_section_start "yarninstall" "Yarn install"
647
- - yarn install --immutable
748
+ - yarn install --immutable --inline-builds
648
749
  - collapseable_section_end "yarninstall"
649
750
  - yarn build
650
751
  cache:
651
- - key: api-yarn
752
+ - key: api-yarn-mr$CI_MERGE_REQUEST_IID
652
753
  policy: pull-push
653
754
  paths:
654
755
  - api/.yarn
655
- - key: api-node-modules
756
+ fallback_keys:
757
+ - api-yarn
758
+ - key: api-node-modules-mr$CI_MERGE_REQUEST_IID
656
759
  policy: pull-push
657
760
  paths:
658
761
  - api/node_modules
762
+ fallback_keys:
763
+ - api-node-modules
659
764
  artifacts:
660
765
  paths:
661
766
  - api/__build_info.json
@@ -699,7 +804,8 @@ api 🧪 test:
699
804
  - export DOCKER_IMAGE="$CI_REGISTRY_IMAGE/$DOCKER_IMAGE_NAME"
700
805
  - export DOCKER_IMAGE_TAG="$CI_COMMIT_SHA"
701
806
  - |-
702
- export DOCKER_COPY_AND_INSTALL_APP="COPY --chown=node:node $APP_DIR .
807
+ export DOCKER_COPY_AND_INSTALL_APP="ENV YARN_ENABLE_INLINE_BUILDS=1
808
+ COPY --chown=node:node $APP_DIR .
703
809
  RUN yarn plugin import workspace-tools
704
810
  RUN yarn workspaces focus --production && yarn rebuild"
705
811
  - |-
@@ -721,10 +827,12 @@ api 🧪 test:
721
827
  - docker push $DOCKER_CACHE_IMAGE
722
828
  - collapseable_section_end "docker-push"
723
829
  cache:
724
- - key: api-yarn
830
+ - key: api-yarn-mr$CI_MERGE_REQUEST_IID
725
831
  policy: pull
726
832
  paths:
727
833
  - api/.yarn
834
+ fallback_keys:
835
+ - api-yarn
728
836
  rules:
729
837
  - when: never
730
838
  if: $CI_PIPELINE_SOURCE == "trigger"
@@ -887,17 +995,17 @@ api 🧪 test:
887
995
  - when: on_success
888
996
  if: $CI_MERGE_REQUEST_ID
889
997
  needs:
890
- - job: api 👮 lint
998
+ - job: 'api 👮 lint | review '
891
999
  artifacts: false
892
1000
  - job: 'api 🔨 app | review '
893
1001
  artifacts: false
894
1002
  - job: 'api 🔨 docker | review '
895
1003
  artifacts: false
896
- - job: api 🧪 test
1004
+ - job: 'api 🧪 test | review '
897
1005
  artifacts: false
898
1006
  - job: 'api 🧾 sbom | review '
899
1007
  artifacts: true
900
- - job: api 🛡 audit
1008
+ - job: 'api 🛡 audit | review '
901
1009
  artifacts: false
902
1010
  retry: *a1
903
1011
  interruptible: true
@@ -1037,7 +1145,7 @@ api 🧪 test:
1037
1145
  - if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi
1038
1146
  - collapseable_section_end "nodeinstall"
1039
1147
  - collapseable_section_start "yarninstall" "Yarn install"
1040
- - yarn install --immutable
1148
+ - yarn install --immutable --inline-builds
1041
1149
  - collapseable_section_end "yarninstall"
1042
1150
  - yarn build
1043
1151
  cache:
@@ -1092,7 +1200,8 @@ api 🧪 test:
1092
1200
  - export DOCKER_IMAGE="$CI_REGISTRY_IMAGE/$DOCKER_IMAGE_NAME"
1093
1201
  - export DOCKER_IMAGE_TAG="$CI_COMMIT_SHA"
1094
1202
  - |-
1095
- export DOCKER_COPY_AND_INSTALL_APP="COPY --chown=node:node $APP_DIR .
1203
+ export DOCKER_COPY_AND_INSTALL_APP="ENV YARN_ENABLE_INLINE_BUILDS=1
1204
+ COPY --chown=node:node $APP_DIR .
1096
1205
  RUN yarn plugin import workspace-tools
1097
1206
  RUN yarn workspaces focus --production && yarn rebuild"
1098
1207
  - |-
@@ -1422,7 +1531,7 @@ api 🧪 test:
1422
1531
  - if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi
1423
1532
  - collapseable_section_end "nodeinstall"
1424
1533
  - collapseable_section_start "yarninstall" "Yarn install"
1425
- - yarn install --immutable
1534
+ - yarn install --immutable --inline-builds
1426
1535
  - collapseable_section_end "yarninstall"
1427
1536
  - yarn build
1428
1537
  cache:
@@ -1477,7 +1586,8 @@ api 🧪 test:
1477
1586
  - export DOCKER_IMAGE="$CI_REGISTRY_IMAGE/$DOCKER_IMAGE_NAME"
1478
1587
  - export DOCKER_IMAGE_TAG="$CI_COMMIT_SHA"
1479
1588
  - |-
1480
- export DOCKER_COPY_AND_INSTALL_APP="COPY --chown=node:node $APP_DIR .
1589
+ export DOCKER_COPY_AND_INSTALL_APP="ENV YARN_ENABLE_INLINE_BUILDS=1
1590
+ COPY --chown=node:node $APP_DIR .
1481
1591
  RUN yarn plugin import workspace-tools
1482
1592
  RUN yarn workspaces focus --production && yarn rebuild"
1483
1593
  - |-
@@ -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:
@@ -152,7 +149,7 @@ api 👮 lint:
152
149
  - if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi
153
150
  - collapseable_section_end "nodeinstall"
154
151
  - collapseable_section_start "yarninstall" "Yarn install"
155
- - yarn install --immutable
152
+ - yarn install --immutable --inline-builds
156
153
  - collapseable_section_end "yarninstall"
157
154
  - yarn lint
158
155
  cache:
@@ -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:
@@ -195,7 +189,7 @@ api 🧪 test:
195
189
  - if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi
196
190
  - collapseable_section_end "nodeinstall"
197
191
  - collapseable_section_start "yarninstall" "Yarn install"
198
- - yarn install --immutable
192
+ - yarn install --immutable --inline-builds
199
193
  - collapseable_section_end "yarninstall"
200
194
  - yarn test
201
195
  cache:
@@ -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
@@ -254,7 +245,7 @@ api 🧪 test:
254
245
  - if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi
255
246
  - collapseable_section_end "nodeinstall"
256
247
  - collapseable_section_start "yarninstall" "Yarn install"
257
- - yarn install --immutable
248
+ - yarn install --immutable --inline-builds
258
249
  - collapseable_section_end "yarninstall"
259
250
  - yarn build
260
251
  cache:
@@ -309,7 +300,8 @@ api 🧪 test:
309
300
  - export DOCKER_IMAGE="$CI_REGISTRY_IMAGE/$DOCKER_IMAGE_NAME"
310
301
  - export DOCKER_IMAGE_TAG="$CI_COMMIT_SHA"
311
302
  - |-
312
- export DOCKER_COPY_AND_INSTALL_APP="COPY --chown=node:node $APP_DIR .
303
+ export DOCKER_COPY_AND_INSTALL_APP="ENV YARN_ENABLE_INLINE_BUILDS=1
304
+ COPY --chown=node:node $APP_DIR .
313
305
  RUN yarn plugin import workspace-tools
314
306
  RUN yarn workspaces focus --production && yarn rebuild"
315
307
  - |-
@@ -495,17 +487,17 @@ api 🧪 test:
495
487
  - when: on_success
496
488
  if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && $CI_COMMIT_MESSAGE !~ /^chore\\(release\\).*/
497
489
  needs:
498
- - job: api 👮 lint
490
+ - job: 'api 👮 lint | dev '
499
491
  artifacts: false
500
492
  - job: 'api 🔨 app | dev '
501
493
  artifacts: false
502
494
  - job: 'api 🔨 docker | dev '
503
495
  artifacts: false
504
- - job: api 🧪 test
496
+ - job: 'api 🧪 test | dev '
505
497
  artifacts: false
506
498
  - job: 'api 🧾 sbom | dev '
507
499
  artifacts: true
508
- - job: api 🛡 audit
500
+ - job: 'api 🛡 audit | dev '
509
501
  artifacts: false
510
502
  retry: *a1
511
503
  interruptible: true
@@ -614,6 +606,115 @@ api 🧪 test:
614
606
  retry: *a1
615
607
  interruptible: true
616
608
  allow_failure: true
609
+ 'api 🛡 audit | review ':
610
+ stage: test
611
+ image: path/to/docker/jobs-default:the-version
612
+ variables:
613
+ KUBERNETES_CPU_REQUEST: '0.45'
614
+ KUBERNETES_MEMORY_REQUEST: 1Gi
615
+ KUBERNETES_MEMORY_LIMIT: 4Gi
616
+ script:
617
+ - collapseable_section_start "injectvars" "Injecting variables"
618
+ - export APP_PATH="api"
619
+ - collapseable_section_end "injectvars"
620
+ - cd api
621
+ - yarn npm audit --environment production
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
629
+ allow_failure: true
630
+ 'api 👮 lint | review ':
631
+ stage: test
632
+ image: path/to/docker/jobs-default:the-version
633
+ variables:
634
+ KUBERNETES_CPU_REQUEST: '0.45'
635
+ KUBERNETES_MEMORY_REQUEST: 1Gi
636
+ KUBERNETES_MEMORY_LIMIT: 4Gi
637
+ script:
638
+ - collapseable_section_start "injectvars" "Injecting variables"
639
+ - export APP_PATH="api"
640
+ - collapseable_section_end "injectvars"
641
+ - collapseable_section_start "nodeinstall" "Ensure node version"
642
+ - if [ -f ~/.nvm/nvm.sh ]; then source ~/.nvm/nvm.sh; fi
643
+ - if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi
644
+ - collapseable_section_end "nodeinstall"
645
+ - cd api
646
+ - collapseable_section_start "nodeinstall" "Ensure node version"
647
+ - if [ -f ~/.nvm/nvm.sh ]; then source ~/.nvm/nvm.sh; fi
648
+ - if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi
649
+ - collapseable_section_end "nodeinstall"
650
+ - collapseable_section_start "yarninstall" "Yarn install"
651
+ - yarn install --immutable --inline-builds
652
+ - collapseable_section_end "yarninstall"
653
+ - yarn lint
654
+ cache:
655
+ - key: api-yarn-mr$CI_MERGE_REQUEST_IID
656
+ policy: pull-push
657
+ paths:
658
+ - api/.yarn
659
+ fallback_keys:
660
+ - api-yarn
661
+ - key: api-node-modules-mr$CI_MERGE_REQUEST_IID
662
+ policy: pull-push
663
+ paths:
664
+ - api/node_modules
665
+ fallback_keys:
666
+ - api-node-modules
667
+ rules:
668
+ - when: never
669
+ if: $CI_PIPELINE_SOURCE == "trigger"
670
+ - if: $CI_MERGE_REQUEST_ID
671
+ needs: []
672
+ retry: *a1
673
+ interruptible: true
674
+ 'api 🧪 test | review ':
675
+ stage: test
676
+ image: path/to/docker/jobs-testing-chrome:the-version
677
+ variables:
678
+ KUBERNETES_CPU_REQUEST: '0.45'
679
+ KUBERNETES_MEMORY_REQUEST: 1Gi
680
+ KUBERNETES_MEMORY_LIMIT: 4Gi
681
+ script:
682
+ - collapseable_section_start "injectvars" "Injecting variables"
683
+ - export APP_PATH="api"
684
+ - collapseable_section_end "injectvars"
685
+ - collapseable_section_start "nodeinstall" "Ensure node version"
686
+ - if [ -f ~/.nvm/nvm.sh ]; then source ~/.nvm/nvm.sh; fi
687
+ - if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi
688
+ - collapseable_section_end "nodeinstall"
689
+ - cd api
690
+ - collapseable_section_start "nodeinstall" "Ensure node version"
691
+ - if [ -f ~/.nvm/nvm.sh ]; then source ~/.nvm/nvm.sh; fi
692
+ - if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi
693
+ - collapseable_section_end "nodeinstall"
694
+ - collapseable_section_start "yarninstall" "Yarn install"
695
+ - yarn install --immutable --inline-builds
696
+ - collapseable_section_end "yarninstall"
697
+ - yarn test
698
+ cache:
699
+ - key: api-yarn-mr$CI_MERGE_REQUEST_IID
700
+ policy: pull-push
701
+ paths:
702
+ - api/.yarn
703
+ fallback_keys:
704
+ - api-yarn
705
+ - key: api-node-modules-mr$CI_MERGE_REQUEST_IID
706
+ policy: pull-push
707
+ paths:
708
+ - api/node_modules
709
+ fallback_keys:
710
+ - api-node-modules
711
+ rules:
712
+ - when: never
713
+ if: $CI_PIPELINE_SOURCE == "trigger"
714
+ - if: $CI_MERGE_REQUEST_ID
715
+ needs: []
716
+ retry: *a1
717
+ interruptible: true
617
718
  'api 🔨 app | review ':
618
719
  stage: build
619
720
  image: path/to/docker/jobs-default:the-version
@@ -651,18 +752,22 @@ api 🧪 test:
651
752
  - if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi
652
753
  - collapseable_section_end "nodeinstall"
653
754
  - collapseable_section_start "yarninstall" "Yarn install"
654
- - yarn install --immutable
755
+ - yarn install --immutable --inline-builds
655
756
  - collapseable_section_end "yarninstall"
656
757
  - yarn build
657
758
  cache:
658
- - key: api-yarn
759
+ - key: api-yarn-mr$CI_MERGE_REQUEST_IID
659
760
  policy: pull-push
660
761
  paths:
661
762
  - api/.yarn
662
- - key: api-node-modules
763
+ fallback_keys:
764
+ - api-yarn
765
+ - key: api-node-modules-mr$CI_MERGE_REQUEST_IID
663
766
  policy: pull-push
664
767
  paths:
665
768
  - api/node_modules
769
+ fallback_keys:
770
+ - api-node-modules
666
771
  artifacts:
667
772
  paths:
668
773
  - api/__build_info.json
@@ -706,7 +811,8 @@ api 🧪 test:
706
811
  - export DOCKER_IMAGE="$CI_REGISTRY_IMAGE/$DOCKER_IMAGE_NAME"
707
812
  - export DOCKER_IMAGE_TAG="$CI_COMMIT_SHA"
708
813
  - |-
709
- export DOCKER_COPY_AND_INSTALL_APP="COPY --chown=node:node $APP_DIR .
814
+ export DOCKER_COPY_AND_INSTALL_APP="ENV YARN_ENABLE_INLINE_BUILDS=1
815
+ COPY --chown=node:node $APP_DIR .
710
816
  RUN yarn plugin import workspace-tools
711
817
  RUN yarn workspaces focus --production && yarn rebuild"
712
818
  - |-
@@ -728,10 +834,12 @@ api 🧪 test:
728
834
  - docker push $DOCKER_CACHE_IMAGE
729
835
  - collapseable_section_end "docker-push"
730
836
  cache:
731
- - key: api-yarn
837
+ - key: api-yarn-mr$CI_MERGE_REQUEST_IID
732
838
  policy: pull
733
839
  paths:
734
840
  - api/.yarn
841
+ fallback_keys:
842
+ - api-yarn
735
843
  rules:
736
844
  - when: never
737
845
  if: $CI_PIPELINE_SOURCE == "trigger"
@@ -893,17 +1001,17 @@ api 🧪 test:
893
1001
  - when: on_success
894
1002
  if: $CI_MERGE_REQUEST_ID
895
1003
  needs:
896
- - job: api 👮 lint
1004
+ - job: 'api 👮 lint | review '
897
1005
  artifacts: false
898
1006
  - job: 'api 🔨 app | review '
899
1007
  artifacts: false
900
1008
  - job: 'api 🔨 docker | review '
901
1009
  artifacts: false
902
- - job: api 🧪 test
1010
+ - job: 'api 🧪 test | review '
903
1011
  artifacts: false
904
1012
  - job: 'api 🧾 sbom | review '
905
1013
  artifacts: true
906
- - job: api 🛡 audit
1014
+ - job: 'api 🛡 audit | review '
907
1015
  artifacts: false
908
1016
  retry: *a1
909
1017
  interruptible: true
@@ -1049,7 +1157,7 @@ api 🧪 test:
1049
1157
  - if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi
1050
1158
  - collapseable_section_end "nodeinstall"
1051
1159
  - collapseable_section_start "yarninstall" "Yarn install"
1052
- - yarn install --immutable
1160
+ - yarn install --immutable --inline-builds
1053
1161
  - collapseable_section_end "yarninstall"
1054
1162
  - yarn build
1055
1163
  cache:
@@ -1104,7 +1212,8 @@ api 🧪 test:
1104
1212
  - export DOCKER_IMAGE="$CI_REGISTRY_IMAGE/$DOCKER_IMAGE_NAME"
1105
1213
  - export DOCKER_IMAGE_TAG="$CI_COMMIT_SHA"
1106
1214
  - |-
1107
- export DOCKER_COPY_AND_INSTALL_APP="COPY --chown=node:node $APP_DIR .
1215
+ export DOCKER_COPY_AND_INSTALL_APP="ENV YARN_ENABLE_INLINE_BUILDS=1
1216
+ COPY --chown=node:node $APP_DIR .
1108
1217
  RUN yarn plugin import workspace-tools
1109
1218
  RUN yarn workspaces focus --production && yarn rebuild"
1110
1219
  - |-
@@ -1439,7 +1548,7 @@ api 🧪 test:
1439
1548
  - if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi
1440
1549
  - collapseable_section_end "nodeinstall"
1441
1550
  - collapseable_section_start "yarninstall" "Yarn install"
1442
- - yarn install --immutable
1551
+ - yarn install --immutable --inline-builds
1443
1552
  - collapseable_section_end "yarninstall"
1444
1553
  - yarn build
1445
1554
  cache:
@@ -1494,7 +1603,8 @@ api 🧪 test:
1494
1603
  - export DOCKER_IMAGE="$CI_REGISTRY_IMAGE/$DOCKER_IMAGE_NAME"
1495
1604
  - export DOCKER_IMAGE_TAG="$CI_COMMIT_SHA"
1496
1605
  - |-
1497
- export DOCKER_COPY_AND_INSTALL_APP="COPY --chown=node:node $APP_DIR .
1606
+ export DOCKER_COPY_AND_INSTALL_APP="ENV YARN_ENABLE_INLINE_BUILDS=1
1607
+ COPY --chown=node:node $APP_DIR .
1498
1608
  RUN yarn plugin import workspace-tools
1499
1609
  RUN yarn workspaces focus --production && yarn rebuild"
1500
1610
  - |-