@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
@@ -288,7 +279,7 @@ api 🧪 test:
288
279
  - if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi
289
280
  - collapseable_section_end "nodeinstall"
290
281
  - collapseable_section_start "yarninstall" "Yarn install"
291
- - yarn install --immutable
282
+ - yarn install --immutable --inline-builds
292
283
  - collapseable_section_end "yarninstall"
293
284
  - yarn build
294
285
  cache:
@@ -343,7 +334,8 @@ api 🧪 test:
343
334
  - export DOCKER_CACHE_IMAGE="europe-west6-docker.pkg.dev/google-project-id/catladder-deploy/pan-test-app/caches/api"
344
335
  - export DOCKER_IMAGE_TAG="$CI_COMMIT_SHA"
345
336
  - |-
346
- export DOCKER_COPY_AND_INSTALL_APP="COPY --chown=node:node $APP_DIR .
337
+ export DOCKER_COPY_AND_INSTALL_APP="ENV YARN_ENABLE_INLINE_BUILDS=1
338
+ COPY --chown=node:node $APP_DIR .
347
339
  RUN yarn plugin import workspace-tools
348
340
  RUN yarn workspaces focus --production && yarn rebuild"
349
341
  - |-
@@ -579,17 +571,17 @@ api 🧪 test:
579
571
  - when: on_success
580
572
  if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && $CI_COMMIT_MESSAGE !~ /^chore\\(release\\).*/
581
573
  needs:
582
- - job: api 👮 lint
574
+ - job: 'api 👮 lint | dev '
583
575
  artifacts: false
584
576
  - job: 'api 🔨 app | dev '
585
577
  artifacts: false
586
578
  - job: 'api 🔨 docker | dev '
587
579
  artifacts: false
588
- - job: api 🧪 test
580
+ - job: 'api 🧪 test | dev '
589
581
  artifacts: false
590
582
  - job: 'api 🧾 sbom | dev '
591
583
  artifacts: true
592
- - job: api 🛡 audit
584
+ - job: 'api 🛡 audit | dev '
593
585
  artifacts: false
594
586
  retry: *a1
595
587
  interruptible: true
@@ -637,6 +629,115 @@ api 🧪 test:
637
629
  retry: *a1
638
630
  interruptible: true
639
631
  allow_failure: true
