@catladder/pipeline 1.144.1 → 1.146.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 (335) hide show
  1. package/dist/bash/BashExpression.d.ts +40 -0
  2. package/dist/bash/BashExpression.js +124 -0
  3. package/dist/bash/bashExpressionPerPipelineType.d.ts +6 -0
  4. package/dist/bash/bashExpressionPerPipelineType.js +11 -0
  5. package/dist/bash/bashYaml.d.ts +10 -0
  6. package/dist/bash/bashYaml.js +46 -0
  7. package/dist/bash/getInjectVarsScript.d.ts +2 -0
  8. package/dist/bash/getInjectVarsScript.js +45 -0
  9. package/dist/bash/replaceAsync.d.ts +2 -0
  10. package/dist/{pipeline/commitInfo/getCommitInfo.js → bash/replaceAsync.js} +49 -21
  11. package/dist/build/base/__tests__/createArtifactsConfig.test.js +3 -1
  12. package/dist/build/base/constants.js +3 -1
  13. package/dist/build/base/createAppBuildJob.d.ts +2 -1
  14. package/dist/build/base/createAppBuildJob.js +10 -6
  15. package/dist/build/base/createArtifactsConfig.d.ts +1 -1
  16. package/dist/build/base/createArtifactsConfig.js +3 -1
  17. package/dist/build/base/index.js +3 -1
  18. package/dist/build/base/writeBuildInfo.js +4 -3
  19. package/dist/build/base/writeDotEnv.js +12 -3
  20. package/dist/build/custom/__tests__/testJob.test.js +3 -1
  21. package/dist/build/custom/buildJob.js +4 -12
  22. package/dist/build/custom/index.js +3 -1
  23. package/dist/build/custom/testJob.d.ts +1 -1
  24. package/dist/build/custom/testJob.js +18 -14
  25. package/dist/build/docker.d.ts +5 -31
  26. package/dist/build/docker.js +16 -9
  27. package/dist/build/index.d.ts +1 -1
  28. package/dist/build/index.js +13 -7
  29. package/dist/build/node/buildJob.js +4 -12
  30. package/dist/build/node/cache.js +6 -3
  31. package/dist/build/node/constants.js +3 -1
  32. package/dist/build/node/index.js +3 -1
  33. package/dist/build/node/meteor.js +5 -2
  34. package/dist/build/node/testJob.js +18 -14
  35. package/dist/build/node/yarn.d.ts +3 -2
  36. package/dist/build/node/yarn.js +6 -3
  37. package/dist/build/rails/build.js +3 -1
  38. package/dist/build/rails/index.js +3 -1
  39. package/dist/build/rails/test.js +15 -11
  40. package/dist/build/sbom.js +3 -1
  41. package/dist/build/types.d.ts +24 -18
  42. package/dist/build/types.js +3 -1
  43. package/dist/bundles/catladder-gitlab/index.js +3 -3
  44. package/dist/catladder-gitlab.js +10 -54
  45. package/dist/config/__tests__/configruedEnvs.test.js +3 -1
  46. package/dist/config/configruedEnvs.js +3 -1
  47. package/dist/config/index.js +13 -7
  48. package/dist/config/readConfig.js +6 -5
  49. package/dist/constants.js +5 -3
  50. package/dist/context/__tests__/resolveReferences.test.js +40 -8
  51. package/dist/context/getBuildInfoVariables.d.ts +7 -0
  52. package/dist/context/getBuildInfoVariables.js +29 -0
  53. package/dist/context/getEnvConfig.js +3 -1
  54. package/dist/context/getEnvType.js +3 -1
  55. package/dist/context/getEnvironment.d.ts +3 -3
  56. package/dist/context/getEnvironment.js +10 -14
  57. package/dist/context/getEnvironmentContext.d.ts +7 -3
  58. package/dist/context/getEnvironmentContext.js +21 -11
  59. package/dist/context/getEnvironmentVariables.d.ts +26 -5
  60. package/dist/context/getEnvironmentVariables.js +40 -25
  61. package/dist/context/getLabels.js +4 -2
  62. package/dist/context/getReviewSlug.d.ts +4 -0
  63. package/dist/context/getReviewSlug.js +22 -0
  64. package/dist/context/index.d.ts +12 -3
  65. package/dist/context/index.js +21 -15
  66. package/dist/context/resolveReferences.d.ts +3 -1
  67. package/dist/context/resolveReferences.js +53 -21
  68. package/dist/context/transformJobOnlyVars.d.ts +5 -2
  69. package/dist/context/transformJobOnlyVars.js +4 -2
  70. package/dist/context/utils/envVars.d.ts +1 -1
  71. package/dist/context/utils/envVars.js +5 -2
  72. package/dist/defaults/index.js +3 -1
  73. package/dist/deploy/base/deploy.d.ts +1 -1
  74. package/dist/deploy/base/deploy.js +12 -11
  75. package/dist/deploy/base/index.js +3 -1
  76. package/dist/deploy/base/rollback.d.ts +1 -1
  77. package/dist/deploy/base/rollback.js +13 -9
  78. package/dist/deploy/base/stop.d.ts +1 -1
  79. package/dist/deploy/base/stop.js +16 -11
  80. package/dist/deploy/base/types.d.ts +1 -1
  81. package/dist/deploy/base/types.js +3 -1
  82. package/dist/deploy/base/variables.js +3 -1
  83. package/dist/deploy/cloudRun/artifactsRegistry.d.ts +2 -1
  84. package/dist/deploy/cloudRun/artifactsRegistry.js +6 -4
  85. package/dist/deploy/cloudRun/cleanup.js +3 -1
  86. package/dist/deploy/cloudRun/cloudRunRevisions.js +3 -1
  87. package/dist/deploy/cloudRun/createJobs/cloudRunJobs.js +8 -5
  88. package/dist/deploy/cloudRun/createJobs/cloudRunServices.d.ts +2 -2
  89. package/dist/deploy/cloudRun/createJobs/cloudRunServices.js +6 -3
  90. package/dist/deploy/cloudRun/createJobs/common.d.ts +3 -3
  91. package/dist/deploy/cloudRun/createJobs/common.js +3 -1
  92. package/dist/deploy/cloudRun/createJobs/constants.d.ts +1 -0
  93. package/dist/deploy/cloudRun/createJobs/constants.js +7 -0
  94. package/dist/deploy/cloudRun/createJobs/getCloudRunDeployScripts.js +10 -4
  95. package/dist/deploy/cloudRun/createJobs/getCloudRunStopScripts.js +3 -1
  96. package/dist/deploy/cloudRun/createJobs/index.js +25 -8
  97. package/dist/deploy/cloudRun/createJobs/volumes.js +3 -1
  98. package/dist/deploy/cloudRun/index.js +5 -3
  99. package/dist/deploy/cloudRun/utils/createArgsString.d.ts +2 -1
  100. package/dist/deploy/cloudRun/utils/createArgsString.js +3 -1
  101. package/dist/deploy/cloudRun/utils/database.js +13 -13
  102. package/dist/deploy/cloudRun/utils/gcloudServiceAccountLoginCommands.js +3 -1
  103. package/dist/deploy/cloudRun/utils/getServiceName.d.ts +1 -1
  104. package/dist/deploy/cloudRun/utils/getServiceName.js +3 -1
  105. package/dist/deploy/cloudRun/utils/jobName.d.ts +2 -1
  106. package/dist/deploy/cloudRun/utils/jobName.js +4 -2
  107. package/dist/deploy/cloudRun/utils/removeFirstLinesFromCommandOutput.js +3 -1
  108. package/dist/deploy/cloudSql/utils.d.ts +2 -1
  109. package/dist/deploy/cloudSql/utils.js +7 -2
  110. package/dist/deploy/custom/deployJob.js +3 -1
  111. package/dist/deploy/custom/index.js +3 -1
  112. package/dist/deploy/dockerTag/deployJob.js +3 -1
  113. package/dist/deploy/dockerTag/index.js +3 -1
  114. package/dist/deploy/index.d.ts +4 -3
  115. package/dist/deploy/index.js +13 -7
  116. package/dist/deploy/kubernetes/additionalSecretKeys.js +3 -1
  117. package/dist/deploy/kubernetes/cloudSql/index.d.ts +3 -2
  118. package/dist/deploy/kubernetes/cloudSql/index.js +6 -4
  119. package/dist/deploy/kubernetes/deployJob.js +22 -15
  120. package/dist/deploy/kubernetes/index.js +51 -14
  121. package/dist/deploy/kubernetes/kubeEnv.d.ts +3 -2
  122. package/dist/deploy/kubernetes/kubeEnv.js +7 -4
  123. package/dist/deploy/kubernetes/kubeValues.d.ts +2 -2
  124. package/dist/deploy/kubernetes/kubeValues.js +4 -5
  125. package/dist/deploy/kubernetes/mongodb.js +3 -1
  126. package/dist/deploy/kubernetes/processSecretsAsFiles.d.ts +2 -1
  127. package/dist/deploy/kubernetes/processSecretsAsFiles.js +3 -1
  128. package/dist/deploy/sbom.js +3 -1
  129. package/dist/deploy/types/base.d.ts +8 -2
  130. package/dist/deploy/types/base.js +3 -1
  131. package/dist/deploy/types/custom.d.ts +1 -1
  132. package/dist/deploy/types/custom.js +3 -1
  133. package/dist/deploy/types/dockerTag.d.ts +1 -1
  134. package/dist/deploy/types/dockerTag.js +3 -1
  135. package/dist/deploy/types/googleCloudRun.d.ts +19 -18
  136. package/dist/deploy/types/googleCloudRun.js +3 -1
  137. package/dist/deploy/types/index.d.ts +6 -6
  138. package/dist/deploy/types/index.js +13 -7
  139. package/dist/deploy/types/kubernetes.d.ts +22 -22
  140. package/dist/deploy/types/kubernetes.js +3 -1
  141. package/dist/deploy/utils.js +3 -1
  142. package/dist/index.d.ts +3 -2
  143. package/dist/index.js +16 -9
  144. package/dist/packageInfos.d.ts +2 -0
  145. package/dist/packageInfos.js +14 -0
  146. package/dist/pipeline/createAllJobs.d.ts +13 -5
  147. package/dist/pipeline/createAllJobs.js +21 -10
  148. package/dist/pipeline/createChildPipeline.d.ts +1 -1
  149. package/dist/pipeline/createChildPipeline.js +24 -7
  150. package/dist/pipeline/createJobsForComponent.d.ts +3 -3
  151. package/dist/pipeline/createJobsForComponent.js +19 -18
  152. package/dist/pipeline/createMainPipeline.d.ts +3 -0
  153. package/dist/pipeline/createMainPipeline.js +248 -0
  154. package/dist/pipeline/generatePipelineFiles.d.ts +2 -0
  155. package/dist/pipeline/generatePipelineFiles.js +178 -0
  156. package/dist/pipeline/getPipelineStages.js +3 -1
  157. package/dist/pipeline/gitlab/createGitlabJobs.d.ts +15 -5
  158. package/dist/pipeline/gitlab/createGitlabJobs.js +98 -25
  159. package/dist/pipeline/gitlab/createGitlabPipeline.d.ts +7 -2
  160. package/dist/pipeline/gitlab/createGitlabPipeline.js +34 -17
  161. package/dist/pipeline/gitlab/getPipelineTriggerForGitlabChildPipeline.d.ts +1 -0
  162. package/dist/pipeline/gitlab/getPipelineTriggerForGitlabChildPipeline.js +29 -0
  163. package/dist/pipeline/gitlab/gitlabReleaseJobs.d.ts +33 -0
  164. package/dist/pipeline/gitlab/gitlabReleaseJobs.js +24 -0
  165. package/dist/pipeline/index.d.ts +3 -1
  166. package/dist/pipeline/index.js +16 -8
  167. package/dist/pipeline/packageManager.js +4 -2
  168. package/dist/pipeline/yarn/yarnUtils.js +6 -4
  169. package/dist/rules/index.d.ts +4 -1
  170. package/dist/rules/index.js +25 -18
  171. package/dist/runner/index.d.ts +1 -1
  172. package/dist/runner/index.js +3 -1
  173. package/dist/tsconfig.tsbuildinfo +1 -1
  174. package/dist/types/config.d.ts +18 -15
  175. package/dist/types/config.js +5 -2
  176. package/dist/types/context.d.ts +37 -32
  177. package/dist/types/context.js +3 -1
  178. package/dist/types/environmentContext.d.ts +11 -7
  179. package/dist/types/environmentContext.js +3 -1
  180. package/dist/types/gitlab-ci-yml.d.ts +30 -30
  181. package/dist/types/gitlab-ci-yml.js +3 -2
  182. package/dist/types/gitlab-types.d.ts +4 -6
  183. package/dist/types/gitlab-types.js +3 -1
  184. package/dist/types/index.js +13 -7
  185. package/dist/types/jobs.d.ts +23 -6
  186. package/dist/types/jobs.js +3 -1
  187. package/dist/types/pipeline.d.ts +4 -3
  188. package/dist/types/pipeline.js +3 -1
  189. package/dist/types/utils.d.ts +1 -1
  190. package/dist/types/utils.js +3 -1
  191. package/dist/utils/gitlab.js +3 -1
  192. package/dist/utils/index.d.ts +1 -1
  193. package/dist/utils/index.js +3 -1
  194. package/dist/utils/writeFiles.d.ts +7 -0
  195. package/dist/{pipeline/commitInfo/getBuildId.js → utils/writeFiles.js} +39 -22
  196. package/examples/__snapshots__/cloud-run-memory-limit.ts.snap +480 -384
  197. package/examples/__snapshots__/cloud-run-meteor-with-worker.ts.snap +462 -366
  198. package/examples/__snapshots__/cloud-run-no-cpu-throttling.ts.snap +480 -384
  199. package/examples/__snapshots__/cloud-run-no-service.ts.snap +501 -393
  200. package/examples/__snapshots__/cloud-run-non-public.ts.snap +480 -384
  201. package/examples/__snapshots__/cloud-run-post-stop-job.ts.snap +489 -392
  202. package/examples/__snapshots__/cloud-run-service-gen2.ts.snap +480 -384
  203. package/examples/__snapshots__/cloud-run-service-with-volumes.ts.snap +501 -401
  204. package/examples/__snapshots__/cloud-run-with-sql-reuse-db.ts.snap +1155 -915
  205. package/examples/__snapshots__/cloud-run-with-sql.ts.snap +1116 -888
  206. package/examples/__snapshots__/cloud-run-with-worker.ts.snap +482 -386
  207. package/examples/__snapshots__/custom-build-job-with-tests.ts.snap +452 -356
  208. package/examples/__snapshots__/custom-build-job.ts.snap +434 -350
  209. package/examples/__snapshots__/custom-deploy.ts.snap +319 -223
  210. package/examples/__snapshots__/custom-envs.ts.snap +123 -81
  211. package/examples/__snapshots__/custom-sbom-java.ts.snap +434 -350
  212. package/examples/__snapshots__/kubernetes-application-customization.ts.snap +846 -969
  213. package/examples/__snapshots__/kubernetes-with-cloud-sql-legacy.ts.snap +886 -957
  214. package/examples/__snapshots__/kubernetes-with-cloud-sql.ts.snap +894 -969
  215. package/examples/__snapshots__/kubernetes-with-jobs.ts.snap +1626 -1728
  216. package/examples/__snapshots__/kubernetes-with-mongodb.ts.snap +974 -1137
  217. package/examples/__snapshots__/local-dot-env.ts.snap +480 -384
  218. package/examples/__snapshots__/meteor-kubernetes.ts.snap +906 -1069
  219. package/examples/__snapshots__/multiline-var.ts.snap +4500 -0
  220. package/examples/__snapshots__/native-app.ts.snap +706 -578
  221. package/examples/__snapshots__/node-build-with-custom-image.ts.snap +480 -384
  222. package/examples/__snapshots__/node-build-with-docker-additions.ts.snap +488 -384
  223. package/examples/__snapshots__/rails-k8s-with-worker.ts.snap +1656 -1942
  224. package/examples/__snapshots__/wait-for-other-deploy.ts.snap +287 -231
  225. package/examples/__utils__/helpers.ts +2 -2
  226. package/examples/custom-deploy.ts +7 -7
  227. package/examples/multiline-var.ts +64 -0
  228. package/package.json +5 -8
  229. package/scripts/generate-gitlab-ci-types.ts +2 -2
  230. package/src/bash/BashExpression.ts +81 -0
  231. package/src/bash/bashExpressionPerPipelineType.ts +16 -0
  232. package/src/bash/bashYaml.ts +46 -0
  233. package/src/bash/getInjectVarsScript.ts +12 -0
  234. package/src/bash/replaceAsync.ts +50 -0
  235. package/src/build/base/__tests__/createArtifactsConfig.test.ts +3 -3
  236. package/src/build/base/createAppBuildJob.ts +8 -4
  237. package/src/build/base/createArtifactsConfig.ts +2 -2
  238. package/src/build/base/index.ts +1 -1
  239. package/src/build/base/writeBuildInfo.ts +1 -1
  240. package/src/build/base/writeDotEnv.ts +6 -1
  241. package/src/build/custom/__tests__/testJob.test.ts +1 -1
  242. package/src/build/custom/buildJob.ts +4 -6
  243. package/src/build/custom/testJob.ts +6 -5
  244. package/src/build/docker.ts +21 -13
  245. package/src/build/index.ts +1 -1
  246. package/src/build/node/buildJob.ts +3 -5
  247. package/src/build/node/cache.ts +4 -4
  248. package/src/build/node/meteor.ts +1 -1
  249. package/src/build/node/testJob.ts +6 -5
  250. package/src/build/node/yarn.ts +14 -9
  251. package/src/build/rails/test.ts +2 -1
  252. package/src/build/types.ts +8 -1
  253. package/src/catladder-gitlab.ts +8 -55
  254. package/src/config/configruedEnvs.ts +6 -6
  255. package/src/config/readConfig.ts +4 -5
  256. package/src/constants.ts +5 -2
  257. package/src/context/__tests__/resolveReferences.test.ts +11 -6
  258. package/src/context/getBuildInfoVariables.ts +40 -0
  259. package/src/context/getEnvConfig.ts +1 -1
  260. package/src/context/getEnvType.ts +1 -1
  261. package/src/context/getEnvironment.ts +7 -30
  262. package/src/context/getEnvironmentContext.ts +25 -29
  263. package/src/context/getEnvironmentVariables.ts +72 -47
  264. package/src/context/getReviewSlug.ts +27 -0
  265. package/src/context/index.ts +26 -25
  266. package/src/context/resolveReferences.ts +40 -17
  267. package/src/context/transformJobOnlyVars.ts +6 -3
  268. package/src/context/utils/envVars.ts +5 -4
  269. package/src/deploy/base/deploy.ts +25 -23
  270. package/src/deploy/base/index.ts +1 -1
  271. package/src/deploy/base/rollback.ts +9 -11
  272. package/src/deploy/base/stop.ts +9 -10
  273. package/src/deploy/cloudRun/artifactsRegistry.ts +13 -8
  274. package/src/deploy/cloudRun/cleanup.ts +3 -3
  275. package/src/deploy/cloudRun/cloudRunRevisions.ts +3 -3
  276. package/src/deploy/cloudRun/createJobs/cloudRunJobs.ts +22 -17
  277. package/src/deploy/cloudRun/createJobs/cloudRunServices.ts +7 -6
  278. package/src/deploy/cloudRun/createJobs/common.ts +1 -1
  279. package/src/deploy/cloudRun/createJobs/constants.ts +1 -0
  280. package/src/deploy/cloudRun/createJobs/getCloudRunDeployScripts.ts +25 -7
  281. package/src/deploy/cloudRun/createJobs/getCloudRunStopScripts.ts +1 -1
  282. package/src/deploy/cloudRun/createJobs/index.ts +18 -9
  283. package/src/deploy/cloudRun/createJobs/volumes.ts +2 -2
  284. package/src/deploy/cloudRun/index.ts +22 -10
  285. package/src/deploy/cloudRun/utils/createArgsString.ts +3 -2
  286. package/src/deploy/cloudRun/utils/database.ts +7 -7
  287. package/src/deploy/cloudRun/utils/gcloudServiceAccountLoginCommands.ts +1 -1
  288. package/src/deploy/cloudRun/utils/jobName.ts +7 -2
  289. package/src/deploy/cloudRun/utils/removeFirstLinesFromCommandOutput.ts +1 -1
  290. package/src/deploy/cloudSql/utils.ts +13 -10
  291. package/src/deploy/index.ts +5 -4
  292. package/src/deploy/kubernetes/cloudSql/index.ts +6 -5
  293. package/src/deploy/kubernetes/deployJob.ts +28 -14
  294. package/src/deploy/kubernetes/index.ts +15 -8
  295. package/src/deploy/kubernetes/kubeEnv.ts +9 -7
  296. package/src/deploy/kubernetes/kubeValues.ts +5 -6
  297. package/src/deploy/kubernetes/mongodb.ts +1 -1
  298. package/src/deploy/kubernetes/processSecretsAsFiles.ts +5 -4
  299. package/src/deploy/types/base.ts +6 -0
  300. package/src/deploy/types/googleCloudRun.ts +2 -0
  301. package/src/deploy/utils.ts +2 -2
  302. package/src/index.ts +2 -1
  303. package/src/packageInfos.ts +10 -0
  304. package/src/pipeline/createAllJobs.ts +28 -14
  305. package/src/pipeline/createChildPipeline.ts +20 -9
  306. package/src/pipeline/createJobsForComponent.ts +15 -23
  307. package/src/pipeline/createMainPipeline.ts +91 -0
  308. package/src/pipeline/generatePipelineFiles.ts +29 -0
  309. package/src/pipeline/getPipelineStages.ts +1 -1
  310. package/src/pipeline/gitlab/createGitlabJobs.ts +182 -59
  311. package/src/pipeline/gitlab/createGitlabPipeline.ts +16 -14
  312. package/src/pipeline/gitlab/getPipelineTriggerForGitlabChildPipeline.ts +46 -0
  313. package/src/pipeline/gitlab/gitlabReleaseJobs.ts +20 -0
  314. package/src/pipeline/index.ts +2 -0
  315. package/src/pipeline/packageManager.ts +2 -2
  316. package/src/pipeline/yarn/yarnUtils.ts +7 -7
  317. package/src/rules/index.ts +15 -9
  318. package/src/types/config.ts +12 -3
  319. package/src/types/context.ts +39 -26
  320. package/src/types/environmentContext.ts +13 -7
  321. package/src/types/gitlab-ci-yml.ts +0 -1
  322. package/src/types/gitlab-types.ts +5 -4
  323. package/src/types/jobs.ts +29 -4
  324. package/src/types/pipeline.ts +4 -0
  325. package/src/types/utils.ts +4 -4
  326. package/src/utils/gitlab.ts +1 -1
  327. package/src/utils/index.ts +2 -2
  328. package/src/utils/writeFiles.ts +40 -0
  329. package/dist/deploy/cloudRun/createJobs/variables.d.ts +0 -5
  330. package/dist/deploy/cloudRun/createJobs/variables.js +0 -19
  331. package/dist/pipeline/commitInfo/getBuildId.d.ts +0 -6
  332. package/dist/pipeline/commitInfo/getCommitInfo.d.ts +0 -2
  333. package/src/deploy/cloudRun/createJobs/variables.ts +0 -21
  334. package/src/pipeline/commitInfo/getBuildId.ts +0 -17
  335. package/src/pipeline/commitInfo/getCommitInfo.ts +0 -15
