@catladder/pipeline 3.27.0 → 3.28.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 (49) hide show
  1. package/dist/build/node/yarn.d.ts +2 -1
  2. package/dist/build/node/yarn.js +5 -2
  3. package/dist/build/types.d.ts +6 -0
  4. package/dist/constants.js +1 -1
  5. package/dist/tsconfig.tsbuildinfo +1 -1
  6. package/examples/__snapshots__/automatic-releases.test.ts.snap +8 -4
  7. package/examples/__snapshots__/cloud-run-health-check-defaults.test.ts.snap +8 -4
  8. package/examples/__snapshots__/cloud-run-health-check-only-startup.test.ts.snap +8 -4
  9. package/examples/__snapshots__/cloud-run-health-check.test.ts.snap +8 -4
  10. package/examples/__snapshots__/cloud-run-http2.test.ts.snap +8 -4
  11. package/examples/__snapshots__/cloud-run-memory-limit.test.ts.snap +8 -4
  12. package/examples/__snapshots__/cloud-run-nextjs.test.ts.snap +8 -4
  13. package/examples/__snapshots__/cloud-run-no-cpu-throttling.test.ts.snap +8 -4
  14. package/examples/__snapshots__/cloud-run-no-service.test.ts.snap +8 -4
  15. package/examples/__snapshots__/cloud-run-non-public.test.ts.snap +8 -4
  16. package/examples/__snapshots__/cloud-run-post-stop-job.test.ts.snap +8 -4
  17. package/examples/__snapshots__/cloud-run-service-custom-vpc-connector.test.ts.snap +8 -4
  18. package/examples/__snapshots__/cloud-run-service-custom-vpc.test.ts.snap +8 -4
  19. package/examples/__snapshots__/cloud-run-service-gen2.test.ts.snap +8 -4
  20. package/examples/__snapshots__/cloud-run-service-increase-timout.test.ts.snap +8 -4
  21. package/examples/__snapshots__/cloud-run-service-with-volumes.test.ts.snap +8 -4
  22. package/examples/__snapshots__/cloud-run-storybook.test.ts.snap +8 -4
  23. package/examples/__snapshots__/cloud-run-with-agents.test.ts.snap +8 -4
  24. package/examples/__snapshots__/cloud-run-with-gpu.test.ts.snap +8 -4
  25. package/examples/__snapshots__/cloud-run-with-ngnix.test.ts.snap +8 -4
  26. package/examples/__snapshots__/cloud-run-with-sql-legacy-jobs.test.ts.snap +8 -4
  27. package/examples/__snapshots__/cloud-run-with-sql-multiple-dbs.test.ts.snap +24 -12
  28. package/examples/__snapshots__/cloud-run-with-sql-reuse-db.test.ts.snap +16 -8
  29. package/examples/__snapshots__/cloud-run-with-sql.test.ts.snap +8 -4
  30. package/examples/__snapshots__/cloud-run-with-worker.test.ts.snap +8 -4
  31. package/examples/__snapshots__/custom-deploy.test.ts.snap +8 -4
  32. package/examples/__snapshots__/custom-verify-job.test.ts.snap +8 -4
  33. package/examples/__snapshots__/git-submodule.test.ts.snap +8 -4
  34. package/examples/__snapshots__/kubernetes-application-customization.test.ts.snap +8 -4
  35. package/examples/__snapshots__/kubernetes-with-cloud-sql.test.ts.snap +8 -4
  36. package/examples/__snapshots__/kubernetes-with-jobs.test.ts.snap +16 -8
  37. package/examples/__snapshots__/kubernetes-with-mongodb.test.ts.snap +8 -4
  38. package/examples/__snapshots__/local-dot-env.test.ts.snap +8 -4
  39. package/examples/__snapshots__/multiline-var.test.ts.snap +24 -12
  40. package/examples/__snapshots__/native-app.test.ts.snap +8 -4
  41. package/examples/__snapshots__/node-build-with-custom-image.test.ts.snap +8 -4
  42. package/examples/__snapshots__/node-build-with-docker-additions.test.ts.snap +8 -4
  43. package/examples/__snapshots__/override-secrets.test.ts.snap +8 -4
  44. package/examples/__snapshots__/referencing-other-vars.test.ts.snap +24 -12
  45. package/examples/__snapshots__/workspace-api-www-turbo-cache.test.ts.snap +16 -8
  46. package/examples/__snapshots__/workspace-api-www.test.ts.snap +16 -8
  47. package/package.json +1 -1
  48. package/src/build/node/yarn.ts +15 -3
  49. package/src/build/types.ts +6 -0