632
+ 'api 🛡 audit | review ':
633
+ stage: test
634
+ image: path/to/docker/jobs-default:the-version
635
+ variables:
636
+ KUBERNETES_CPU_REQUEST: '0.45'
637
+ KUBERNETES_MEMORY_REQUEST: 1Gi
638
+ KUBERNETES_MEMORY_LIMIT: 4Gi
639
+ script:
640
+ - collapseable_section_start "injectvars" "Injecting variables"
641
+ - export APP_PATH="api"
642
+ - collapseable_section_end "injectvars"
643
+ - cd api
644
+ - yarn npm audit --environment production
645
+ rules:
646
+ - when: never
647
+ if: $CI_PIPELINE_SOURCE == "trigger"
648
+ - if: $CI_MERGE_REQUEST_ID
649
+ needs: []
650
+ retry: *a1
651
+ interruptible: true
652
+ allow_failure: true
653
+ 'api 👮 lint | review ':
654
+ stage: test
655
+ image: path/to/docker/jobs-default:the-version
656
+ variables:
657
+ KUBERNETES_CPU_REQUEST: '0.45'
658
+ KUBERNETES_MEMORY_REQUEST: 1Gi
659
+ KUBERNETES_MEMORY_LIMIT: 4Gi
660
+ script:
661
+ - collapseable_section_start "injectvars" "Injecting variables"
662
+ - export APP_PATH="api"
663
+ - collapseable_section_end "injectvars"
664
+ - collapseable_section_start "nodeinstall" "Ensure node version"
665
+ - if [ -f ~/.nvm/nvm.sh ]; then source ~/.nvm/nvm.sh; fi
666
+ - if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi
667
+ - collapseable_section_end "nodeinstall"
668
+ - cd api
669
+ - collapseable_section_start "nodeinstall" "Ensure node version"
670
+ - if [ -f ~/.nvm/nvm.sh ]; then source ~/.nvm/nvm.sh; fi
671
+ - if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi
672
+ - collapseable_section_end "nodeinstall"
673
+ - collapseable_section_start "yarninstall" "Yarn install"
674
+ - yarn install --immutable --inline-builds
675
+ - collapseable_section_end "yarninstall"
676
+ - yarn lint
677
+ cache:
678
+ - key: api-yarn-mr$CI_MERGE_REQUEST_IID
679
+ policy: pull-push
680
+ paths:
681
+ - api/.yarn
682
+ fallback_keys:
683
+ - api-yarn
684
+ - key: api-node-modules-mr$CI_MERGE_REQUEST_IID
685
+ policy: pull-push
686
+ paths:
687
+ - api/node_modules
688
+ fallback_keys:
689
+ - api-node-modules
690
+ rules:
691
+ - when: never
692
+ if: $CI_PIPELINE_SOURCE == "trigger"
693
+ - if: $CI_MERGE_REQUEST_ID
694
+ needs: []
695
+ retry: *a1
696
+ interruptible: true
697
+ 'api 🧪 test | review ':
698
+ stage: test
699
+ image: path/to/docker/jobs-testing-chrome:the-version
700
+ variables:
701
+ KUBERNETES_CPU_REQUEST: '0.45'
702
+ KUBERNETES_MEMORY_REQUEST: 1Gi
703
+ KUBERNETES_MEMORY_LIMIT: 4Gi
704
+ script:
705
+ - collapseable_section_start "injectvars" "Injecting variables"
706
+ - export APP_PATH="api"
707
+ - collapseable_section_end "injectvars"
708
+ - collapseable_section_start "nodeinstall" "Ensure node version"
709
+ - if [ -f ~/.nvm/nvm.sh ]; then source ~/.nvm/nvm.sh; fi
710
+ - if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi
711
+ - collapseable_section_end "nodeinstall"
712
+ - cd api
713
+ - collapseable_section_start "nodeinstall" "Ensure node version"
714
+ - if [ -f ~/.nvm/nvm.sh ]; then source ~/.nvm/nvm.sh; fi
715
+ - if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi
716
+ - collapseable_section_end "nodeinstall"
717
+ - collapseable_section_start "yarninstall" "Yarn install"
718
+ - yarn install --immutable --inline-builds
719
+ - collapseable_section_end "yarninstall"
720
+ - yarn test
721
+ cache:
722
+ - key: api-yarn-mr$CI_MERGE_REQUEST_IID
723
+ policy: pull-push
724
+ paths:
725
+ - api/.yarn
726
+ fallback_keys:
727
+ - api-yarn
728
+ - key: api-node-modules-mr$CI_MERGE_REQUEST_IID
729
+ policy: pull-push
730
+ paths:
731
+ - api/node_modules
732
+ fallback_keys:
733
+ - api-node-modules
734
+ rules:
735
+ - when: never
736
+ if: $CI_PIPELINE_SOURCE == "trigger"
737
+ - if: $CI_MERGE_REQUEST_ID
738
+ needs: []
739
+ retry: *a1
740
+ interruptible: true
640
741
  'api 🔨 app | review ':
641
742
  stage: build
642
743
  image: path/to/docker/jobs-default:the-version
@@ -708,18 +809,22 @@ api 🧪 test:
708
809
  - if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi
709
810
  - collapseable_section_end "nodeinstall"
710
811
  - collapseable_section_start "yarninstall" "Yarn install"
711
- - yarn install --immutable
812
+ - yarn install --immutable --inline-builds
712
813
  - collapseable_section_end "yarninstall"
713
814
  - yarn build
714
815
  cache:
715
- - key: api-yarn
816
+ - key: api-yarn-mr$CI_MERGE_REQUEST_IID
716
817
  policy: pull-push
717
818
  paths:
718
819
  - api/.yarn
719
- - key: api-node-modules
820
+ fallback_keys:
821
+ - api-yarn
822
+ - key: api-node-modules-mr$CI_MERGE_REQUEST_IID
720
823
  policy: pull-push
721
824
  paths:
722
825
  - api/node_modules
826
+ fallback_keys:
827
+ - api-node-modules
723
828
  artifacts:
724
829
  paths:
725
830
  - api/__build_info.json
@@ -763,7 +868,8 @@ api 🧪 test:
763
868
  - export DOCKER_CACHE_IMAGE="europe-west6-docker.pkg.dev/google-project-id/catladder-deploy/pan-test-app/caches/api"
764
869
  - export DOCKER_IMAGE_TAG="$CI_COMMIT_SHA"
765
870
  - |-