@@ -41,17 +41,21 @@ var __spreadArray = this && this.__spreadArray || function (to, from, pack) {
41
41
  }
42
42
  return to.concat(ar || Array.prototype.slice.call(from));
43
43
  };
44
- exports.__esModule = true;
44
+ Object.defineProperty(exports, "__esModule", {
45
+ value: true
46
+ });
45
47
  exports.createKubernetesDeployJobs = void 0;
46
- var js_yaml_1 = require("js-yaml");
48
+ var getEnvironmentVariables_1 = require("../../context/getEnvironmentVariables");
47
49
  var runner_1 = require("../../runner");
48
50
  var base_1 = require("../base");
49
51
  var sbom_1 = require("../sbom");
50
52
  var types_1 = require("../types");
51
53
  var kubeValues_1 = require("./kubeValues");
52
- var getEnvironmentVariables_1 = require("../../context/getEnvironmentVariables");
54
+ var bashYaml_1 = require("../../bash/bashYaml");
55
+ var gitlab_1 = require("../../utils/gitlab");
56
+ var ALL_VALUES_FILE = "__all_values.yml";
53
57
  var createKubernetesDeployJobs = function (context) {
54
- var _a, _b, _c;
58
+ var _a, _b;
55
59
  var deployConfig = context.componentConfig.deploy;
56
60
  if (deployConfig === false) {
57
61
  return [];
@@ -60,29 +64,32 @@ var createKubernetesDeployJobs = function (context) {
60
64
  // should not happen
61
65
  throw new Error("deploy config is not kubernetes");
62
66
  }
63
- var kubeValues = (0, kubeValues_1.createKubeValues)(context);
64
- var shared = {
65
- image: (0, runner_1.getRunnerImage)("kubernetes"),
67
+ var shared = __assign(__assign({
68
+ image: (0, runner_1.getRunnerImage)("kubernetes")
69
+ }, deployConfig.debug ? {
70
+ artifacts: {
71
+ paths: [ALL_VALUES_FILE // debug
72
+ ],
73
+
74
+ when: "always"
75
+ }
76
+ } : {}), {
66
77
  variables: __assign(__assign({}, context.environment.envVars), {
67
78
  RELEASE_NAME: context.environment.fullName,
68
79
  HELM_EXPERIMENTAL_OCI: "1",
69
80
  KUBE_DOCKER_IMAGE_PULL_SECRET: "gitlab-registry-".concat(context.componentName),
70
- KUBE_VALUES: (0, js_yaml_1.dump)(kubeValues, {
71
- lineWidth: -1,
72
- quotingType: "'",
73
- forceQuotes: true
74
- }),
75
81
  HELM_GITLAB_CHART_NAME: (_a = deployConfig.chartName) !== null && _a !== void 0 ? _a : "/helm-charts/the-panter-chart",
76
82
  HELM_ARGS: __spreadArray(__spreadArray([], __read(deployConfig.debug ? ["--debug"] : []), false), __read((_b = deployConfig.additionalHelmArgs) !== null && _b !== void 0 ? _b : []), false).join(" "),
77
83
  COMPONENT_NAME: context.componentName,
78
- BUILD_ID: (_c = context.commitInfo) === null || _c === void 0 ? void 0 : _c.buildId
84
+ /** @deprecated */
85
+ BUILD_ID: context.environment.envVars.BUILD_INFO_BUILD_ID
79
86
  })
80
- };
87
+ });
81
88
  var clusterName = "kube-".concat(context.environment.fullName);
82
89
  var connectContext = ["kubectl config set-cluster \"".concat(clusterName, "\" --server=\"$").concat((0, getEnvironmentVariables_1.getSecretVarNameForContext)(context, "KUBE_URL"), "\" --certificate-authority <(echo $").concat((0, getEnvironmentVariables_1.getSecretVarNameForContext)(context, "KUBE_CA_PEM"), " | base64 -d) --embed-certs=true"), "kubectl config set-credentials \"".concat(clusterName, "\" --token=\"$").concat((0, getEnvironmentVariables_1.getSecretVarNameForContext)(context, "KUBE_TOKEN"), "\""), "kubectl config set-context \"".concat(clusterName, "\" --cluster=\"").concat(clusterName, "\" --user=\"").concat(clusterName, "\" --namespace=\"").concat(context.environment.envVars.KUBE_NAMESPACE, "\""), "kubectl config use-context \"".concat(clusterName, "\"")];
83
90
  return (0, base_1.createDeployementJobs)(context, {
84
91
  deploy: __assign(__assign({}, shared), {
85
- script: __spreadArray(__spreadArray(__spreadArray(__spreadArray([], __read(connectContext), false), ["kubernetesCreateSecret", "kubernetesDeploy"], false), __read((0, sbom_1.getDependencyTrackUploadScript)(context)), false), ["echo deployment successful 😻"], false)
92
+ script: __spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray([], __read(connectContext), false), __read((0, gitlab_1.collapseableSection)("writeallvalues", "Write " + ALL_VALUES_FILE + " for helm deployment")((0, bashYaml_1.writeBashYamlToFileScript)((0, kubeValues_1.createKubeValues)(context), ALL_VALUES_FILE))), false), ["kubernetesCreateSecret", "kubernetesDeploy"], false), __read((0, sbom_1.getDependencyTrackUploadScript)(context)), false), ["echo deployment successful 😻"], false)
86
93
  }),