@@ -727,7 +727,8 @@ before_script:
727
727
  export DOCKER_COPY_AND_INSTALL_APP="ENV YARN_ENABLE_INLINE_BUILDS=1
728
728
  COPY --chown=node:node $APP_DIR .
729
729
  RUN yarn plugin import workspace-tools
730
- RUN yarn workspaces focus --production && yarn rebuild"
730
+ RUN yarn workspaces focus --production
731
+ RUN yarn rebuild"
731
732
  - |-
732
733
  export DOCKER_COPY_WORKSPACE_FILES="COPY --chown=node:node api/package.json /app/api/package.json
733
734
  COPY --chown=node:node api/yarn.lock /app/api/yarn.lock
@@ -954,7 +955,8 @@ before_script:
954
955
  export DOCKER_COPY_AND_INSTALL_APP="ENV YARN_ENABLE_INLINE_BUILDS=1
955
956
  COPY --chown=node:node $APP_DIR .
956
957
  RUN yarn plugin import workspace-tools
957
- RUN yarn workspaces focus --production && yarn rebuild"
958
+ RUN yarn workspaces focus --production
959
+ RUN yarn rebuild"
958
960
  - |-
959
961
  export DOCKER_COPY_WORKSPACE_FILES="COPY --chown=node:node api/package.json /app/api/package.json
960
962
  COPY --chown=node:node api/yarn.lock /app/api/yarn.lock
@@ -1189,7 +1191,8 @@ before_script:
1189
1191
  export DOCKER_COPY_AND_INSTALL_APP="ENV YARN_ENABLE_INLINE_BUILDS=1
1190
1192
  COPY --chown=node:node $APP_DIR .
1191
1193
  RUN yarn plugin import workspace-tools
1192
- RUN yarn workspaces focus --production && yarn rebuild"
1194
+ RUN yarn workspaces focus --production
1195
+ RUN yarn rebuild"
1193
1196
  - |-
1194
1197
  export DOCKER_COPY_WORKSPACE_FILES="COPY --chown=node:node api/package.json /app/api/package.json
1195
1198
  COPY --chown=node:node api/yarn.lock /app/api/yarn.lock
@@ -1409,7 +1412,8 @@ before_script:
1409
1412
  export DOCKER_COPY_AND_INSTALL_APP="ENV YARN_ENABLE_INLINE_BUILDS=1
1410
1413
  COPY --chown=node:node $APP_DIR .
1411
1414
  RUN yarn plugin import workspace-tools
1412
- RUN yarn workspaces focus --production && yarn rebuild"
1415
+ RUN yarn workspaces focus --production
1416
+ RUN yarn rebuild"
1413
1417
  - |-
1414
1418
  export DOCKER_COPY_WORKSPACE_FILES="COPY --chown=node:node api/package.json /app/api/package.json
1415
1419
  COPY --chown=node:node api/yarn.lock /app/api/yarn.lock
@@ -1629,7 +1633,8 @@ before_script:
1629
1633
  export DOCKER_COPY_AND_INSTALL_APP="ENV YARN_ENABLE_INLINE_BUILDS=1
1630
1634
  COPY --chown=node:node $APP_DIR .
1631
1635
  RUN yarn plugin import workspace-tools
1632
- RUN yarn workspaces focus --production && yarn rebuild"
1636
+ RUN yarn workspaces focus --production
1637
+ RUN yarn rebuild"
1633
1638
  - |-