766
- export DOCKER_COPY_AND_INSTALL_APP="COPY --chown=node:node $APP_DIR .
871
+ export DOCKER_COPY_AND_INSTALL_APP="ENV YARN_ENABLE_INLINE_BUILDS=1
872
+ COPY --chown=node:node $APP_DIR .
767
873
  RUN yarn plugin import workspace-tools
768
874
  RUN yarn workspaces focus --production && yarn rebuild"
769
875
  - |-
@@ -786,10 +892,12 @@ api 🧪 test:
786
892
  - docker push $DOCKER_CACHE_IMAGE
787
893
  - collapseable_section_end "docker-push"
788
894
  cache:
789
- - key: api-yarn
895
+ - key: api-yarn-mr$CI_MERGE_REQUEST_IID
790
896
  policy: pull
791
897
  paths:
792
898
  - api/.yarn
899
+ fallback_keys:
900
+ - api-yarn
793
901
  rules:
794
902
  - when: never
795
903
  if: $CI_PIPELINE_SOURCE == "trigger"
@@ -995,17 +1103,17 @@ api 🧪 test:
995
1103
  - when: on_success
996
1104
  if: $CI_MERGE_REQUEST_ID
997
1105
  needs:
998
- - job: api 👮 lint
1106
+ - job: 'api 👮 lint | review '
999
1107
  artifacts: false
1000
1108
  - job: 'api 🔨 app | review '
1001
1109
  artifacts: false
1002
1110
  - job: 'api 🔨 docker | review '
1003
1111
  artifacts: false
1004
- - job: api 🧪 test
1112
+ - job: 'api 🧪 test | review '
1005
1113
  artifacts: false
1006
1114
  - job: 'api 🧾 sbom | review '
1007
1115
  artifacts: true
1008
- - job: api 🛡 audit
1116
+ - job: 'api 🛡 audit | review '
1009
1117
  artifacts: false
1010
1118
  retry: *a1
1011
1119
  interruptible: true
@@ -1129,7 +1237,7 @@ api 🧪 test:
1129
1237
  - if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi
1130
1238
  - collapseable_section_end "nodeinstall"
1131
1239
  - collapseable_section_start "yarninstall" "Yarn install"
1132
- - yarn install --immutable
1240
+ - yarn install --immutable --inline-builds
1133
1241
  - collapseable_section_end "yarninstall"
1134
1242
  - yarn build
1135
1243
  cache:
@@ -1184,7 +1292,8 @@ api 🧪 test:
1184
1292
  - export DOCKER_CACHE_IMAGE="europe-west6-docker.pkg.dev/google-project-id/catladder-deploy/pan-test-app/caches/api"
1185
1293
  - export DOCKER_IMAGE_TAG="$CI_COMMIT_SHA"
1186
1294
  - |-
1187
- export DOCKER_COPY_AND_INSTALL_APP="COPY --chown=node:node $APP_DIR .
1295
+ export DOCKER_COPY_AND_INSTALL_APP="ENV YARN_ENABLE_INLINE_BUILDS=1
1296
+ COPY --chown=node:node $APP_DIR .
1188
1297
  RUN yarn plugin import workspace-tools
1189
1298
  RUN yarn workspaces focus --production && yarn rebuild"
1190
1299
  - |-
@@ -1540,7 +1649,7 @@ api 🧪 test:
1540
1649
  - if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi
1541
1650
  - collapseable_section_end "nodeinstall"
1542
1651
  - collapseable_section_start "yarninstall" "Yarn install"
1543
- - yarn install --immutable
1652
+ - yarn install --immutable --inline-builds
1544
1653
  - collapseable_section_end "yarninstall"
1545
1654
  - yarn build
1546
1655
  cache:
@@ -1595,7 +1704,8 @@ api 🧪 test:
1595
1704
  - export DOCKER_CACHE_IMAGE="europe-west6-docker.pkg.dev/google-project-id/catladder-deploy/pan-test-app/caches/api"
1596
1705
  - export DOCKER_IMAGE_TAG="$CI_COMMIT_SHA"
1597
1706
  - |-
1598
- export DOCKER_COPY_AND_INSTALL_APP="COPY --chown=node:node $APP_DIR .
1707
+ export DOCKER_COPY_AND_INSTALL_APP="ENV YARN_ENABLE_INLINE_BUILDS=1
1708
+ COPY --chown=node:node $APP_DIR .
1599
1709
  RUN yarn plugin import workspace-tools
1600
1710
  RUN yarn workspaces focus --production && yarn rebuild"