87
94
  stop: __assign(__assign({}, shared), {
88
95
  script: __spreadArray(__spreadArray(__spreadArray([], __read(connectContext), false), ["kubernetesDelete"], false), __read((0, sbom_1.getDependencyTrackDeleteScript)(context)), false)
@@ -2,12 +2,16 @@
2
2
 
3
3
  var __createBinding = this && this.__createBinding || (Object.create ? function (o, m, k, k2) {
4
4
  if (k2 === undefined) k2 = k;
5
- Object.defineProperty(o, k2, {
6
- enumerable: true,
7
- get: function () {
8
- return m[k];
9
- }
10
- });
5
+ var desc = Object.getOwnPropertyDescriptor(m, k);
6
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
7
+ desc = {
8
+ enumerable: true,
9
+ get: function () {
10
+ return m[k];
11
+ }
12
+ };
13
+ }
14
+ Object.defineProperty(o, k2, desc);
11
15
  } : function (o, m, k, k2) {
12
16
  if (k2 === undefined) k2 = k;
13
17
  o[k2] = m[k];
@@ -15,15 +19,49 @@ var __createBinding = this && this.__createBinding || (Object.create ? function
15
19
  var __exportStar = this && this.__exportStar || function (m, exports) {
16
20
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
17
21
  };
22
+ var __read = this && this.__read || function (o, n) {
23
+ var m = typeof Symbol === "function" && o[Symbol.iterator];
24
+ if (!m) return o;
25
+ var i = m.call(o),
26
+ r,
27
+ ar = [],
28
+ e;
29
+ try {
30
+ while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
31
+ } catch (error) {
32
+ e = {
33
+ error: error
34
+ };
35
+ } finally {
36
+ try {
37
+ if (r && !r.done && (m = i["return"])) m.call(i);
38
+ } finally {
39
+ if (e) throw e.error;
40
+ }
41
+ }
42
+ return ar;
43
+ };
44
+ var __spreadArray = this && this.__spreadArray || function (to, from, pack) {
45
+ if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
46
+ if (ar || !(i in from)) {
47
+ if (!ar) ar = Array.prototype.slice.call(from, 0, i);
48
+ ar[i] = from[i];
49
+ }
50
+ }
51
+ return to.concat(ar || Array.prototype.slice.call(from));
52
+ };
18
53
  var __importDefault = this && this.__importDefault || function (mod) {
19
54
  return mod && mod.__esModule ? mod : {
20
55
  "default": mod
21
56
  };
22
57
  };
23
- exports.__esModule = true;
58
+ Object.defineProperty(exports, "__esModule", {
59
+ value: true
60
+ });
24
61
  exports.KUBERNETES_DEPLOY_TYPE = void 0;
25
62
  var slugify_1 = __importDefault(require("slugify"));
26
63
  var __1 = require("..");
64
+ var BashExpression_1 = require("../../bash/BashExpression");
27
65
  var additionalSecretKeys_1 = require("./additionalSecretKeys");
28
66
  var deployJob_1 = require("./deployJob");
29
67
  __exportStar(require("./cloudSql"), exports);
@@ -39,17 +77,16 @@ exports.KUBERNETES_DEPLOY_TYPE = {
39
77
  fullConfig = _a.fullConfig,
40
78
  deployConfigRaw = _a.deployConfigRaw,
41
79
  env = _a.env,
42
- envType = _a.envType,
43
- commitInfo = _a.commitInfo;
44
- var KUBE_APP_NAME_PREFIX = envType === "review" && commitInfo ? "".concat(commitInfo.reviewSlug, "-") : "";
45
- var KUBE_APP_NAME = "".concat(KUBE_APP_NAME_PREFIX).concat(componentName);
80
+ reviewSlug = _a.reviewSlug,
81
+ envType = _a.envType;
82
+ var KUBE_APP_NAME_PREFIX = envType === "review" && reviewSlug ? reviewSlug.concat("-") : "";
83
+ var KUBE_APP_NAME = KUBE_APP_NAME_PREFIX.concat(componentName);
46
84
  var KUBE_NAMESPACE = (0, __1.getKubernetesNamespace)(fullConfig, env);
47
- var componentSlug = (0, slugify_1["default"])(componentName);
48
- var envInUrl = envType === "review" && commitInfo ? "".concat(commitInfo.reviewSlug, ".").concat(env) : env;
85
+ var componentSlug = (0, slugify_1.default)(componentName);
49
86
  var domainCanonical = deployConfigRaw && ((_b = deployConfigRaw.cluster) === null || _b === void 0 ? void 0 : _b.domainCanonical) ||
50
87
  // for convenience, we allow clusters to define a canonical domain, because a cluster has a fixed ip and you will usually have a domain pointing to that cluster
51
88
  fullConfig.domainCanonical || "panter.cloud";
52
- var HOST_INTERNAL = "".concat(componentSlug, ".").concat(envInUrl, ".").concat(fullConfig.appName, ".").concat(fullConfig.customerName, ".").concat(domainCanonical); // default for kubernetes and rest
89
+ var HOST_INTERNAL = (0, BashExpression_1.joinBashExpressions)(__spreadArray(__spreadArray([componentSlug], __read(envType === "review" && reviewSlug ? [reviewSlug] : []), false), [env, fullConfig.appName, fullConfig.customerName, domainCanonical], false), "."); // default for kubernetes and rest
53
90
  return {
54
91
  KUBE_NAMESPACE: KUBE_NAMESPACE,
55
92
  KUBE_APP_NAME: KUBE_APP_NAME,
@@ -1,9 +1,10 @@
1
+ import type { StringOrBashExpression } from "../../bash/BashExpression";
1
2
  import type { Context } from "../../types";
2
3
  /**
3
4
  * separate by secrets and public.
4
5
  * we evalulate the actual values later, but want to store the secrets in kubernetes secrets
5
6
  */
6
7
  export declare const createKubeEnv: (context: Context) => {
7
- secret: Record<string, string>;
8
- public: Record<string, string>;
8
+ secret: Record<string, StringOrBashExpression>;
9
+ public: Record<string, StringOrBashExpression>;
9
10
  };
@@ -32,11 +32,14 @@ var __read = this && this.__read || function (o, n) {
32
32
  }
33
33
  return ar;
34
34
  };
35
- exports.__esModule = true;
35
+ Object.defineProperty(exports, "__esModule", {
36
+ value: true
37
+ });
36
38
  exports.createKubeEnv = void 0;
37
39
  var types_1 = require("../types");
38
40
  var shouldGoIntoSecrets = function (key, value) {
39
41
  var _a;
42
+ if (!value) return false;
40
43
  if ((_a = String(value)) === null || _a === void 0 ? void 0 : _a.includes("$CL_")) {
41
44
  return true;
42
45
  }
@@ -57,11 +60,11 @@ var createKubeEnv = function (context) {
57
60
  var _d = __read(_a, 2),
58
61
  key = _d[0],
59
62
  value = _d[1];
60
- if (shouldGoIntoSecrets(key, value)) {
61
- acc.secret = __assign(__assign({}, acc.secret), (_b = {}, _b[key] = value, _b));
63
+ if (shouldGoIntoSecrets(key, value === null || value === void 0 ? void 0 : value.toString())) {
64
+ acc.secret = __assign(__assign({}, acc.secret), (_b = {}, _b[key] = value !== null && value !== void 0 ? value : "", _b));
62
65
  return acc;
63
66
  }
64
- acc.public = __assign(__assign({}, acc.public), (_c = {}, _c[key] = value, _c));
67
+ acc.public = __assign(__assign({}, acc.public), (_c = {}, _c[key] = value !== null && value !== void 0 ? value : "", _c));
65
68
  return acc;
66
69
  }, {
67
70
  secret: {},
@@ -1,8 +1,8 @@
1
1
  import type { Context } from "../../types/context";
2
2
  export declare const createKubeValues: (context: Context) => never[] | ({
3
3
  env: {
4
- secret: Record<string, string>;
5
- public: Record<string, string>;
4
+ secret: Record<string, import("../../bash/BashExpression").StringOrBashExpression>;
5
+ public: Record<string, import("../../bash/BashExpression").StringOrBashExpression>;
6
6
  };
7
7
  application: false | import("../types/base").AllowUnknownProps<{
8
8
  command?: string | undefined;
@@ -40,7 +40,9 @@ var __read = this && this.__read || function (o, n) {
40
40
  }
41
41
  return ar;
42
42
  };
43
- exports.__esModule = true;
43
+ Object.defineProperty(exports, "__esModule", {
44
+ value: true
45
+ });
44
46
  exports.createKubeValues = void 0;
45
47
  var lodash_1 = require("lodash");
46
48
  var utils_1 = require("../../utils");
@@ -79,10 +81,8 @@ var createAppConfig = function (context, application) {
79
81
  }
80
82
  },
81
83
  // default
82
- rest // merge rest in
83
- );
84
+ rest);
84
85
  };
85
-
86
86
  var removeFalsy = function (record) {
87
87
  if (!record) return undefined;
88
88
  return Object.fromEntries(Object.entries(record).filter(function (_a) {
@@ -104,7 +104,6 @@ var createKubeValues = function (context) {
104
104
  var values = deployConfig.values;
105
105
  // we remove the application config because it can be just the value `false` which is a convenience feature, but not supported in the helm chart
106
106
  // we only merge the rest of the values in
107
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
108
107
  var _c = values !== null && values !== void 0 ? values : {},
109
108
  application = _c.application,
110
109
  jobs = _c.jobs,
@@ -10,7 +10,9 @@ var __assign = this && this.__assign || function () {
10
10
  };
11
11
  return __assign.apply(this, arguments);
12
12
  };
13
- exports.__esModule = true;
13
+ Object.defineProperty(exports, "__esModule", {
14
+ value: true
15
+ });
14
16
  exports.createMongodbBaseConfig = void 0;
15
17
  var lodash_1 = require("lodash");
16
18
  var getEnvironmentVariables_1 = require("../../context/getEnvironmentVariables");
@@ -1,6 +1,7 @@
1
+ import type { StringOrBashExpression } from "../../bash/BashExpression";
1
2
  export declare const processSecretsAsFiles: <T extends {
2
3
  env: {
3
- secret: Record<string, string>;
4
+ secret: Record<string, StringOrBashExpression>;
4
5
  };
5
6
  } & {
6
7
  cloudsql?: import("../types").DeployConfigKubernetesValuesCloudSQL | undefined;
@@ -10,7 +10,9 @@ var __assign = this && this.__assign || function () {
10
10
  };
11
11
  return __assign.apply(this, arguments);
12
12
  };
13
- exports.__esModule = true;
13
+ Object.defineProperty(exports, "__esModule", {
14
+ value: true
15
+ });
14
16
  exports.processSecretsAsFiles = void 0;
15
17
  var lodash_1 = require("lodash");
16
18
  var processSecretsAsFiles = function (values) {
@@ -1,6 +1,8 @@
1
1
  "use strict";
2
2
 
3
- exports.__esModule = true;
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
4
6
  exports.getDependencyTrackDeleteScript = exports.getDependencyTrackUploadScript = exports.sbomDeactivated = void 0;
5
7
  var sbom_1 = require("../build/sbom");
6
8
  var sbomDeactivated = function (context) {
@@ -1,5 +1,5 @@
1
1
  import type { EnvVars } from "../../types/config";
2
- export declare type DeployConfigBase = {
2
+ export type DeployConfigBase = {
3
3
  /**
4
4
  * whether to deploy automatically or manual. If not defined, these rules apply:
5
5
  * - prod: manual
@@ -26,5 +26,11 @@ export declare type DeployConfigBase = {
26
26
  * @deprecated use deploy.jobVars for deploy job specific variables
27
27
  */
28
28
  extraVars?: Record<string, string>;
29
+ /**
30
+ * additional vars only for the runner.
31
+ * Also if you use services: that require env vars, you need to set them here.
32
+ *
33
+ */
34
+ runnerVariables?: Record<string, string>;
29
35
  };
30
- export declare type AllowUnknownProps<T extends Record<string, unknown>> = T & Record<string, unknown>;
36
+ export type AllowUnknownProps<T extends Record<string, unknown>> = T & Record<string, unknown>;
@@ -1,3 +1,5 @@
1
1
  "use strict";
2
2
 
3
- exports.__esModule = true;
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
@@ -1,7 +1,7 @@
1
1
  import type { GitlabJobImage } from "../../types";
2
2
  import type { CatladderJob } from "../../types/jobs";
3
3
  import type { DeployConfigBase } from "./base";
4
- export declare type DeployConfigCustom = {
4
+ export type DeployConfigCustom = {
5
5
  /**
6
6
  * custom deploy types allow you to specify custom commands to deploy your app
7
7
  */
@@ -1,3 +1,5 @@
1
1
  "use strict";
2
2
 
3
- exports.__esModule = true;
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
@@ -1,5 +1,5 @@
1
1
  import type { DeployConfigBase } from "./base";
2
- export declare type DeployConfigDockerTag = {
2
+ export type DeployConfigDockerTag = {
3
3
  /**
4
4
  * adds a custom tag on the repo to deploy it.
5
5
  *
@@ -1,3 +1,5 @@
1
1
  "use strict";
2
2
 
3
- exports.__esModule = true;
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
@@ -1,6 +1,6 @@
1
1
  import type { DeployConfigBase } from "./base";
2
- export declare type Gcloudregion = "asia-east1" | "asia-northeast1" | "asia-northeast2" | "europe-north1" | "europe-southwest1" | "europe-west1" | "europe-west4" | "europe-west8" | "europe-west9" | "me-west1" | "us-central1" | "us-east1" | "us-east4" | "us-east5" | "us-south1" | "us-west1" | "asia-east2" | "asia-northeast3" | "asia-southeast1" | "asia-southeast2" | "asia-south1" | "asia-south2" | "australia-southeast1" | "australia-southeast2" | "europe-central2" | "europe-west2" | "europe-west3" | "europe-west6" | "northamerica-northeast1" | "northamerica-northeast2" | "southamerica-east1" | "southamerica-west1" | "us-west2" | "us-west3" | "us-west4";
3
- export declare type DeployConfigCloudRunCloudSql = {
2
+ export type Gcloudregion = "asia-east1" | "asia-northeast1" | "asia-northeast2" | "europe-north1" | "europe-southwest1" | "europe-west1" | "europe-west4" | "europe-west8" | "europe-west9" | "me-west1" | "us-central1" | "us-east1" | "us-east4" | "us-east5" | "us-south1" | "us-west1" | "asia-east2" | "asia-northeast3" | "asia-southeast1" | "asia-southeast2" | "asia-south1" | "asia-south2" | "australia-southeast1" | "australia-southeast2" | "europe-central2" | "europe-west2" | "europe-west3" | "europe-west6" | "northamerica-northeast1" | "northamerica-northeast2" | "southamerica-east1" | "southamerica-west1" | "us-west2" | "us-west3" | "us-west4";
3
+ export type DeployConfigCloudRunCloudSql = {
4
4
  type: "unmanaged";
5
5
  instanceConnectionName: string;
6
6
  /**
@@ -46,9 +46,9 @@ export declare type DeployConfigCloudRunCloudSql = {
46
46
  statement_cache_size?: number;
47
47
  };
48
48
  };
49
- declare type Memory = `${number}${"M" | "G" | "Mi" | "Gi"}`;
50
- declare type Cpu = 1 | 2 | 4 | 6 | 8;
51
- export declare type DeployConfigCloudRunService = {
49
+ type Memory = `${number}${"M" | "G" | "Mi" | "Gi"}`;
50
+ type Cpu = 1 | 2 | 4 | 6 | 8;
51
+ export type DeployConfigCloudRunService = {
52
52
  /**
53
53
  * command / entrypoint, fallsback to buildConfig.startcommand
54
54
  */
@@ -99,7 +99,7 @@ export declare type DeployConfigCloudRunService = {
99
99
  */
100
100
  executionEnvironment?: "gen2" | "gen1";
101
101
  } & DeployConfigCloudRunWithVolumes;
102
- export declare type DeployConfigCloudRunJobBase = {
102
+ export type DeployConfigCloudRunJobBase = {
103
103
  /**
104
104
  * command
105
105
  */
@@ -127,12 +127,12 @@ export declare type DeployConfigCloudRunJobBase = {
127
127
  */
128
128
  parallelism?: number;
129
129
  } & DeployConfigCloudRunWithVolumes;
130
- declare type Minute = string;
131
- declare type Hour = string;
132
- declare type DayOfMonth = string;
133
- declare type DayOfWeek = string;
134
- declare type Month = string;
135
- export declare type DeployConfigCloudRunJobWithSchedule = DeployConfigCloudRunJobBase & {
130
+ type Minute = string;
131
+ type Hour = string;
132
+ type DayOfMonth = string;
133
+ type DayOfWeek = string;
134
+ type Month = string;
135
+ export type DeployConfigCloudRunJobWithSchedule = DeployConfigCloudRunJobBase & {
136
136
  when: "schedule";
137
137
  schedule: `${Minute} ${Hour} ${DayOfMonth} ${Month} ${DayOfWeek}`;
138
138
  /**
@@ -143,18 +143,18 @@ export declare type DeployConfigCloudRunJobWithSchedule = DeployConfigCloudRunJo
143
143
  */
144
144
  maxRetryAttempts?: 0 | 1 | 2 | 3 | 4 | 5;
145
145
  };
146
- export declare type DeployConfigCloudRunJobNormal = DeployConfigCloudRunJobBase & {
146
+ export type DeployConfigCloudRunJobNormal = DeployConfigCloudRunJobBase & {
147
147
  when: "manual" | "preDeploy" | "postDeploy" | "preStop" | "postStop";
148
148
  };
149
- export declare type DeployConfigCloudRunWithVolumes = {
149
+ export type DeployConfigCloudRunWithVolumes = {
150
150
  /**
151
151
  * adds volumes to the service. This is an experimental feature and requires beta gcloud.
152
152
  * sets executionEnvironment to gen2 automatically, since that is required
153
153
  */
154
154
  volumes?: DeployConfigCloudRunVolumes;
155
155
  };
156
- export declare type DeployConfigCloudRunJob = DeployConfigCloudRunJobNormal | DeployConfigCloudRunJobWithSchedule;
157
- export declare type DeployConfigCloudRun = {
156
+ export type DeployConfigCloudRunJob = DeployConfigCloudRunJobNormal | DeployConfigCloudRunJobWithSchedule;
157
+ export type DeployConfigCloudRun = {
158
158
  /**
159
159
  * cloud run deployment.
160
160
  *
@@ -188,9 +188,10 @@ export declare type DeployConfigCloudRun = {
188
188
  * add cloudSql
189
189
  */
190
190
  cloudSql?: DeployConfigCloudRunCloudSql | false;
191
+ debug?: boolean;
191
192
  } & DeployConfigBase;
192
- export declare type DeployConfigCloudRunVolumes = Record<string, DeployConfigCloudRunVolume>;
193
- export declare type DeployConfigCloudRunVolume = {
193
+ export type DeployConfigCloudRunVolumes = Record<string, DeployConfigCloudRunVolume>;
194
+ export type DeployConfigCloudRunVolume = {
194
195
  type: "cloud-storage";
195
196
  bucket: string;
196
197
  mountPath: string;
@@ -1,3 +1,5 @@
1
1
  "use strict";
2
2
 
3
- exports.__esModule = true;
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
@@ -6,17 +6,17 @@ export * from "./custom";
6
6
  export * from "./googleCloudRun";
7
7
  export * from "./kubernetes";
8
8
  export * from "./dockerTag";
9
- export declare type DeployConfig = DeployConfigKubernetes | DeployConfigCustom | DeployConfigCloudRun | DeployConfigDockerTag;
10
- export declare type DeployConfigType = DeployConfig["type"];
11
- export declare type DeployConfigGeneric<T extends DeployConfigType> = Extract<DeployConfig, {
9
+ export type DeployConfig = DeployConfigKubernetes | DeployConfigCustom | DeployConfigCloudRun | DeployConfigDockerTag;
10
+ export type DeployConfigType = DeployConfig["type"];
11
+ export type DeployConfigGeneric<T extends DeployConfigType> = Extract<DeployConfig, {
12
12
  type: T;
13
13
  }>;
14
- export declare const isOfDeployType: <T extends ("kubernetes" | "custom" | "dockerTag" | "google-cloudrun")[]>(t: DeployConfig | false, ...types: T) => t is Extract<DeployConfigCustom, {
14
+ export declare const isOfDeployType: <T extends ("kubernetes" | "custom" | "google-cloudrun" | "dockerTag")[]>(t: DeployConfig | false, ...types: T) => t is Extract<DeployConfigKubernetes, {
15
15
  type: T[number];
16
- }> | Extract<DeployConfigDockerTag, {
16
+ }> | Extract<DeployConfigCustom, {
17
17
  type: T[number];
18
18
  }> | Extract<DeployConfigCloudRun, {
19
19
  type: T[number];
20
- }> | Extract<DeployConfigKubernetes, {
20
+ }> | Extract<DeployConfigDockerTag, {
21
21
  type: T[number];
22
22
  }>;
@@ -2,12 +2,16 @@
2
2
 
3
3
  var __createBinding = this && this.__createBinding || (Object.create ? function (o, m, k, k2) {
4
4
  if (k2 === undefined) k2 = k;
5
- Object.defineProperty(o, k2, {
6
- enumerable: true,
7
- get: function () {
8
- return m[k];
9
- }
10
- });
5
+ var desc = Object.getOwnPropertyDescriptor(m, k);
6
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
7
+ desc = {
8
+ enumerable: true,
9
+ get: function () {
10
+ return m[k];
11
+ }
12
+ };
13
+ }
14
+ Object.defineProperty(o, k2, desc);
11
15
  } : function (o, m, k, k2) {
12
16
  if (k2 === undefined) k2 = k;
13
17
  o[k2] = m[k];
@@ -15,7 +19,9 @@ var __createBinding = this && this.__createBinding || (Object.create ? function
15
19
  var __exportStar = this && this.__exportStar || function (m, exports) {
16
20
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
17
21
  };
18
- exports.__esModule = true;
22
+ Object.defineProperty(exports, "__esModule", {
23
+ value: true
24
+ });
19
25
  exports.isOfDeployType = void 0;
20
26
  __exportStar(require("./custom"), exports);
21
27
  __exportStar(require("./googleCloudRun"), exports);