1634
1639
  export DOCKER_COPY_WORKSPACE_FILES="COPY --chown=node:node www/package.json /app/www/package.json
1635
1640
  COPY --chown=node:node www/yarn.lock /app/www/yarn.lock
@@ -1859,7 +1864,8 @@ before_script:
1859
1864
  export DOCKER_COPY_AND_INSTALL_APP="ENV YARN_ENABLE_INLINE_BUILDS=1
1860
1865
  COPY --chown=node:node $APP_DIR .
1861
1866
  RUN yarn plugin import workspace-tools
1862
- RUN yarn workspaces focus --production && yarn rebuild"
1867
+ RUN yarn workspaces focus --production
1868
+ RUN yarn rebuild"
1863
1869
  - |-
1864
1870
  export DOCKER_COPY_WORKSPACE_FILES="COPY --chown=node:node www/package.json /app/www/package.json
1865
1871
  COPY --chown=node:node www/yarn.lock /app/www/yarn.lock
@@ -2097,7 +2103,8 @@ before_script:
2097
2103
  export DOCKER_COPY_AND_INSTALL_APP="ENV YARN_ENABLE_INLINE_BUILDS=1
2098
2104
  COPY --chown=node:node $APP_DIR .
2099
2105
  RUN yarn plugin import workspace-tools
2100
- RUN yarn workspaces focus --production && yarn rebuild"
2106
+ RUN yarn workspaces focus --production
2107
+ RUN yarn rebuild"
2101
2108
  - |-
2102
2109
  export DOCKER_COPY_WORKSPACE_FILES="COPY --chown=node:node www/package.json /app/www/package.json
2103
2110
  COPY --chown=node:node www/yarn.lock /app/www/yarn.lock
@@ -2320,7 +2327,8 @@ before_script:
2320
2327
  export DOCKER_COPY_AND_INSTALL_APP="ENV YARN_ENABLE_INLINE_BUILDS=1
2321
2328
  COPY --chown=node:node $APP_DIR .
2322
2329
  RUN yarn plugin import workspace-tools
2323
- RUN yarn workspaces focus --production && yarn rebuild"
2330
+ RUN yarn workspaces focus --production
2331
+ RUN yarn rebuild"
2324
2332
  - |-
2325
2333
  export DOCKER_COPY_WORKSPACE_FILES="COPY --chown=node:node www/package.json /app/www/package.json
2326
2334
  COPY --chown=node:node www/yarn.lock /app/www/yarn.lock
@@ -719,7 +719,8 @@ before_script:
719
719
  export DOCKER_COPY_AND_INSTALL_APP="ENV YARN_ENABLE_INLINE_BUILDS=1
720
720
  COPY --chown=node:node $APP_DIR .
721
721
  RUN yarn plugin import workspace-tools
722
- RUN yarn workspaces focus --production && yarn rebuild"
722
+ RUN yarn workspaces focus --production
723
+ RUN yarn rebuild"
723
724
  - |-
724
725
  export DOCKER_COPY_WORKSPACE_FILES="COPY --chown=node:node api/package.json /app/api/package.json
725
726
  COPY --chown=node:node api/yarn.lock /app/api/yarn.lock
@@ -946,7 +947,8 @@ before_script:
946
947
  export DOCKER_COPY_AND_INSTALL_APP="ENV YARN_ENABLE_INLINE_BUILDS=1
947
948
  COPY --chown=node:node $APP_DIR .
948
949
  RUN yarn plugin import workspace-tools
949
- RUN yarn workspaces focus --production && yarn rebuild"
950
+ RUN yarn workspaces focus --production
951
+ RUN yarn rebuild"
950
952
  - |-
951
953
  export DOCKER_COPY_WORKSPACE_FILES="COPY --chown=node:node api/package.json /app/api/package.json
952
954
  COPY --chown=node:node api/yarn.lock /app/api/yarn.lock
@@ -1181,7 +1183,8 @@ before_script:
1181
1183
  export DOCKER_COPY_AND_INSTALL_APP="ENV YARN_ENABLE_INLINE_BUILDS=1