1601
1711
  - |-
@@ -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
@@ -270,7 +261,7 @@ api 🧪 test:
270
261
  - if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi
271
262
  - collapseable_section_end "nodeinstall"
272
263
  - collapseable_section_start "yarninstall" "Yarn install"
273
- - yarn install --immutable
264
+ - yarn install --immutable --inline-builds
274
265
  - collapseable_section_end "yarninstall"
275
266
  - yarn build
276
267
  cache:
@@ -325,7 +316,8 @@ api 🧪 test:
325
316
  - export DOCKER_CACHE_IMAGE="europe-west6-docker.pkg.dev/google-project-id/catladder-deploy/pan-test-app/caches/api"
326
317
  - export DOCKER_IMAGE_TAG="$CI_COMMIT_SHA"
327
318
  - |-
328
- export DOCKER_COPY_AND_INSTALL_APP="COPY --chown=node:node $APP_DIR .
319
+ export DOCKER_COPY_AND_INSTALL_APP="ENV YARN_ENABLE_INLINE_BUILDS=1
320
+ COPY --chown=node:node $APP_DIR .
329
321
  RUN yarn plugin import workspace-tools
330
322
  RUN yarn workspaces focus --production && yarn rebuild"
331
323
  - |-
@@ -479,17 +471,17 @@ api 🧪 test:
479
471
  - when: on_success
480
472
  if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && $CI_COMMIT_MESSAGE !~ /^chore\\(release\\).*/
481
473
  needs:
482
- - job: api 👮 lint
474
+ - job: 'api 👮 lint | dev '
483
475
  artifacts: false
484
476
  - job: 'api 🔨 app | dev '
485
477
  artifacts: false
486
478
  - job: 'api 🔨 docker | dev '
487
479
  artifacts: false
488
- - job: api 🧪 test
480
+ - job: 'api 🧪 test | dev '
489
481
  artifacts: false
490
482
  - job: 'api 🧾 sbom | dev '
491
483
  artifacts: true
492
- - job: api 🛡 audit
484
+ - job: 'api 🛡 audit | dev '
493
485
  artifacts: false
494
486
  retry: *a1
495
487
  interruptible: true
@@ -529,6 +521,115 @@ api 🧪 test:
529
521
  retry: *a1
530
522
  interruptible: true
531
523
  allow_failure: true