1182
1184
  COPY --chown=node:node $APP_DIR .
1183
1185
  RUN yarn plugin import workspace-tools
1184
- RUN yarn workspaces focus --production && yarn rebuild"
1186
+ RUN yarn workspaces focus --production
1187
+ RUN yarn rebuild"
1185
1188
  - |-
1186
1189
  export DOCKER_COPY_WORKSPACE_FILES="COPY --chown=node:node api/package.json /app/api/package.json
1187
1190
  COPY --chown=node:node api/yarn.lock /app/api/yarn.lock
@@ -1401,7 +1404,8 @@ before_script:
1401
1404
  export DOCKER_COPY_AND_INSTALL_APP="ENV YARN_ENABLE_INLINE_BUILDS=1
1402
1405
  COPY --chown=node:node $APP_DIR .
1403
1406
  RUN yarn plugin import workspace-tools
1404
- RUN yarn workspaces focus --production && yarn rebuild"
1407
+ RUN yarn workspaces focus --production
1408
+ RUN yarn rebuild"
1405
1409
  - |-
1406
1410
  export DOCKER_COPY_WORKSPACE_FILES="COPY --chown=node:node api/package.json /app/api/package.json
1407
1411
  COPY --chown=node:node api/yarn.lock /app/api/yarn.lock
@@ -1621,7 +1625,8 @@ before_script:
1621
1625
  export DOCKER_COPY_AND_INSTALL_APP="ENV YARN_ENABLE_INLINE_BUILDS=1
1622
1626
  COPY --chown=node:node $APP_DIR .
1623
1627
  RUN yarn plugin import workspace-tools
1624
- RUN yarn workspaces focus --production && yarn rebuild"
1628
+ RUN yarn workspaces focus --production
1629
+ RUN yarn rebuild"
1625
1630
  - |-
1626
1631
  export DOCKER_COPY_WORKSPACE_FILES="COPY --chown=node:node www/package.json /app/www/package.json
1627
1632
  COPY --chown=node:node www/yarn.lock /app/www/yarn.lock
@@ -1851,7 +1856,8 @@ before_script:
1851
1856
  export DOCKER_COPY_AND_INSTALL_APP="ENV YARN_ENABLE_INLINE_BUILDS=1
1852
1857
  COPY --chown=node:node $APP_DIR .
1853
1858
  RUN yarn plugin import workspace-tools
1854
- RUN yarn workspaces focus --production && yarn rebuild"
1859
+ RUN yarn workspaces focus --production
1860
+ RUN yarn rebuild"
1855
1861
  - |-
1856
1862
  export DOCKER_COPY_WORKSPACE_FILES="COPY --chown=node:node www/package.json /app/www/package.json
1857
1863
  COPY --chown=node:node www/yarn.lock /app/www/yarn.lock
@@ -2089,7 +2095,8 @@ before_script:
2089
2095
  export DOCKER_COPY_AND_INSTALL_APP="ENV YARN_ENABLE_INLINE_BUILDS=1
2090
2096
  COPY --chown=node:node $APP_DIR .
2091
2097
  RUN yarn plugin import workspace-tools
2092
- RUN yarn workspaces focus --production && yarn rebuild"
2098
+ RUN yarn workspaces focus --production
2099
+ RUN yarn rebuild"
2093
2100
  - |-
2094
2101
  export DOCKER_COPY_WORKSPACE_FILES="COPY --chown=node:node www/package.json /app/www/package.json
2095
2102
  COPY --chown=node:node www/yarn.lock /app/www/yarn.lock
@@ -2312,7 +2319,8 @@ before_script:
2312
2319
  export DOCKER_COPY_AND_INSTALL_APP="ENV YARN_ENABLE_INLINE_BUILDS=1
2313
2320
  COPY --chown=node:node $APP_DIR .
2314
2321
  RUN yarn plugin import workspace-tools
2315
- RUN yarn workspaces focus --production && yarn rebuild"
2322
+ RUN yarn workspaces focus --production
2323
+ RUN yarn rebuild"
2316
2324
  - |-
2317
2325
  export DOCKER_COPY_WORKSPACE_FILES="COPY --chown=node:node www/package.json /app/www/package.json
2318
2326
  COPY --chown=node:node www/yarn.lock /app/www/yarn.lock
package/package.json CHANGED
@@ -53,7 +53,7 @@
53
53
  }
54
54
  ],
55
55
  "license": "MIT",
56
- "version": "3.27.0",
56
+ "version": "3.28.0",
57
57
  "scripts": {
58
58
  "build:tsc": "yarn tsc",
59
59
  "build": "yarn build:compile && yarn build:inline-variables",
@@ -1,12 +1,14 @@
1
1
  import { BashExpression } from "../../bash/BashExpression";
2
+ import type { ComponentContextWithBuild } from "../../types";
2
3
  import { type Context } from "../../types";
3
4
  import { ensureArray } from "../../utils";
4
5
  import { collapseableSection } from "../../utils/gitlab";
5
6
 
6
7
  const YARN_INSTALL_CLASSIC = `yarn install --frozen-lockfile`;
7
8
 
9
+ const YARN_BERRY_PROD_INSTALL = `yarn workspaces focus --production`;
8
10
  // FIXME: check why and when rebuild is needed
9
- const YARN_BERRY_PROD_REBUILD = `yarn workspaces focus --production && yarn rebuild`;
11
+ const YARN_BERRY_PROD_REBUILD = `yarn rebuild`;
10
12
 
11
13
  const getYarnInstallCommand = (context: Context) => {
12
14
  if (context.packageManagerInfo.isClassic) {
@@ -54,7 +56,9 @@ export const getYarnInstall = (
54
56
 
55
57
  const DOCKER_COPY_FILES = `COPY --chown=node:node $APP_DIR .`;
56
58
 
57
- export const getDockerAppCopyAndBuildScript = (context: Context) => {
59
+ export const getDockerAppCopyAndBuildScript = (
60
+ context: ComponentContextWithBuild,
61
+ ) => {
58
62
  if (context.packageManagerInfo.isClassic) {
59
63
  return new BashExpression(
60
64
  `
@@ -65,6 +69,13 @@ RUN ${YARN_INSTALL_CLASSIC} --production
65
69
  );
66
70
  }
67
71
 
72
+ const yarnRebuildEnabled =
73
+ "docker" in context.build.config &&
74
+ context.build.config.docker &&
75
+ "yarnRebuildEnabled" in context.build.config.docker
76
+ ? (context.build.config.docker.yarnRebuildEnabled ?? true)
77
+ : true;
78
+
68
79
  // yarn >= 4 ships with build in plugins, see https://github.com/yarnpkg/berry/pull/4253
69
80
  // trying to import those fail on this version
70
81
  const doesNotShipWithBuiltInPlugins = ["2", "3"].some((v) =>
@@ -81,7 +92,8 @@ RUN ${YARN_INSTALL_CLASSIC} --production
81
92
  ENV YARN_ENABLE_INLINE_BUILDS=1
82
93
  ${DOCKER_COPY_FILES}
83
94
  ${maybeAddWorkspaceToolsCommand}
84
- RUN ${YARN_BERRY_PROD_REBUILD}
95
+ RUN ${YARN_BERRY_PROD_INSTALL}
96
+ ${yarnRebuildEnabled ? `RUN ${YARN_BERRY_PROD_REBUILD}` : ""}
85
97
 
86
98
  `.trim(),
87
99
  );
@@ -204,6 +204,12 @@ type BuildConfigDockerWithAdditions = {
204
204
 
205
205
  type BuildConfigDockerBuiltInNode = {
206
206
  type: "node";
207
+ /**
208
+ * whether to run yarn rebuild after yarn install. Defaults to true.
209
+ *
210
+ * Future versions of catladder will default to false.
211
+ */
212
+ yarnRebuildEnabled?: boolean;
207
213
  } & BuildConfigDockerWithAdditions;
208
214
 
209
215
  type BuildConfigDockerBuiltInMeteor = {