524
+ 'api 🛡 audit | review ':
525
+ stage: test
526
+ image: path/to/docker/jobs-default:the-version
527
+ variables:
528
+ KUBERNETES_CPU_REQUEST: '0.45'
529
+ KUBERNETES_MEMORY_REQUEST: 1Gi
530
+ KUBERNETES_MEMORY_LIMIT: 4Gi
531
+ script:
532
+ - collapseable_section_start "injectvars" "Injecting variables"
533
+ - export APP_PATH="api"
534
+ - collapseable_section_end "injectvars"
535
+ - cd api
536
+ - yarn npm audit --environment production
537
+ rules:
538
+ - when: never
539
+ if: $CI_PIPELINE_SOURCE == "trigger"
540
+ - if: $CI_MERGE_REQUEST_ID
541
+ needs: []
542
+ retry: *a1
543
+ interruptible: true
544
+ allow_failure: true
545
+ 'api 👮 lint | review ':
546
+ stage: test
547
+ image: path/to/docker/jobs-default:the-version
548
+ variables:
549
+ KUBERNETES_CPU_REQUEST: '0.45'
550
+ KUBERNETES_MEMORY_REQUEST: 1Gi
551
+ KUBERNETES_MEMORY_LIMIT: 4Gi
552
+ script:
553
+ - collapseable_section_start "injectvars" "Injecting variables"
554
+ - export APP_PATH="api"
555
+ - collapseable_section_end "injectvars"
556
+ - collapseable_section_start "nodeinstall" "Ensure node version"
557
+ - if [ -f ~/.nvm/nvm.sh ]; then source ~/.nvm/nvm.sh; fi
558
+ - if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi
559
+ - collapseable_section_end "nodeinstall"
560
+ - cd api
561
+ - collapseable_section_start "nodeinstall" "Ensure node version"
562
+ - if [ -f ~/.nvm/nvm.sh ]; then source ~/.nvm/nvm.sh; fi
563
+ - if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi
564
+ - collapseable_section_end "nodeinstall"
565
+ - collapseable_section_start "yarninstall" "Yarn install"
566
+ - yarn install --immutable --inline-builds
567
+ - collapseable_section_end "yarninstall"
568
+ - yarn lint
569
+ cache:
570
+ - key: api-yarn-mr$CI_MERGE_REQUEST_IID
571
+ policy: pull-push
572
+ paths:
573
+ - api/.yarn
574
+ fallback_keys:
575
+ - api-yarn
576
+ - key: api-node-modules-mr$CI_MERGE_REQUEST_IID
577
+ policy: pull-push
578
+ paths:
579
+ - api/node_modules
580
+ fallback_keys:
581
+ - api-node-modules
582
+ rules:
583
+ - when: never
584
+ if: $CI_PIPELINE_SOURCE == "trigger"
585
+ - if: $CI_MERGE_REQUEST_ID
586
+ needs: []
587
+ retry: *a1
588
+ interruptible: true
589
+ 'api 🧪 test | review ':
590
+ stage: test
591
+ image: path/to/docker/jobs-testing-chrome:the-version
592
+ variables:
593
+ KUBERNETES_CPU_REQUEST: '0.45'
594
+ KUBERNETES_MEMORY_REQUEST: 1Gi
595
+ KUBERNETES_MEMORY_LIMIT: 4Gi
596
+ script:
597
+ - collapseable_section_start "injectvars" "Injecting variables"
598
+ - export APP_PATH="api"
599
+ - collapseable_section_end "injectvars"
600
+ - collapseable_section_start "nodeinstall" "Ensure node version"
601
+ - if [ -f ~/.nvm/nvm.sh ]; then source ~/.nvm/nvm.sh; fi
602
+ - if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi
603
+ - collapseable_section_end "nodeinstall"
604
+ - cd api
605
+ - collapseable_section_start "nodeinstall" "Ensure node version"
606
+ - if [ -f ~/.nvm/nvm.sh ]; then source ~/.nvm/nvm.sh; fi
607
+ - if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi
608
+ - collapseable_section_end "nodeinstall"
609
+ - collapseable_section_start "yarninstall" "Yarn install"
610
+ - yarn install --immutable --inline-builds
611
+ - collapseable_section_end "yarninstall"
612
+ - yarn test
613
+ cache:
614
+ - key: api-yarn-mr$CI_MERGE_REQUEST_IID
615
+ policy: pull-push
616
+ paths:
617
+ - api/.yarn
618
+ fallback_keys:
619
+ - api-yarn
620
+ - key: api-node-modules-mr$CI_MERGE_REQUEST_IID
621
+ policy: pull-push
622
+ paths:
623
+ - api/node_modules
624
+ fallback_keys:
625
+ - api-node-modules
626
+ rules:
627
+ - when: never
628
+ if: $CI_PIPELINE_SOURCE == "trigger"
629
+ - if: $CI_MERGE_REQUEST_ID
630
+ needs: []
631
+ retry: *a1
632
+ interruptible: true
532
633
  'api 🔨 app | review ':
533
634
  stage: build
534
635
  image: path/to/docker/jobs-default:the-version
@@ -582,18 +683,22 @@ api 🧪 test:
582
683
  - if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi
583
684
  - collapseable_section_end "nodeinstall"
584
685
  - collapseable_section_start "yarninstall" "Yarn install"
585
- - yarn install --immutable
686
+ - yarn install --immutable --inline-builds
586
687
  - collapseable_section_end "yarninstall"
587
688
  - yarn build
588
689
  cache:
589
- - key: api-yarn
690
+ - key: api-yarn-mr$CI_MERGE_REQUEST_IID
590
691
  policy: pull-push
591
692
  paths:
592
693
  - api/.yarn
593
- - key: api-node-modules
694
+ fallback_keys:
695
+ - api-yarn
696
+ - key: api-node-modules-mr$CI_MERGE_REQUEST_IID
594
697
  policy: pull-push
595
698
  paths:
596
699
  - api/node_modules
700
+ fallback_keys:
701
+ - api-node-modules
597
702
  artifacts:
598
703
  paths:
599
704
  - api/__build_info.json
@@ -637,7 +742,8 @@ api 🧪 test:
637
742
  - export DOCKER_CACHE_IMAGE="europe-west6-docker.pkg.dev/google-project-id/catladder-deploy/pan-test-app/caches/api"
638
743
  - export DOCKER_IMAGE_TAG="$CI_COMMIT_SHA"
639
744
  - |-
640
- export DOCKER_COPY_AND_INSTALL_APP="COPY --chown=node:node $APP_DIR .
745
+ export DOCKER_COPY_AND_INSTALL_APP="ENV YARN_ENABLE_INLINE_BUILDS=1
746
+ COPY --chown=node:node $APP_DIR .
641
747
  RUN yarn plugin import workspace-tools
642
748
  RUN yarn workspaces focus --production && yarn rebuild"
643
749
  - |-
@@ -660,10 +766,12 @@ api 🧪 test:
660
766
  - docker push $DOCKER_CACHE_IMAGE
661
767
  - collapseable_section_end "docker-push"
662
768
  cache:
663
- - key: api-yarn
769
+ - key: api-yarn-mr$CI_MERGE_REQUEST_IID
664
770
  policy: pull
665
771
  paths:
666
772
  - api/.yarn
773
+ fallback_keys:
774
+ - api-yarn
667
775
  rules:
668
776
  - when: never
669
777
  if: $CI_PIPELINE_SOURCE == "trigger"
@@ -793,17 +901,17 @@ api 🧪 test:
793
901
  - when: on_success
794
902
  if: $CI_MERGE_REQUEST_ID
795
903
  needs:
796
- - job: api 👮 lint
904
+ - job: 'api 👮 lint | review '
797
905
  artifacts: false
798
906
  - job: 'api 🔨 app | review '
799
907
  artifacts: false
800
908
  - job: 'api 🔨 docker | review '
801
909
  artifacts: false
802
- - job: api 🧪 test
910
+ - job: 'api 🧪 test | review '
803
911
  artifacts: false
804
912
  - job: 'api 🧾 sbom | review '
805
913
  artifacts: true
806
- - job: api 🛡 audit
914
+ - job: 'api 🛡 audit | review '
807
915
  artifacts: false
808
916
  retry: *a1
809
917
  interruptible: true
@@ -898,7 +1006,7 @@ api 🧪 test:
898
1006
  - if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi
899
1007
  - collapseable_section_end "nodeinstall"
900
1008
  - collapseable_section_start "yarninstall" "Yarn install"
901
- - yarn install --immutable
1009
+ - yarn install --immutable --inline-builds
902
1010
  - collapseable_section_end "yarninstall"
903
1011
  - yarn build
904
1012
  cache:
@@ -953,7 +1061,8 @@ api 🧪 test:
953
1061
  - export DOCKER_CACHE_IMAGE="europe-west6-docker.pkg.dev/google-project-id/catladder-deploy/pan-test-app/caches/api"
954
1062
  - export DOCKER_IMAGE_TAG="$CI_COMMIT_SHA"
955
1063
  - |-
956
- export DOCKER_COPY_AND_INSTALL_APP="COPY --chown=node:node $APP_DIR .
1064
+ export DOCKER_COPY_AND_INSTALL_APP="ENV YARN_ENABLE_INLINE_BUILDS=1
1065
+ COPY --chown=node:node $APP_DIR .
957
1066
  RUN yarn plugin import workspace-tools
958
1067
  RUN yarn workspaces focus --production && yarn rebuild"
959
1068
  - |-
@@ -1203,7 +1312,7 @@ api 🧪 test:
1203
1312
  - if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi
1204
1313
  - collapseable_section_end "nodeinstall"
1205
1314
  - collapseable_section_start "yarninstall" "Yarn install"
1206
- - yarn install --immutable
1315
+ - yarn install --immutable --inline-builds
1207
1316
  - collapseable_section_end "yarninstall"
1208
1317
  - yarn build
1209
1318
  cache:
@@ -1258,7 +1367,8 @@ api 🧪 test:
1258
1367
  - export DOCKER_CACHE_IMAGE="europe-west6-docker.pkg.dev/google-project-id/catladder-deploy/pan-test-app/caches/api"
1259
1368
  - export DOCKER_IMAGE_TAG="$CI_COMMIT_SHA"
1260
1369
  - |-
1261
- export DOCKER_COPY_AND_INSTALL_APP="COPY --chown=node:node $APP_DIR .
1370
+ export DOCKER_COPY_AND_INSTALL_APP="ENV YARN_ENABLE_INLINE_BUILDS=1
1371
+ COPY --chown=node:node $APP_DIR .
1262
1372
  RUN yarn plugin import workspace-tools
1263
1373
  RUN yarn workspaces focus --production && yarn rebuild"
1264
1374
  - |-