@catladder/cli 0.0.0-next-e9e5af68 → 0.0.0-next-aea5d3ad
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.
- package/dist/bundles/catenv/index.js +6990 -6861
- package/dist/bundles/cli/index.js +10416 -10828
- package/dist/bundles/skills/catladder-pipelines/SKILL.md +6 -6
- package/dist/cli/src/adapters/baseContext.d.ts +18 -18
- package/dist/cli/src/adapters/baseContext.js +34 -34
- package/dist/cli/src/adapters/nonInteractive.d.ts +2 -2
- package/dist/cli/src/adapters/nonInteractive.js +20 -22
- package/dist/cli/src/adapters/programmatic.d.ts +12 -12
- package/dist/cli/src/adapters/programmatic.js +46 -51
- package/dist/cli/src/adapters/terminal.d.ts +15 -15
- package/dist/cli/src/adapters/terminal.js +154 -176
- package/dist/cli/src/adapters/vaultManagerAccess.d.ts +1 -1
- package/dist/cli/src/adapters/vaultManagerAccess.js +11 -16
- package/dist/cli/src/apps/catenv/catenv.d.ts +4 -4
- package/dist/cli/src/apps/catenv/catenv.js +20 -20
- package/dist/cli/src/apps/catenv/printVariables.d.ts +1 -1
- package/dist/cli/src/apps/catenv/printVariables.js +30 -33
- package/dist/cli/src/apps/catenv/types.d.ts +4 -4
- package/dist/cli/src/apps/catenv/types.js +2 -4
- package/dist/cli/src/apps/catenv/utils.d.ts +6 -9
- package/dist/cli/src/apps/catenv/utils.js +21 -25
- package/dist/cli/src/apps/catenv/verboseBanner.d.ts +1 -1
- package/dist/cli/src/apps/catenv/verboseBanner.js +24 -20
- package/dist/cli/src/apps/catenv/writeDotEnvFiles.d.ts +1 -1
- package/dist/cli/src/apps/catenv/writeDotEnvFiles.js +22 -25
- package/dist/cli/src/apps/catenv/writeEnvDTs.d.ts +1 -1
- package/dist/cli/src/apps/catenv/writeEnvDTs.js +32 -31
- package/dist/cli/src/apps/cli/commands/mongodb/utils/index.d.ts +6 -6
- package/dist/cli/src/apps/cli/commands/mongodb/utils/index.js +52 -56
- package/dist/cli/src/apps/cli/commands/project/commandConfigSecrets.d.ts +1 -1
- package/dist/cli/src/apps/cli/commands/project/commandConfigSecrets.js +165 -151
- package/dist/cli/src/apps/cli/commands/project/doctor/DoctorReport.d.ts +13 -13
- package/dist/cli/src/apps/cli/commands/project/doctor/DoctorReport.js +50 -62
- package/dist/cli/src/apps/cli/commands/project/doctor/GcloudProjectInspector.d.ts +9 -9
- package/dist/cli/src/apps/cli/commands/project/doctor/GcloudProjectInspector.js +43 -44
- package/dist/cli/src/apps/cli/commands/project/doctor/checkCloudRun.d.ts +1 -1
- package/dist/cli/src/apps/cli/commands/project/doctor/checkCloudRun.js +75 -93
- package/dist/cli/src/apps/cli/commands/project/doctor/checkGithub.d.ts +1 -1
- package/dist/cli/src/apps/cli/commands/project/doctor/checkGithub.js +86 -78
- package/dist/cli/src/apps/cli/commands/project/doctor/checkGitlab.d.ts +1 -1
- package/dist/cli/src/apps/cli/commands/project/doctor/checkGitlab.js +58 -57
- package/dist/cli/src/apps/cli/commands/project/doctor/checkStore.d.ts +1 -1
- package/dist/cli/src/apps/cli/commands/project/doctor/checkStore.js +25 -30
- package/dist/cli/src/apps/cli/commands/project/doctor/index.d.ts +1 -1
- package/dist/cli/src/apps/cli/commands/project/doctor/index.js +24 -25
- package/dist/cli/src/apps/cli/commands/project/setup/ensureGcloudProjectNumbers.d.ts +1 -1
- package/dist/cli/src/apps/cli/commands/project/setup/ensureGcloudProjectNumbers.js +34 -45
- package/dist/cli/src/apps/cli/commands/project/setup/index.d.ts +1 -1
- package/dist/cli/src/apps/cli/commands/project/setup/index.js +31 -27
- package/dist/cli/src/apps/cli/commands/project/setup/logSection.d.ts +1 -1
- package/dist/cli/src/apps/cli/commands/project/setup/logSection.js +13 -15
- package/dist/cli/src/apps/cli/commands/project/setup/setupAccessTokens.d.ts +1 -1
- package/dist/cli/src/apps/cli/commands/project/setup/setupAccessTokens.js +34 -43
- package/dist/cli/src/apps/cli/commands/project/setup/setupAgents.d.ts +1 -1
- package/dist/cli/src/apps/cli/commands/project/setup/setupAgents.js +130 -137
- package/dist/cli/src/apps/cli/commands/project/setup/setupCloudRun.d.ts +3 -3
- package/dist/cli/src/apps/cli/commands/project/setup/setupCloudRun.js +49 -46
- package/dist/cli/src/apps/cli/commands/project/setup/setupContext.d.ts +1 -1
- package/dist/cli/src/apps/cli/commands/project/setup/setupContext.js +13 -15
- package/dist/cli/src/apps/cli/commands/project/setup/setupKubernetes.d.ts +1 -1
- package/dist/cli/src/apps/cli/commands/project/setup/setupKubernetes.js +69 -70
- package/dist/cli/src/apps/cli/commands/project/setup/setupTopic.d.ts +1 -1
- package/dist/cli/src/apps/cli/commands/project/setup/setupTopic.js +7 -15
- package/dist/cli/src/apps/cli/commands/project/utils/autocompletions.d.ts +1 -1
- package/dist/cli/src/apps/cli/commands/project/utils/autocompletions.js +16 -21
- package/dist/cli/src/apps/cli/commands/project/utils/ensureCluster.d.ts +1 -1
- package/dist/cli/src/apps/cli/commands/project/utils/ensureCluster.js +22 -26
- package/dist/cli/src/apps/cli/commands/project/utils/ensureNamespace.d.ts +1 -1
- package/dist/cli/src/apps/cli/commands/project/utils/ensureNamespace.js +30 -35
- package/dist/cli/src/apps/cli/utils/getGoogleAuthUserNumber.d.ts +1 -1
- package/dist/cli/src/apps/cli/utils/getGoogleAuthUserNumber.js +15 -17
- package/dist/cli/src/catci.d.ts +1 -1
- package/dist/cli/src/catci.js +63 -65
- package/dist/cli/src/catenv.d.ts +1 -1
- package/dist/cli/src/catenv.js +44 -31
- package/dist/cli/src/cli.d.ts +1 -1
- package/dist/cli/src/cli.js +185 -170
- package/dist/cli/src/commands/availability.d.ts +1 -1
- package/dist/cli/src/commands/availability.js +13 -16
- package/dist/cli/src/commands/cloudSQL/commandRestoreDb.d.ts +45 -45
- package/dist/cli/src/commands/cloudSQL/commandRestoreDb.js +92 -103
- package/dist/cli/src/commands/fun/commandDadjoke.d.ts +1 -1
- package/dist/cli/src/commands/fun/commandDadjoke.js +18 -24
- package/dist/cli/src/commands/fun/commandStarwars.d.ts +1 -1
- package/dist/cli/src/commands/fun/commandStarwars.js +12 -14
- package/dist/cli/src/commands/general/commandKubeCurrentContext.d.ts +1 -1
- package/dist/cli/src/commands/general/commandKubeCurrentContext.js +10 -12
- package/dist/cli/src/commands/general/commandKubeGetShell.d.ts +11 -11
- package/dist/cli/src/commands/general/commandKubeGetShell.js +26 -28
- package/dist/cli/src/commands/general/commandKubeListNamespaces.d.ts +1 -1
- package/dist/cli/src/commands/general/commandKubeListNamespaces.js +13 -15
- package/dist/cli/src/commands/general/commandKubeListPods.d.ts +6 -6
- package/dist/cli/src/commands/general/commandKubeListPods.js +19 -21
- package/dist/cli/src/commands/general/commandKubeListSecrets.d.ts +6 -6
- package/dist/cli/src/commands/general/commandKubeListSecrets.js +19 -21
- package/dist/cli/src/commands/general/commandKubePortForward.d.ts +19 -19
- package/dist/cli/src/commands/general/commandKubePortForward.js +29 -37
- package/dist/cli/src/commands/general/commandKubeStopPortforward.d.ts +6 -6
- package/dist/cli/src/commands/general/commandKubeStopPortforward.js +13 -19
- package/dist/cli/src/commands/index.d.ts +1 -1
- package/dist/cli/src/commands/index.js +43 -250
- package/dist/cli/src/commands/mongodb/commandMongoDestroyMember.d.ts +15 -15
- package/dist/cli/src/commands/mongodb/commandMongoDestroyMember.js +76 -73
- package/dist/cli/src/commands/mongodb/commandMongoGetShell.d.ts +15 -15
- package/dist/cli/src/commands/mongodb/commandMongoGetShell.js +26 -28
- package/dist/cli/src/commands/mongodb/commandMongoPortForward.d.ts +20 -20
- package/dist/cli/src/commands/mongodb/commandMongoPortForward.js +45 -52
- package/dist/cli/src/commands/project/commandCloudSqlProxy.d.ts +12 -12
- package/dist/cli/src/commands/project/commandCloudSqlProxy.js +107 -110
- package/dist/cli/src/commands/project/commandConfigSecrets.d.ts +8 -8
- package/dist/cli/src/commands/project/commandConfigSecrets.js +24 -26
- package/dist/cli/src/commands/project/commandDoctor.d.ts +7 -7
- package/dist/cli/src/commands/project/commandDoctor.js +18 -20
- package/dist/cli/src/commands/project/commandEnvVars.d.ts +7 -7
- package/dist/cli/src/commands/project/commandEnvVars.js +21 -26
- package/dist/cli/src/commands/project/commandGetMyTotalWorktime.d.ts +1 -1
- package/dist/cli/src/commands/project/commandGetMyTotalWorktime.js +12 -14
- package/dist/cli/src/commands/project/commandGitlabCi.d.ts +11 -11
- package/dist/cli/src/commands/project/commandGitlabCi.js +82 -91
- package/dist/cli/src/commands/project/commandOpenEnv.d.ts +7 -7
- package/dist/cli/src/commands/project/commandOpenEnv.js +24 -31
- package/dist/cli/src/commands/project/commandOpenGit.d.ts +1 -1
- package/dist/cli/src/commands/project/commandOpenGit.js +10 -12
- package/dist/cli/src/commands/project/commandOpenLogs.d.ts +7 -7
- package/dist/cli/src/commands/project/commandOpenLogs.js +34 -37
- package/dist/cli/src/commands/project/commandPortForward.d.ts +24 -24
- package/dist/cli/src/commands/project/commandPortForward.js +59 -78
- package/dist/cli/src/commands/project/commandProjectRestoreDb.d.ts +18 -18
- package/dist/cli/src/commands/project/commandProjectRestoreDb.js +156 -147
- package/dist/cli/src/commands/project/commandRenewToken.d.ts +1 -1
- package/dist/cli/src/commands/project/commandRenewToken.js +10 -12
- package/dist/cli/src/commands/project/commandSecretsClearBackups.d.ts +6 -6
- package/dist/cli/src/commands/project/commandSecretsClearBackups.js +17 -19
- package/dist/cli/src/commands/project/commandSecretsSyncGithub.d.ts +22 -22
- package/dist/cli/src/commands/project/commandSecretsSyncGithub.js +136 -144
- package/dist/cli/src/commands/project/commandSecurityEvaluate.d.ts +1 -1
- package/dist/cli/src/commands/project/commandSecurityEvaluate.js +17 -20
- package/dist/cli/src/commands/project/commandSetup.d.ts +7 -7
- package/dist/cli/src/commands/project/commandSetup.js +18 -20
- package/dist/cli/src/commands/project/k8s/commandDeletePods.d.ts +12 -12
- package/dist/cli/src/commands/project/k8s/commandDeletePods.js +38 -40
- package/dist/cli/src/commands/project/k8s/commandDeleteProject.d.ts +7 -7
- package/dist/cli/src/commands/project/k8s/commandDeleteProject.js +28 -35
- package/dist/cli/src/commands/project/k8s/commandGetShell.d.ts +12 -12
- package/dist/cli/src/commands/project/k8s/commandGetShell.js +31 -31
- package/dist/cli/src/commands/project/k8s/commandListPods.d.ts +7 -7
- package/dist/cli/src/commands/project/k8s/commandListPods.js +21 -23
- package/dist/cli/src/commands/project/k8s/commandNamespace.d.ts +7 -7
- package/dist/cli/src/commands/project/k8s/commandNamespace.js +19 -21
- package/dist/cli/src/commands/project/k8s/commandPauseProject.d.ts +7 -7
- package/dist/cli/src/commands/project/k8s/commandPauseProject.js +28 -35
- package/dist/cli/src/commands/project/k8s/commandTriggerCronjob.d.ts +22 -22
- package/dist/cli/src/commands/project/k8s/commandTriggerCronjob.js +67 -76
- package/dist/cli/src/commands/security/commandSecurityAuditCiJob.d.ts +26 -26
- package/dist/cli/src/commands/security/commandSecurityAuditCiJob.js +62 -73
- package/dist/cli/src/commands/security/commandSecurityAuditCreate.d.ts +21 -21
- package/dist/cli/src/commands/security/commandSecurityAuditCreate.js +47 -51
- package/dist/cli/src/commands/security/commandSecurityAuditEvaluate.d.ts +6 -6
- package/dist/cli/src/commands/security/commandSecurityAuditEvaluate.js +22 -29
- package/dist/cli/src/completion.d.ts +1 -1
- package/dist/cli/src/completion.js +130 -129
- package/dist/cli/src/config/getProjectConfig.d.ts +6 -8
- package/dist/cli/src/config/getProjectConfig.js +92 -94
- package/dist/cli/src/config/parseChoice.d.ts +3 -3
- package/dist/cli/src/config/parseChoice.js +6 -11
- package/dist/cli/src/core/defineCommand.d.ts +1 -1
- package/dist/cli/src/core/defineCommand.js +4 -6
- package/dist/cli/src/core/index.d.ts +3 -3
- package/dist/cli/src/core/index.js +9 -46
- package/dist/cli/src/core/registry.d.ts +1 -1
- package/dist/cli/src/core/registry.js +10 -12
- package/dist/cli/src/core/runner.d.ts +3 -3
- package/dist/cli/src/core/runner.js +8 -10
- package/dist/cli/src/core/types.d.ts +70 -70
- package/dist/cli/src/core/types.js +14 -15
- package/dist/cli/src/gcloud/artifactsRegistry.d.ts +3 -3
- package/dist/cli/src/gcloud/artifactsRegistry.js +11 -12
- package/dist/cli/src/gcloud/cloudRun/openCloudRunDashboards.d.ts +1 -1
- package/dist/cli/src/gcloud/cloudRun/openCloudRunDashboards.js +12 -19
- package/dist/cli/src/gcloud/cloudSql/copyDb.d.ts +9 -9
- package/dist/cli/src/gcloud/cloudSql/copyDb.js +20 -31
- package/dist/cli/src/gcloud/cloudSql/parseConnectionString.d.ts +1 -1
- package/dist/cli/src/gcloud/cloudSql/parseConnectionString.js +10 -12
- package/dist/cli/src/gcloud/cloudSql/startProxy.d.ts +4 -4
- package/dist/cli/src/gcloud/cloudSql/startProxy.js +39 -55
- package/dist/cli/src/gcloud/enableServices.d.ts +2 -2
- package/dist/cli/src/gcloud/enableServices.js +6 -8
- package/dist/cli/src/gcloud/getProjectNumber.d.ts +1 -1
- package/dist/cli/src/gcloud/getProjectNumber.js +10 -12
- package/dist/cli/src/gcloud/openDashboard.d.ts +1 -1
- package/dist/cli/src/gcloud/openDashboard.js +13 -17
- package/dist/cli/src/gcloud/serviceAccountNames.d.ts +11 -11
- package/dist/cli/src/gcloud/serviceAccountNames.js +27 -34
- package/dist/cli/src/gcloud/serviceAccounts.d.ts +6 -6
- package/dist/cli/src/gcloud/serviceAccounts.js +37 -46
- package/dist/cli/src/git/getGetMainBranch.d.ts +1 -1
- package/dist/cli/src/git/getGetMainBranch.js +5 -9
- package/dist/cli/src/git/gitConfig.d.ts +6 -11
- package/dist/cli/src/git/gitConfig.js +11 -17
- package/dist/cli/src/git/gitProjectInformation.d.ts +6 -6
- package/dist/cli/src/git/gitProjectInformation.js +20 -30
- package/dist/cli/src/git/index.d.ts +1 -1
- package/dist/cli/src/git/index.js +16 -23
- package/dist/cli/src/index.d.ts +1 -1
- package/dist/cli/src/index.js +2 -4
- package/dist/cli/src/k8sApi/index.d.ts +1 -1
- package/dist/cli/src/k8sApi/index.js +12 -14
- package/dist/cli/src/kubernetes/index.d.ts +1 -1
- package/dist/cli/src/kubernetes/index.js +17 -24
- package/dist/cli/src/kubernetes/openKubernetesDashboards.d.ts +1 -1
- package/dist/cli/src/kubernetes/openKubernetesDashboards.js +33 -35
- package/dist/cli/src/kubernetes/portForward.d.ts +1 -1
- package/dist/cli/src/kubernetes/portForward.js +5 -7
- package/dist/cli/src/packageInfos.d.ts +1 -1
- package/dist/cli/src/packageInfos.js +3 -5
- package/dist/cli/src/release/changesets.d.ts +4 -4
- package/dist/cli/src/release/changesets.js +68 -60
- package/dist/cli/src/release/changesetsReleaseJob.d.ts +1 -1
- package/dist/cli/src/release/changesetsReleaseJob.js +99 -99
- package/dist/cli/src/scripts/generateCliSkillReference.d.ts +1 -1
- package/dist/cli/src/scripts/generateCliSkillReference.js +85 -62
- package/dist/cli/src/security/auditDocument.d.ts +16 -16
- package/dist/cli/src/security/auditDocument.js +65 -54
- package/dist/cli/src/security/createSecurityAuditMergeRequest.d.ts +6 -11
- package/dist/cli/src/security/createSecurityAuditMergeRequest.js +43 -43
- package/dist/cli/src/security/evaluateSecurityAudit.d.ts +3 -5
- package/dist/cli/src/security/evaluateSecurityAudit.js +12 -16
- package/dist/cli/src/store/updateCatladderStore.d.ts +4 -4
- package/dist/cli/src/store/updateCatladderStore.js +12 -16
- package/dist/cli/src/types/types.d.ts +13 -13
- package/dist/cli/src/types/types.js +2 -4
- package/dist/cli/src/utils/boxWithAscii.d.ts +1 -1
- package/dist/cli/src/utils/boxWithAscii.js +10 -12
- package/dist/cli/src/utils/cluster.d.ts +1 -1
- package/dist/cli/src/utils/cluster.js +6 -8
- package/dist/cli/src/utils/concurrency.d.ts +1 -1
- package/dist/cli/src/utils/concurrency.js +13 -17
- package/dist/cli/src/utils/editAsFile.d.ts +1 -1
- package/dist/cli/src/utils/editAsFile.js +17 -25
- package/dist/cli/src/utils/files.d.ts +1 -1
- package/dist/cli/src/utils/files.js +12 -15
- package/dist/cli/src/utils/getEditor.d.ts +2 -2
- package/dist/cli/src/utils/getEditor.js +14 -20
- package/dist/cli/src/utils/github.d.ts +1 -1
- package/dist/cli/src/utils/github.js +60 -47
- package/dist/cli/src/utils/gitlab.d.ts +9 -9
- package/dist/cli/src/utils/gitlab.js +173 -189
- package/dist/cli/src/utils/log.d.ts +2 -2
- package/dist/cli/src/utils/log.js +16 -18
- package/dist/cli/src/utils/portForwards.d.ts +5 -5
- package/dist/cli/src/utils/portForwards.js +31 -32
- package/dist/cli/src/utils/preferences.d.ts +1 -1
- package/dist/cli/src/utils/preferences.js +36 -43
- package/dist/cli/src/utils/projects/index.d.ts +1 -1
- package/dist/cli/src/utils/projects/index.js +21 -24
- package/dist/cli/src/utils/promise.d.ts +1 -1
- package/dist/cli/src/utils/promise.js +6 -8
- package/dist/cli/src/utils/shell.d.ts +1 -1
- package/dist/cli/src/utils/shell.js +19 -20
- package/dist/cli/src/vault/BitwardenVault.d.ts +20 -20
- package/dist/cli/src/vault/BitwardenVault.js +98 -84
- package/dist/cli/src/vault/GitlabVault.d.ts +4 -4
- package/dist/cli/src/vault/GitlabVault.js +13 -15
- package/dist/cli/src/vault/VaultManager.d.ts +32 -32
- package/dist/cli/src/vault/VaultManager.js +104 -98
- package/dist/cli/src/vault/bw.d.ts +3 -5
- package/dist/cli/src/vault/bw.js +54 -61
- package/dist/cli/src/vault/cache.d.ts +9 -9
- package/dist/cli/src/vault/cache.js +27 -33
- package/dist/cli/src/vault/index.d.ts +1 -1
- package/dist/cli/src/vault/index.js +18 -40
- package/dist/cli/src/vault/types.d.ts +16 -16
- package/dist/cli/src/vault/types.js +2 -4
- package/dist/pipeline/src/agentSkills/generateAgentSkills.d.ts +1 -1
- package/dist/pipeline/src/agentSkills/generateAgentSkills.js +47 -43
- package/dist/pipeline/src/agentSkills/index.d.ts +1 -1
- package/dist/pipeline/src/agentSkills/index.js +16 -23
- package/dist/pipeline/src/agentSkills/shippedSkills.d.ts +8 -8
- package/dist/pipeline/src/agentSkills/shippedSkills.js +38 -35
- package/dist/pipeline/src/agentSkills/types.d.ts +8 -8
- package/dist/pipeline/src/agentSkills/types.js +13 -14
- package/dist/pipeline/src/backends/github/GithubBackend.d.ts +9 -9
- package/dist/pipeline/src/backends/github/GithubBackend.js +253 -276
- package/dist/pipeline/src/backends/github/GithubBackend.js.map +1 -1
- package/dist/pipeline/src/backends/github/ciVariables.d.ts +1 -1
- package/dist/pipeline/src/backends/github/ciVariables.js +15 -17
- package/dist/pipeline/src/backends/github/createGithubJobs.d.ts +3 -3
- package/dist/pipeline/src/backends/github/createGithubJobs.js +316 -264
- package/dist/pipeline/src/backends/github/githubReleaseJobs.d.ts +3 -3
- package/dist/pipeline/src/backends/github/githubReleaseJobs.js +64 -71
- package/dist/pipeline/src/backends/github/index.d.ts +1 -1
- package/dist/pipeline/src/backends/github/index.js +16 -23
- package/dist/pipeline/src/backends/github/scriptFiles.d.ts +8 -8
- package/dist/pipeline/src/backends/github/scriptFiles.js +27 -29
- package/dist/pipeline/src/backends/github/scriptFunctions.d.ts +1 -1
- package/dist/pipeline/src/backends/github/scriptFunctions.js +10 -10
- package/dist/pipeline/src/backends/gitlab/GitlabBackend.d.ts +13 -13
- package/dist/pipeline/src/backends/gitlab/GitlabBackend.js +163 -178
- package/dist/pipeline/src/backends/gitlab/GitlabBackend.js.map +1 -1
- package/dist/pipeline/src/backends/gitlab/cache.d.ts +5 -5
- package/dist/pipeline/src/backends/gitlab/cache.js +24 -26
- package/dist/pipeline/src/backends/gitlab/ciVariables.d.ts +1 -1
- package/dist/pipeline/src/backends/gitlab/ciVariables.js +9 -11
- package/dist/pipeline/src/backends/gitlab/createGitlabJobs.d.ts +4 -4
- package/dist/pipeline/src/backends/gitlab/createGitlabJobs.js +277 -289
- package/dist/pipeline/src/backends/gitlab/createGitlabJobs.js.map +1 -1
- package/dist/pipeline/src/backends/gitlab/createGitlabPipeline.d.ts +2 -7
- package/dist/pipeline/src/backends/gitlab/createGitlabPipeline.js +66 -65
- package/dist/pipeline/src/backends/gitlab/createGitlabPipeline.js.map +1 -1
- package/dist/pipeline/src/backends/gitlab/getPipelineStages.d.ts +1 -1
- package/dist/pipeline/src/backends/gitlab/getPipelineStages.js +10 -8
- package/dist/pipeline/src/backends/gitlab/gitlabReleaseJobs.d.ts +34 -34
- package/dist/pipeline/src/backends/gitlab/gitlabReleaseJobs.js +55 -45
- package/dist/pipeline/src/backends/gitlab/index.d.ts +1 -1
- package/dist/pipeline/src/backends/gitlab/index.js +16 -23
- package/dist/pipeline/src/backends/gitlab/sortGitLabJobDefProps.d.ts +1 -1
- package/dist/pipeline/src/backends/gitlab/sortGitLabJobDefProps.js +40 -10
- package/dist/pipeline/src/backends/index.d.ts +1 -1
- package/dist/pipeline/src/backends/index.js +41 -56
- package/dist/pipeline/src/backends/types.d.ts +19 -19
- package/dist/pipeline/src/backends/types.js +2 -4
- package/dist/pipeline/src/bash/BashExpression.d.ts +18 -18
- package/dist/pipeline/src/bash/BashExpression.js +45 -44
- package/dist/pipeline/src/bash/bashEscape.d.ts +4 -6
- package/dist/pipeline/src/bash/bashEscape.js +77 -67
- package/dist/pipeline/src/bash/bashExpressionPerPipelineType.d.ts +5 -3
- package/dist/pipeline/src/bash/bashExpressionPerPipelineType.js +6 -7
- package/dist/pipeline/src/bash/bashYaml.d.ts +1 -1
- package/dist/pipeline/src/bash/bashYaml.js +46 -41
- package/dist/pipeline/src/bash/ciVariables.d.ts +2 -2
- package/dist/pipeline/src/bash/ciVariables.js +10 -12
- package/dist/pipeline/src/bash/getInjectVarsScript.d.ts +1 -1
- package/dist/pipeline/src/bash/getInjectVarsScript.js +14 -11
- package/dist/pipeline/src/bash/index.d.ts +1 -1
- package/dist/pipeline/src/bash/index.js +16 -23
- package/dist/pipeline/src/build/artifacts/createBuildJobArtifact.d.ts +1 -1
- package/dist/pipeline/src/build/artifacts/createBuildJobArtifact.js +49 -41
- package/dist/pipeline/src/build/base/constants.d.ts +4 -4
- package/dist/pipeline/src/build/base/constants.js +6 -8
- package/dist/pipeline/src/build/base/createAppBuildJob.d.ts +3 -3
- package/dist/pipeline/src/build/base/createAppBuildJob.js +53 -47
- package/dist/pipeline/src/build/base/createArtifactsConfig.d.ts +1 -1
- package/dist/pipeline/src/build/base/createArtifactsConfig.js +25 -16
- package/dist/pipeline/src/build/base/createBuildJobDefinition.d.ts +3 -3
- package/dist/pipeline/src/build/base/createBuildJobDefinition.js +22 -16
- package/dist/pipeline/src/build/base/index.d.ts +4 -4
- package/dist/pipeline/src/build/base/index.js +34 -15
- package/dist/pipeline/src/build/base/writeBuildInfo.d.ts +1 -1
- package/dist/pipeline/src/build/base/writeBuildInfo.js +7 -7
- package/dist/pipeline/src/build/base/writeDotEnv.d.ts +1 -1
- package/dist/pipeline/src/build/base/writeDotEnv.js +21 -19
- package/dist/pipeline/src/build/cache/createJobCache.d.ts +1 -1
- package/dist/pipeline/src/build/cache/createJobCache.js +55 -58
- package/dist/pipeline/src/build/cache/getAllCacheConfigsFromConfig.d.ts +1 -1
- package/dist/pipeline/src/build/cache/getAllCacheConfigsFromConfig.js +23 -16
- package/dist/pipeline/src/build/cache/transformLegacyJobCache.d.ts +1 -1
- package/dist/pipeline/src/build/cache/transformLegacyJobCache.js +12 -14
- package/dist/pipeline/src/build/custom/buildJob.d.ts +1 -1
- package/dist/pipeline/src/build/custom/buildJob.js +16 -16
- package/dist/pipeline/src/build/custom/index.d.ts +1 -1
- package/dist/pipeline/src/build/custom/index.js +8 -7
- package/dist/pipeline/src/build/custom/testJob.d.ts +2 -2
- package/dist/pipeline/src/build/custom/testJob.js +71 -67
- package/dist/pipeline/src/build/docker.d.ts +45 -51
- package/dist/pipeline/src/build/docker.js +139 -116
- package/dist/pipeline/src/build/index.d.ts +17 -13
- package/dist/pipeline/src/build/index.js +73 -80
- package/dist/pipeline/src/build/node/buildJob.d.ts +1 -1
- package/dist/pipeline/src/build/node/buildJob.js +45 -35
- package/dist/pipeline/src/build/node/cache.d.ts +1 -1
- package/dist/pipeline/src/build/node/cache.js +79 -52
- package/dist/pipeline/src/build/node/constants.d.ts +4 -4
- package/dist/pipeline/src/build/node/constants.js +6 -8
- package/dist/pipeline/src/build/node/index.d.ts +1 -1
- package/dist/pipeline/src/build/node/index.js +17 -13
- package/dist/pipeline/src/build/node/meteor.d.ts +1 -1
- package/dist/pipeline/src/build/node/meteor.js +59 -40
- package/dist/pipeline/src/build/node/testJob.d.ts +1 -1
- package/dist/pipeline/src/build/node/testJob.js +100 -75
- package/dist/pipeline/src/build/node/yarn.d.ts +2 -2
- package/dist/pipeline/src/build/node/yarn.js +51 -33
- package/dist/pipeline/src/build/rails/build.d.ts +1 -1
- package/dist/pipeline/src/build/rails/build.js +44 -37
- package/dist/pipeline/src/build/rails/index.d.ts +1 -1
- package/dist/pipeline/src/build/rails/index.js +8 -7
- package/dist/pipeline/src/build/rails/testJob.d.ts +1 -1
- package/dist/pipeline/src/build/rails/testJob.js +101 -71
- package/dist/pipeline/src/build/types.d.ts +324 -324
- package/dist/pipeline/src/build/types.js +10 -10
- package/dist/pipeline/src/catci/shippedCatci.d.ts +3 -3
- package/dist/pipeline/src/catci/shippedCatci.js +22 -21
- package/dist/pipeline/src/catenv/index.d.ts +3 -3
- package/dist/pipeline/src/catenv/index.js +8 -10
- package/dist/pipeline/src/config/configruedEnvs.d.ts +1 -1
- package/dist/pipeline/src/config/configruedEnvs.js +23 -18
- package/dist/pipeline/src/config/index.d.ts +1 -1
- package/dist/pipeline/src/config/index.js +16 -23
- package/dist/pipeline/src/config/readConfig.d.ts +4 -4
- package/dist/pipeline/src/config/readConfig.js +37 -42
- package/dist/pipeline/src/context/createAllComponentsContext.d.ts +4 -8
- package/dist/pipeline/src/context/createAllComponentsContext.js +16 -22
- package/dist/pipeline/src/context/createComponentContext.d.ts +6 -6
- package/dist/pipeline/src/context/createComponentContext.js +96 -87
- package/dist/pipeline/src/context/createWorkspaceContext.d.ts +8 -15
- package/dist/pipeline/src/context/createWorkspaceContext.js +28 -37
- package/dist/pipeline/src/context/getBuildInfoVariables.d.ts +2 -2
- package/dist/pipeline/src/context/getBuildInfoVariables.js +21 -22
- package/dist/pipeline/src/context/getEnvConfig.d.ts +1 -1
- package/dist/pipeline/src/context/getEnvConfig.js +28 -29
- package/dist/pipeline/src/context/getEnvType.d.ts +2 -2
- package/dist/pipeline/src/context/getEnvType.js +9 -10
- package/dist/pipeline/src/context/getEnvironment.d.ts +1 -1
- package/dist/pipeline/src/context/getEnvironment.js +16 -20
- package/dist/pipeline/src/context/getEnvironmentContext.d.ts +1 -6
- package/dist/pipeline/src/context/getEnvironmentContext.js +28 -35
- package/dist/pipeline/src/context/getEnvironmentVariables.d.ts +19 -19
- package/dist/pipeline/src/context/getEnvironmentVariables.js +95 -102
- package/dist/pipeline/src/context/getLabels.d.ts +7 -7
- package/dist/pipeline/src/context/getLabels.js +25 -26
- package/dist/pipeline/src/context/getReviewSlug.d.ts +1 -1
- package/dist/pipeline/src/context/getReviewSlug.js +12 -14
- package/dist/pipeline/src/context/index.d.ts +1 -1
- package/dist/pipeline/src/context/index.js +16 -23
- package/dist/pipeline/src/context/transformJobOnlyVars.d.ts +3 -3
- package/dist/pipeline/src/context/transformJobOnlyVars.js +21 -21
- package/dist/pipeline/src/context/utils/envVars.d.ts +3 -3
- package/dist/pipeline/src/context/utils/envVars.js +20 -26
- package/dist/pipeline/src/customImages/hash.d.ts +7 -7
- package/dist/pipeline/src/customImages/hash.js +53 -59
- package/dist/pipeline/src/customImages/jobImagesPlan.d.ts +44 -46
- package/dist/pipeline/src/customImages/jobImagesPlan.js +131 -145
- package/dist/pipeline/src/customImages/jobImagesPlan.js.map +1 -1
- package/dist/pipeline/src/customImages/shippedImages.d.ts +1 -10
- package/dist/pipeline/src/customImages/shippedImages.js +28 -38
- package/dist/pipeline/src/customImages/shippedImages.js.map +1 -1
- package/dist/pipeline/src/defaults/index.d.ts +1 -1
- package/dist/pipeline/src/defaults/index.js +4 -6
- package/dist/pipeline/src/deploy/base/deploy.d.ts +2 -2
- package/dist/pipeline/src/deploy/base/deploy.js +113 -92
- package/dist/pipeline/src/deploy/base/index.d.ts +4 -4
- package/dist/pipeline/src/deploy/base/index.js +10 -6
- package/dist/pipeline/src/deploy/base/rollback.d.ts +2 -2
- package/dist/pipeline/src/deploy/base/rollback.js +27 -31
- package/dist/pipeline/src/deploy/base/stop.d.ts +2 -2
- package/dist/pipeline/src/deploy/base/stop.js +26 -31
- package/dist/pipeline/src/deploy/base/variables.d.ts +4 -4
- package/dist/pipeline/src/deploy/base/variables.js +6 -8
- package/dist/pipeline/src/deploy/cloudRun/artifactsRegistry.d.ts +1 -1
- package/dist/pipeline/src/deploy/cloudRun/artifactsRegistry.js +67 -55
- package/dist/pipeline/src/deploy/cloudRun/cleanup.d.ts +1 -1
- package/dist/pipeline/src/deploy/cloudRun/cleanup.js +17 -16
- package/dist/pipeline/src/deploy/cloudRun/cloudRunRevisions.d.ts +1 -1
- package/dist/pipeline/src/deploy/cloudRun/cloudRunRevisions.js +41 -44
- package/dist/pipeline/src/deploy/cloudRun/createJobs/cloudRunJobs.d.ts +4 -4
- package/dist/pipeline/src/deploy/cloudRun/createJobs/cloudRunJobs.js +63 -58
- package/dist/pipeline/src/deploy/cloudRun/createJobs/cloudRunServices.d.ts +1 -1
- package/dist/pipeline/src/deploy/cloudRun/createJobs/cloudRunServices.js +73 -63
- package/dist/pipeline/src/deploy/cloudRun/createJobs/cloudRunWorkerPools.d.ts +1 -1
- package/dist/pipeline/src/deploy/cloudRun/createJobs/cloudRunWorkerPools.js +38 -38
- package/dist/pipeline/src/deploy/cloudRun/createJobs/common.d.ts +7 -7
- package/dist/pipeline/src/deploy/cloudRun/createJobs/common.js +37 -35
- package/dist/pipeline/src/deploy/cloudRun/createJobs/constants.d.ts +1 -1
- package/dist/pipeline/src/deploy/cloudRun/createJobs/constants.js +3 -5
- package/dist/pipeline/src/deploy/cloudRun/createJobs/execute/onDeploy.d.ts +1 -1
- package/dist/pipeline/src/deploy/cloudRun/createJobs/execute/onDeploy.js +67 -57
- package/dist/pipeline/src/deploy/cloudRun/createJobs/execute/schedules.d.ts +1 -1
- package/dist/pipeline/src/deploy/cloudRun/createJobs/execute/schedules.js +139 -130
- package/dist/pipeline/src/deploy/cloudRun/createJobs/getCloudRunDeployScripts.d.ts +1 -1
- package/dist/pipeline/src/deploy/cloudRun/createJobs/getCloudRunDeployScripts.js +29 -10
- package/dist/pipeline/src/deploy/cloudRun/createJobs/getCloudRunStopScripts.d.ts +1 -1
- package/dist/pipeline/src/deploy/cloudRun/createJobs/getCloudRunStopScripts.js +23 -9
- package/dist/pipeline/src/deploy/cloudRun/createJobs/healthCheck.d.ts +3 -3
- package/dist/pipeline/src/deploy/cloudRun/createJobs/healthCheck.js +39 -36
- package/dist/pipeline/src/deploy/cloudRun/createJobs/index.d.ts +1 -1
- package/dist/pipeline/src/deploy/cloudRun/createJobs/index.js +37 -36
- package/dist/pipeline/src/deploy/cloudRun/createJobs/volumes.d.ts +1 -1
- package/dist/pipeline/src/deploy/cloudRun/createJobs/volumes.js +13 -19
- package/dist/pipeline/src/deploy/cloudRun/index.d.ts +1 -1
- package/dist/pipeline/src/deploy/cloudRun/index.js +100 -91
- package/dist/pipeline/src/deploy/cloudRun/utils/cloudRunExecutionUrl.d.ts +5 -9
- package/dist/pipeline/src/deploy/cloudRun/utils/cloudRunExecutionUrl.js +7 -13
- package/dist/pipeline/src/deploy/cloudRun/utils/createArgsString.d.ts +1 -1
- package/dist/pipeline/src/deploy/cloudRun/utils/createArgsString.js +17 -13
- package/dist/pipeline/src/deploy/cloudRun/utils/database.d.ts +5 -5
- package/dist/pipeline/src/deploy/cloudRun/utils/database.js +82 -49
- package/dist/pipeline/src/deploy/cloudRun/utils/gcloudServiceAccountLoginCommands.d.ts +1 -1
- package/dist/pipeline/src/deploy/cloudRun/utils/gcloudServiceAccountLoginCommands.js +6 -6
- package/dist/pipeline/src/deploy/cloudRun/utils/getJobOrServiceArgs.d.ts +1 -1
- package/dist/pipeline/src/deploy/cloudRun/utils/getJobOrServiceArgs.js +9 -7
- package/dist/pipeline/src/deploy/cloudRun/utils/getServiceName.d.ts +1 -1
- package/dist/pipeline/src/deploy/cloudRun/utils/getServiceName.js +5 -7
- package/dist/pipeline/src/deploy/cloudRun/utils/jobName.d.ts +1 -1
- package/dist/pipeline/src/deploy/cloudRun/utils/jobName.js +3 -5
- package/dist/pipeline/src/deploy/cloudRun/utils/removeFirstLinesFromCommandOutput.d.ts +1 -1
- package/dist/pipeline/src/deploy/cloudRun/utils/removeFirstLinesFromCommandOutput.js +4 -6
- package/dist/pipeline/src/deploy/cloudSql/utils.d.ts +1 -1
- package/dist/pipeline/src/deploy/cloudSql/utils.js +9 -7
- package/dist/pipeline/src/deploy/custom/deployJob.d.ts +1 -1
- package/dist/pipeline/src/deploy/custom/deployJob.js +34 -30
- package/dist/pipeline/src/deploy/custom/index.d.ts +1 -1
- package/dist/pipeline/src/deploy/custom/index.js +7 -9
- package/dist/pipeline/src/deploy/dockerTag/deployJob.d.ts +1 -1
- package/dist/pipeline/src/deploy/dockerTag/deployJob.js +22 -18
- package/dist/pipeline/src/deploy/dockerTag/index.d.ts +1 -1
- package/dist/pipeline/src/deploy/dockerTag/index.js +7 -9
- package/dist/pipeline/src/deploy/index.d.ts +13 -11
- package/dist/pipeline/src/deploy/index.js +20 -27
- package/dist/pipeline/src/deploy/kubernetes/additionalSecretKeys.d.ts +3 -5
- package/dist/pipeline/src/deploy/kubernetes/additionalSecretKeys.js +19 -25
- package/dist/pipeline/src/deploy/kubernetes/cloudSql/index.d.ts +7 -7
- package/dist/pipeline/src/deploy/kubernetes/cloudSql/index.js +35 -36
- package/dist/pipeline/src/deploy/kubernetes/deployJob.d.ts +1 -1
- package/dist/pipeline/src/deploy/kubernetes/deployJob.js +61 -46
- package/dist/pipeline/src/deploy/kubernetes/index.d.ts +1 -1
- package/dist/pipeline/src/deploy/kubernetes/index.js +45 -54
- package/dist/pipeline/src/deploy/kubernetes/kubeEnv.d.ts +3 -3
- package/dist/pipeline/src/deploy/kubernetes/kubeEnv.js +34 -35
- package/dist/pipeline/src/deploy/kubernetes/kubeValues.d.ts +84 -84
- package/dist/pipeline/src/deploy/kubernetes/kubeValues.js +63 -70
- package/dist/pipeline/src/deploy/kubernetes/mongodb.d.ts +28 -28
- package/dist/pipeline/src/deploy/kubernetes/mongodb.js +93 -88
- package/dist/pipeline/src/deploy/types/base.d.ts +27 -27
- package/dist/pipeline/src/deploy/types/base.js +2 -4
- package/dist/pipeline/src/deploy/types/custom.d.ts +25 -25
- package/dist/pipeline/src/deploy/types/custom.js +2 -4
- package/dist/pipeline/src/deploy/types/dockerTag.d.ts +10 -10
- package/dist/pipeline/src/deploy/types/dockerTag.js +2 -4
- package/dist/pipeline/src/deploy/types/executeBase.d.ts +15 -15
- package/dist/pipeline/src/deploy/types/executeBase.js +2 -4
- package/dist/pipeline/src/deploy/types/googleCloudRun.d.ts +439 -439
- package/dist/pipeline/src/deploy/types/googleCloudRun.js +14 -16
- package/dist/pipeline/src/deploy/types/index.d.ts +6 -6
- package/dist/pipeline/src/deploy/types/index.js +21 -27
- package/dist/pipeline/src/deploy/types/kubernetes.d.ts +255 -255
- package/dist/pipeline/src/deploy/types/kubernetes.js +2 -4
- package/dist/pipeline/src/deploy/utils.d.ts +1 -1
- package/dist/pipeline/src/deploy/utils.js +21 -23
- package/dist/pipeline/src/globalScriptFunctions/index.d.ts +6 -6
- package/dist/pipeline/src/globalScriptFunctions/index.js +19 -21
- package/dist/pipeline/src/index.d.ts +1 -1
- package/dist/pipeline/src/index.js +16 -23
- package/dist/pipeline/src/pipeline/agent/createAgentContext.d.ts +19 -19
- package/dist/pipeline/src/pipeline/agent/createAgentContext.js +37 -41
- package/dist/pipeline/src/pipeline/agent/createAgentEventJob.d.ts +2 -2
- package/dist/pipeline/src/pipeline/agent/createAgentEventJob.js +27 -26
- package/dist/pipeline/src/pipeline/agent/createAgentReviewJob.d.ts +2 -2
- package/dist/pipeline/src/pipeline/agent/createAgentReviewJob.js +43 -35
- package/dist/pipeline/src/pipeline/agent/createJobsForAgentContext.d.ts +1 -1
- package/dist/pipeline/src/pipeline/agent/createJobsForAgentContext.js +5 -7
- package/dist/pipeline/src/pipeline/agent/prompts.d.ts +2 -2
- package/dist/pipeline/src/pipeline/agent/prompts.js +14 -32
- package/dist/pipeline/src/pipeline/agent/shared.d.ts +4 -6
- package/dist/pipeline/src/pipeline/agent/shared.js +34 -36
- package/dist/pipeline/src/pipeline/agent/utils.d.ts +1 -1
- package/dist/pipeline/src/pipeline/agent/utils.js +9 -11
- package/dist/pipeline/src/pipeline/createAllJobs.d.ts +13 -17
- package/dist/pipeline/src/pipeline/createAllJobs.js +44 -56
- package/dist/pipeline/src/pipeline/createJobsForComponent.d.ts +1 -1
- package/dist/pipeline/src/pipeline/createJobsForComponent.js +30 -27
- package/dist/pipeline/src/pipeline/createJobsForWorkspace.d.ts +1 -1
- package/dist/pipeline/src/pipeline/createJobsForWorkspace.js +6 -8
- package/dist/pipeline/src/pipeline/generatePipelineFiles.d.ts +1 -1
- package/dist/pipeline/src/pipeline/generatePipelineFiles.js +35 -45
- package/dist/pipeline/src/pipeline/index.d.ts +1 -1
- package/dist/pipeline/src/pipeline/index.js +16 -23
- package/dist/pipeline/src/pipeline/packageManager.d.ts +1 -1
- package/dist/pipeline/src/pipeline/packageManager.js +59 -47
- package/dist/pipeline/src/pipeline/resolveRequirements.d.ts +1 -1
- package/dist/pipeline/src/pipeline/resolveRequirements.js +63 -66
- package/dist/pipeline/src/release/index.d.ts +11 -11
- package/dist/pipeline/src/release/index.js +12 -17
- package/dist/pipeline/src/rules/index.d.ts +1 -1
- package/dist/pipeline/src/rules/index.js +15 -15
- package/dist/pipeline/src/runner/index.d.ts +5 -10
- package/dist/pipeline/src/runner/index.js +9 -14
- package/dist/pipeline/src/runner/index.js.map +1 -1
- package/dist/pipeline/src/store/index.d.ts +5 -5
- package/dist/pipeline/src/store/index.js +31 -31
- package/dist/pipeline/src/types/agent.d.ts +15 -15
- package/dist/pipeline/src/types/agent.js +2 -4
- package/dist/pipeline/src/types/config.d.ts +244 -248
- package/dist/pipeline/src/types/config.js +28 -24
- package/dist/pipeline/src/types/context.d.ts +104 -104
- package/dist/pipeline/src/types/context.js +7 -9
- package/dist/pipeline/src/types/environmentContext.d.ts +25 -25
- package/dist/pipeline/src/types/environmentContext.js +2 -4
- package/dist/pipeline/src/types/github-types.d.ts +41 -41
- package/dist/pipeline/src/types/github-types.js +2 -4
- package/dist/pipeline/src/types/gitlab-ci-yml.d.ts +497 -497
- package/dist/pipeline/src/types/gitlab-ci-yml.js +2 -4
- package/dist/pipeline/src/types/gitlab-types.d.ts +15 -15
- package/dist/pipeline/src/types/gitlab-types.js +2 -4
- package/dist/pipeline/src/types/hooks.d.ts +26 -26
- package/dist/pipeline/src/types/hooks.js +2 -4
- package/dist/pipeline/src/types/index.d.ts +1 -1
- package/dist/pipeline/src/types/index.js +16 -23
- package/dist/pipeline/src/types/jobDefinition.d.ts +3 -3
- package/dist/pipeline/src/types/jobDefinition.js +2 -4
- package/dist/pipeline/src/types/jobs.d.ts +172 -171
- package/dist/pipeline/src/types/jobs.js +28 -15
- package/dist/pipeline/src/types/pipeline.d.ts +1 -1
- package/dist/pipeline/src/types/pipeline.js +2 -4
- package/dist/pipeline/src/types/release.d.ts +11 -11
- package/dist/pipeline/src/types/release.js +2 -4
- package/dist/pipeline/src/types/utils.d.ts +3 -1
- package/dist/pipeline/src/types/utils.js +2 -4
- package/dist/pipeline/src/utils/gitlab.d.ts +7 -7
- package/dist/pipeline/src/utils/gitlab.js +15 -12
- package/dist/pipeline/src/utils/index.d.ts +1 -1
- package/dist/pipeline/src/utils/index.js +9 -12
- package/dist/pipeline/src/utils/jsonParse.d.ts +1 -1
- package/dist/pipeline/src/utils/jsonParse.js +10 -11
- package/dist/pipeline/src/utils/measureTime.d.ts +4 -4
- package/dist/pipeline/src/utils/measureTime.js +34 -39
- package/dist/pipeline/src/utils/removeUndefined.d.ts +1 -1
- package/dist/pipeline/src/utils/removeUndefined.js +4 -6
- package/dist/pipeline/src/utils/writeFiles.d.ts +16 -16
- package/dist/pipeline/src/utils/writeFiles.js +67 -61
- package/dist/pipeline/src/variables/VariableValue.d.ts +1 -1
- package/dist/pipeline/src/variables/VariableValue.js +2 -4
- package/dist/pipeline/src/variables/VariableValueContainingReferences.d.ts +12 -12
- package/dist/pipeline/src/variables/VariableValueContainingReferences.js +51 -45
- package/dist/pipeline/src/variables/resolveAllReferences.d.ts +1 -1
- package/dist/pipeline/src/variables/resolveAllReferences.js +18 -17
- package/dist/pipeline/src/variables/resolveAllReferencesOnce.d.ts +2 -2
- package/dist/pipeline/src/variables/resolveAllReferencesOnce.js +17 -14
- package/dist/pipeline/src/variables/resolveReferencesOnce.d.ts +3 -3
- package/dist/pipeline/src/variables/resolveReferencesOnce.js +16 -17
- package/dist/pipeline/src/verify/createVerifyJobs.d.ts +1 -1
- package/dist/pipeline/src/verify/createVerifyJobs.js +62 -55
- package/dist/pipeline/src/verify/index.d.ts +1 -1
- package/dist/pipeline/src/verify/index.js +16 -23
- package/dist/pipeline/src/verify/types.d.ts +11 -11
- package/dist/pipeline/src/verify/types.js +2 -4
- package/dist/skills/catladder-pipelines/SKILL.md +6 -6
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +2 -7
- package/babel-inline.json +0 -11
- package/dist/bundles/runner-images/semantic-release-central.Dockerfile +0 -36
- package/dist/pipeline/src/constants.d.ts +0 -2
- package/dist/pipeline/src/constants.js +0 -8
- package/dist/pipeline/src/constants.js.map +0 -1
- package/dist/runner-images/semantic-release-central.Dockerfile +0 -36
|
@@ -1,31 +1,28 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
3
|
exports.getDeleteUnusedImagesCommands = exports.getArtifactsRegistryImage = exports.getArtifactsRegistryBuildCacheImage = exports.getArtifactsRegistryImageName = exports.getArtifactsRegistryDockerUrl = exports.getArtifactsRegistryHost = void 0;
|
|
7
4
|
const BashExpression_1 = require("../../bash/BashExpression");
|
|
8
5
|
const gitlab_1 = require("../../utils/gitlab");
|
|
9
6
|
const types_1 = require("../types");
|
|
10
7
|
const removeFirstLinesFromCommandOutput_1 = require("./utils/removeFirstLinesFromCommandOutput");
|
|
11
|
-
const getArtifactsRegistryHost = context => {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
8
|
+
const getArtifactsRegistryHost = (context) => {
|
|
9
|
+
var _a;
|
|
10
|
+
if (!(0, types_1.isOfDeployType)((_a = context.deploy) === null || _a === void 0 ? void 0 : _a.config, "google-cloudrun")) {
|
|
11
|
+
// should not happen
|
|
12
|
+
throw new Error("deploy config is wrong");
|
|
13
|
+
}
|
|
14
|
+
return `${context.deploy.config.region}-docker.pkg.dev`;
|
|
18
15
|
};
|
|
19
16
|
exports.getArtifactsRegistryHost = getArtifactsRegistryHost;
|
|
20
|
-
const getArtifactsRegistryDockerUrl = context => {
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
17
|
+
const getArtifactsRegistryDockerUrl = (context) => {
|
|
18
|
+
var _a;
|
|
19
|
+
const deployConfig = (_a = context.deploy) === null || _a === void 0 ? void 0 : _a.config;
|
|
20
|
+
if (!(0, types_1.isOfDeployType)(deployConfig, "google-cloudrun")) {
|
|
21
|
+
// should not happen
|
|
22
|
+
throw new Error("deploy config is wrong");
|
|
23
|
+
}
|
|
24
|
+
const fullAppName = `${context.fullConfig.customerName}-${context.fullConfig.appName}`;
|
|
25
|
+
return `${(0, exports.getArtifactsRegistryHost)(context)}/${deployConfig.projectId}/catladder-deploy/${fullAppName}`;
|
|
29
26
|
};
|
|
30
27
|
exports.getArtifactsRegistryDockerUrl = getArtifactsRegistryDockerUrl;
|
|
31
28
|
/**
|
|
@@ -33,34 +30,43 @@ exports.getArtifactsRegistryDockerUrl = getArtifactsRegistryDockerUrl;
|
|
|
33
30
|
* lecacyReviewImageName is only temporary. In old versions the images had no reviewslug in review apps, which makes cleanup harder. We delete all those images now, but need the path
|
|
34
31
|
*/
|
|
35
32
|
const getArtifactsRegistryImageName = (context, lecacyReviewImageName = false) => {
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
33
|
+
if (lecacyReviewImageName && context.environment.envType !== "review") {
|
|
34
|
+
throw new Error("lecacyReviewImageName is only allowed for review app");
|
|
35
|
+
}
|
|
36
|
+
const dockerUrl = (0, exports.getArtifactsRegistryDockerUrl)(context);
|
|
37
|
+
const gcloudImagePath = [
|
|
38
|
+
dockerUrl,
|
|
39
|
+
context.env,
|
|
40
|
+
context.name,
|
|
41
|
+
...(context.environment.reviewSlug && !lecacyReviewImageName
|
|
42
|
+
? [context.environment.reviewSlug]
|
|
43
|
+
: []),
|
|
44
|
+
];
|
|
45
|
+
return (0, BashExpression_1.joinBashExpressions)(gcloudImagePath, "/");
|
|
42
46
|
};
|
|
43
47
|
exports.getArtifactsRegistryImageName = getArtifactsRegistryImageName;
|
|
44
|
-
const getArtifactsRegistryBuildCacheImage = context => {
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
48
|
+
const getArtifactsRegistryBuildCacheImage = (context) => {
|
|
49
|
+
const dockerUrl = (0, exports.getArtifactsRegistryDockerUrl)(context);
|
|
50
|
+
// does not include env, so that after merge, you might get more cache hits (review-->dev)
|
|
51
|
+
const gcloudImagePath = [dockerUrl, "caches", context.name];
|
|
52
|
+
return gcloudImagePath.join("/");
|
|
49
53
|
};
|
|
50
54
|
exports.getArtifactsRegistryBuildCacheImage = getArtifactsRegistryBuildCacheImage;
|
|
51
|
-
const getArtifactsRegistryImage = context => `${(0, exports.getArtifactsRegistryImageName)(context)}:$DOCKER_IMAGE_TAG`;
|
|
55
|
+
const getArtifactsRegistryImage = (context) => `${(0, exports.getArtifactsRegistryImageName)(context)}:$DOCKER_IMAGE_TAG`;
|
|
52
56
|
exports.getArtifactsRegistryImage = getArtifactsRegistryImage;
|
|
53
57
|
const getDeleteImageCommands = (fullImageName, keepNewest = 0) => {
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
58
|
+
if (keepNewest === 0) {
|
|
59
|
+
// no need to list tags, we delete the whole thing
|
|
60
|
+
return [
|
|
61
|
+
`gcloud artifacts docker images delete ${fullImageName} --quiet --delete-tags`,
|
|
62
|
+
];
|
|
63
|
+
}
|
|
64
|
+
// delete unused tags
|
|
65
|
+
const listAllImagesCommand = `gcloud artifacts docker images list ${fullImageName} --sort-by=~CREATE_TIME --format="value(version)"`;
|
|
66
|
+
const listImagesToDeletecommand = (0, removeFirstLinesFromCommandOutput_1.removeFirstLinesFromCommandOutput)(listAllImagesCommand, keepNewest);
|
|
67
|
+
const deleteImageCommand = `gcloud artifacts docker images delete ${fullImageName}@$version --quiet --delete-tags`;
|
|
68
|
+
const deleteImagesCommand = `${listImagesToDeletecommand} | while read -r version; do ${deleteImageCommand}; done`;
|
|
69
|
+
return [deleteImagesCommand];
|
|
64
70
|
};
|
|
65
71
|
/**
|
|
66
72
|
* commands to delete unused images.
|
|
@@ -70,17 +76,23 @@ const getDeleteImageCommands = (fullImageName, keepNewest = 0) => {
|
|
|
70
76
|
* @returns
|
|
71
77
|
*/
|
|
72
78
|
const getDeleteUnusedImagesCommands = (context, keep = 0) => {
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
79
|
+
var _a;
|
|
80
|
+
const deployConfig = (_a = context.deploy) === null || _a === void 0 ? void 0 : _a.config;
|
|
81
|
+
if (!(0, types_1.isOfDeployType)(deployConfig, "google-cloudrun")) {
|
|
82
|
+
// should not happen
|
|
83
|
+
throw new Error("deploy config is wrong");
|
|
84
|
+
}
|
|
85
|
+
const fullImageName = (0, exports.getArtifactsRegistryImageName)(context);
|
|
86
|
+
const buildCacheImageName = (0, exports.getArtifactsRegistryBuildCacheImage)(context);
|
|
87
|
+
return [
|
|
88
|
+
...getDeleteImageCommands(fullImageName, keep),
|
|
89
|
+
...getDeleteImageCommands(buildCacheImageName, 1),
|
|
90
|
+
// because a recent version of catladder had no review-slug in the image name, we have to delete those as well
|
|
91
|
+
// we can later remove this line in some months
|
|
92
|
+
...(context.environment.envType === "review"
|
|
93
|
+
? (0, gitlab_1.allowFailureInScripts)(getDeleteImageCommands((0, exports.getArtifactsRegistryImageName)(context, true), 0))
|
|
94
|
+
: []),
|
|
95
|
+
];
|
|
85
96
|
};
|
|
86
|
-
exports.getDeleteUnusedImagesCommands = getDeleteUnusedImagesCommands;
|
|
97
|
+
exports.getDeleteUnusedImagesCommands = getDeleteUnusedImagesCommands;
|
|
98
|
+
//# sourceMappingURL=artifactsRegistry.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import type { ComponentContext } from "../../types/context";
|
|
2
|
-
export declare const getRemoveOldRevisionsAndImagesCommand: (context: ComponentContext, when: "postDeploy" | "onStop") => string[];
|
|
2
|
+
export declare const getRemoveOldRevisionsAndImagesCommand: (context: ComponentContext, when: "postDeploy" | "onStop") => string[];
|
|
@@ -1,23 +1,24 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
3
|
exports.getRemoveOldRevisionsAndImagesCommand = void 0;
|
|
7
4
|
const gitlab_1 = require("../../utils/gitlab");
|
|
8
5
|
const artifactsRegistry_1 = require("./artifactsRegistry");
|
|
9
6
|
const cloudRunRevisions_1 = require("./cloudRunRevisions");
|
|
10
7
|
const getRemoveOldRevisionsAndImagesCommand = (context, when) => {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
8
|
+
if (when === "onStop") {
|
|
9
|
+
// service is already deleted, so we don't need to delete old revisions, just delete all images
|
|
10
|
+
return (0, artifactsRegistry_1.getDeleteUnusedImagesCommands)(context);
|
|
11
|
+
}
|
|
12
|
+
// this number only targets inactive revisions
|
|
13
|
+
const revisionsToKeep = context.environment.envType === "prod" ? 5 : 0;
|
|
14
|
+
// this number needs to be higher than inactive after deploy, so we add one
|
|
15
|
+
const imagesToKeep = revisionsToKeep + 1;
|
|
16
|
+
const deleteOldRevisionsCommands = (0, cloudRunRevisions_1.getDeleteUnusedRevisionsCommands)(context, revisionsToKeep);
|
|
17
|
+
const deleteOldImagesCommands = (0, artifactsRegistry_1.getDeleteUnusedImagesCommands)(context, imagesToKeep);
|
|
18
|
+
return (0, gitlab_1.allowFailureInScripts)([
|
|
19
|
+
...deleteOldRevisionsCommands,
|
|
20
|
+
...deleteOldImagesCommands,
|
|
21
|
+
]);
|
|
22
22
|
};
|
|
23
|
-
exports.getRemoveOldRevisionsAndImagesCommand = getRemoveOldRevisionsAndImagesCommand;
|
|
23
|
+
exports.getRemoveOldRevisionsAndImagesCommand = getRemoveOldRevisionsAndImagesCommand;
|
|
24
|
+
//# sourceMappingURL=cleanup.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import type { ComponentContext } from "../../types/context";
|
|
2
|
-
export declare const getDeleteUnusedRevisionsCommands: (context: ComponentContext, keep: number) => string[];
|
|
2
|
+
export declare const getDeleteUnusedRevisionsCommands: (context: ComponentContext, keep: number) => string[];
|
|
@@ -1,54 +1,51 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
3
|
exports.getDeleteUnusedRevisionsCommands = void 0;
|
|
7
4
|
const types_1 = require("../types");
|
|
8
5
|
const createArgsString_1 = require("./utils/createArgsString");
|
|
9
6
|
const getServiceName_1 = require("./utils/getServiceName");
|
|
10
7
|
const removeFirstLinesFromCommandOutput_1 = require("./utils/removeFirstLinesFromCommandOutput");
|
|
11
8
|
const getListRevisionsCommand = (context, args) => {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
return `gcloud run revisions list ${(0, createArgsString_1.createArgsString)(filterRevisionArgs)}`;
|
|
9
|
+
var _a;
|
|
10
|
+
const serviceName = (0, getServiceName_1.getServiceName)(context);
|
|
11
|
+
const deployConfig = (_a = context.deploy) === null || _a === void 0 ? void 0 : _a.config;
|
|
12
|
+
if (!deployConfig || !(0, types_1.isOfDeployType)(deployConfig, "google-cloudrun")) {
|
|
13
|
+
// should not happen
|
|
14
|
+
throw new Error("deploy config is wrong");
|
|
15
|
+
}
|
|
16
|
+
const filterRevisionArgs = {
|
|
17
|
+
project: deployConfig.projectId,
|
|
18
|
+
region: deployConfig.region,
|
|
19
|
+
// only show inactive revisions
|
|
20
|
+
service: serviceName,
|
|
21
|
+
limit: "unlimited", // is actualy the default
|
|
22
|
+
"sort-by": "metadata.creationTimestamp",
|
|
23
|
+
...args,
|
|
24
|
+
};
|
|
25
|
+
// this prints out all inactive images of the given app
|
|
26
|
+
return `gcloud run revisions list ${(0, createArgsString_1.createArgsString)(filterRevisionArgs)}`;
|
|
31
27
|
};
|
|
32
28
|
const getDeleteUnusedRevisionsCommands = (context, keep) => {
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
29
|
+
var _a;
|
|
30
|
+
const deployConfig = (_a = context.deploy) === null || _a === void 0 ? void 0 : _a.config;
|
|
31
|
+
if (!(0, types_1.isOfDeployType)(deployConfig, "google-cloudrun")) {
|
|
32
|
+
// should not happen
|
|
33
|
+
throw new Error("deploy config is wrong");
|
|
34
|
+
}
|
|
35
|
+
// this prints out all inactive images of the given app
|
|
36
|
+
const listAllInactiveRevisionsCmd = getListRevisionsCommand(context, {
|
|
37
|
+
format: `"value(name)"`,
|
|
38
|
+
filter: `'(status.conditions.status=False OR status.conditions.status=Unknown)'`,
|
|
39
|
+
});
|
|
40
|
+
// this removes the newest `revisionsToKeep` images
|
|
41
|
+
const listRevisionsToDeleteCmd = (0, removeFirstLinesFromCommandOutput_1.removeFirstLinesFromCommandOutput)(listAllInactiveRevisionsCmd, keep);
|
|
42
|
+
const deleteRevisionCmd = `gcloud run revisions delete ${(0, createArgsString_1.createArgsString)({
|
|
43
|
+
project: deployConfig.projectId,
|
|
44
|
+
region: deployConfig.region,
|
|
45
|
+
quiet: true,
|
|
46
|
+
})} $revisionname `;
|
|
47
|
+
const deleteRevisionsCmd = `${listRevisionsToDeleteCmd} | while read -r revisionname; do ${deleteRevisionCmd}; done`;
|
|
48
|
+
return [deleteRevisionsCmd];
|
|
53
49
|
};
|
|
54
|
-
exports.getDeleteUnusedRevisionsCommands = getDeleteUnusedRevisionsCommands;
|
|
50
|
+
exports.getDeleteUnusedRevisionsCommands = getDeleteUnusedRevisionsCommands;
|
|
51
|
+
//# sourceMappingURL=cloudRunRevisions.js.map
|
|
@@ -3,7 +3,7 @@ import type { DeployConfigCloudRunJob } from "../../types/googleCloudRun";
|
|
|
3
3
|
export declare const getDeleteJobsScripts: (context: ComponentContext) => string[];
|
|
4
4
|
export declare const getJobCreateScripts: (context: ComponentContext) => string[];
|
|
5
5
|
export declare const getCloudRunJobsWithNames: (context: ComponentContext) => {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
}[];
|
|
6
|
+
fullJobName: import("../../..").StringOrBashExpression;
|
|
7
|
+
job: DeployConfigCloudRunJob;
|
|
8
|
+
jobName: string;
|
|
9
|
+
}[];
|
|
@@ -1,8 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
3
|
exports.getCloudRunJobsWithNames = exports.getJobCreateScripts = exports.getDeleteJobsScripts = void 0;
|
|
7
4
|
const getLabels_1 = require("../../../context/getLabels");
|
|
8
5
|
const utils_1 = require("../../../utils");
|
|
@@ -12,62 +9,70 @@ const common_1 = require("./common");
|
|
|
12
9
|
const constants_1 = require("./constants");
|
|
13
10
|
const volumes_1 = require("./volumes");
|
|
14
11
|
const getJobOrServiceArgs_1 = require("../utils/getJobOrServiceArgs");
|
|
15
|
-
const getDeleteJobsScripts = context => {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
12
|
+
const getDeleteJobsScripts = (context) => {
|
|
13
|
+
const commonArgs = (0, common_1.getCommonCloudRunArgs)(context);
|
|
14
|
+
const commonArgsString = (0, createArgsString_1.createArgsString)(commonArgs);
|
|
15
|
+
const jobsWithNames = (0, exports.getCloudRunJobsWithNames)(context);
|
|
16
|
+
return jobsWithNames.flatMap(({ fullJobName }) => [
|
|
17
|
+
// first delete all job executions. Otherwise delete might fail if one of those is still running
|
|
18
|
+
`${(0, common_1.gcloudRunCmd)()} jobs executions list ${commonArgsString} --job ${fullJobName} --format="value(name)" | xargs -I {} ${(0, common_1.gcloudRunCmd)()} jobs executions delete {} --quiet ${commonArgsString}`,
|
|
19
|
+
`${(0, common_1.gcloudRunCmd)()} jobs delete ${fullJobName} ${commonArgsString}`,
|
|
20
|
+
]);
|
|
24
21
|
};
|
|
25
22
|
exports.getDeleteJobsScripts = getDeleteJobsScripts;
|
|
26
|
-
const getJobCreateScripts = context => (0, exports.getCloudRunJobsWithNames)(context).map(({
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
...
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
23
|
+
const getJobCreateScripts = (context) => (0, exports.getCloudRunJobsWithNames)(context).map(({ job, fullJobName }, jobIndex) => {
|
|
24
|
+
var _a, _b, _c, _d, _e;
|
|
25
|
+
const commandArray = Array.isArray(job.command)
|
|
26
|
+
? job.command
|
|
27
|
+
: job.command.split(" ");
|
|
28
|
+
const { image: commonImage, project, region, ...deployArgs } = (0, common_1.getCommonDeployArgs)(context);
|
|
29
|
+
const commonDeployArgsString = (0, createArgsString_1.createArgsString)({
|
|
30
|
+
command: `"${commandArray.join(",")}"`,
|
|
31
|
+
args: (0, getJobOrServiceArgs_1.getCloudRunServiceOrJobArgsArg)(job.args),
|
|
32
|
+
labels: `"${(0, common_1.makeLabelString)((0, getLabels_1.getLabels)(context))},cloud-run-job-name=$current_job_name"`,
|
|
33
|
+
image: `"${(_a = job.image) !== null && _a !== void 0 ? _a : commonImage}"`,
|
|
34
|
+
project,
|
|
35
|
+
region,
|
|
36
|
+
cpu: job.cpu,
|
|
37
|
+
memory: (_b = job.memory) !== null && _b !== void 0 ? _b : "512Mi",
|
|
38
|
+
parallelism: (_c = job.parallelism) !== null && _c !== void 0 ? _c : 1,
|
|
39
|
+
"task-timeout": (_d = job.timeout) !== null && _d !== void 0 ? _d : "10m",
|
|
40
|
+
"env-vars-file": constants_1.ENV_VARS_FILENAME,
|
|
41
|
+
"max-retries": (_e = job.maxRetries) !== null && _e !== void 0 ? _e : 0,
|
|
42
|
+
...deployArgs,
|
|
43
|
+
// network
|
|
44
|
+
"vpc-connector": job === null || job === void 0 ? void 0 : job.vpcConnector,
|
|
45
|
+
"vpc-egress": job === null || job === void 0 ? void 0 : job.vpcEgress,
|
|
46
|
+
network: job === null || job === void 0 ? void 0 : job.network,
|
|
47
|
+
subnet: job === null || job === void 0 ? void 0 : job.subnet,
|
|
48
|
+
}, ...(0, volumes_1.createVolumeConfig)(job.volumes, "job"));
|
|
49
|
+
return [
|
|
50
|
+
jobIndex === 0
|
|
51
|
+
? `exist_job_names="$(\n ${(0, common_1.gcloudRunCmd)()} jobs list --filter='metadata.name ~ ${context.env}.*${context.name}' --format='value(name)' --limit=999 --project='${project}' --region='${region}'\n)"`
|
|
52
|
+
: null,
|
|
53
|
+
`current_job_name="${fullJobName}"`,
|
|
54
|
+
'if echo "$exist_job_names" | grep -Fx "$current_job_name" >/dev/null; then',
|
|
55
|
+
` ${(0, common_1.gcloudRunCmd)()} jobs update "$current_job_name" ${commonDeployArgsString}`,
|
|
56
|
+
"else",
|
|
57
|
+
` ${(0, common_1.gcloudRunCmd)()} jobs create "$current_job_name" ${commonDeployArgsString}`,
|
|
58
|
+
"fi",
|
|
59
|
+
]
|
|
60
|
+
.filter(utils_1.notNil)
|
|
61
|
+
.join("\n");
|
|
59
62
|
});
|
|
60
63
|
exports.getJobCreateScripts = getJobCreateScripts;
|
|
61
|
-
const getCloudRunJobsWithNames = context => {
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
64
|
+
const getCloudRunJobsWithNames = (context) => {
|
|
65
|
+
var _a;
|
|
66
|
+
const deployConfig = (0, common_1.getCloudRunDeployConfig)(context);
|
|
67
|
+
const jobsWithNames = Object.entries((_a = deployConfig.jobs) !== null && _a !== void 0 ? _a : {})
|
|
68
|
+
// filter out disabled jobs
|
|
69
|
+
.filter((entry) => Boolean(entry[1]))
|
|
70
|
+
.map(([jobName, job]) => ({
|
|
71
|
+
fullJobName: (0, jobName_1.getFullJobName)(context, jobName),
|
|
72
|
+
job,
|
|
73
|
+
jobName,
|
|
74
|
+
}));
|
|
75
|
+
return jobsWithNames;
|
|
72
76
|
};
|
|
73
|
-
exports.getCloudRunJobsWithNames = getCloudRunJobsWithNames;
|
|
77
|
+
exports.getCloudRunJobsWithNames = getCloudRunJobsWithNames;
|
|
78
|
+
//# sourceMappingURL=cloudRunJobs.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { ComponentContext } from "../../../types/context";
|
|
2
2
|
import type { DeployConfigCloudRunService } from "../../types/googleCloudRun";
|
|
3
3
|
export declare const getServiceDeployScript: (context: ComponentContext, service: DeployConfigCloudRunService | true | undefined, nameSuffix?: string) => string;
|
|
4
|
-
export declare const getServiceDeleteScript: (context: ComponentContext, serviceSuffix?: string) => string[];
|
|
4
|
+
export declare const getServiceDeleteScript: (context: ComponentContext, serviceSuffix?: string) => string[];
|
|
@@ -1,8 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
3
|
exports.getServiceDeleteScript = exports.getServiceDeployScript = void 0;
|
|
7
4
|
const getLabels_1 = require("../../../context/getLabels");
|
|
8
5
|
const createArgsString_1 = require("../utils/createArgsString");
|
|
@@ -13,68 +10,81 @@ const constants_1 = require("./constants");
|
|
|
13
10
|
const healthCheck_1 = require("./healthCheck");
|
|
14
11
|
const volumes_1 = require("./volumes");
|
|
15
12
|
const getServiceDeployScript = (context, service, nameSuffix) => {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
13
|
+
var _a, _b, _c, _d, _e, _f;
|
|
14
|
+
const commonDeployArgs = (0, common_1.getCommonDeployArgs)(context);
|
|
15
|
+
const serviceName = (0, getServiceName_1.getServiceName)(context);
|
|
16
|
+
const customConfig = service !== true ? service : undefined;
|
|
17
|
+
const command = service !== true
|
|
18
|
+
? ((_a = service === null || service === void 0 ? void 0 : service.command) !== null && _a !== void 0 ? _a : (context.build.type !== "disabled"
|
|
19
|
+
? context.build.config.startCommand
|
|
20
|
+
: undefined))
|
|
21
|
+
: undefined;
|
|
22
|
+
const commandArray = command
|
|
23
|
+
? Array.isArray(command)
|
|
24
|
+
? command
|
|
25
|
+
: command.split(" ")
|
|
26
|
+
: undefined;
|
|
27
|
+
const fullServiceName = serviceName.concat(nameSuffix !== null && nameSuffix !== void 0 ? nameSuffix : "");
|
|
28
|
+
const argsString = (0, createArgsString_1.createArgsString)({
|
|
29
|
+
// command as empty string resets it to default (uses the image's entrypoint)
|
|
30
|
+
command: commandArray ? '"' + commandArray.join(",") + '"' : '""',
|
|
31
|
+
args: (0, getJobOrServiceArgs_1.getCloudRunServiceOrJobArgsArg)(customConfig === null || customConfig === void 0 ? void 0 : customConfig.args),
|
|
32
|
+
...commonDeployArgs,
|
|
33
|
+
image: (_b = customConfig === null || customConfig === void 0 ? void 0 : customConfig.image) !== null && _b !== void 0 ? _b : commonDeployArgs.image,
|
|
34
|
+
labels: (0, common_1.makeLabelString)({
|
|
35
|
+
...(0, getLabels_1.getLabels)(context),
|
|
36
|
+
"cloud-run-service-name": fullServiceName,
|
|
37
|
+
}),
|
|
38
|
+
"env-vars-file": constants_1.ENV_VARS_FILENAME,
|
|
39
|
+
"min-instances": (_c = customConfig === null || customConfig === void 0 ? void 0 : customConfig.minInstances) !== null && _c !== void 0 ? _c : 0,
|
|
40
|
+
"max-instances": (_d = customConfig === null || customConfig === void 0 ? void 0 : customConfig.maxInstances) !== null && _d !== void 0 ? _d : 100,
|
|
41
|
+
"cpu-throttling": (customConfig === null || customConfig === void 0 ? void 0 : customConfig.noCpuThrottling) !== true,
|
|
42
|
+
cpu: customConfig === null || customConfig === void 0 ? void 0 : customConfig.cpu,
|
|
43
|
+
memory: customConfig === null || customConfig === void 0 ? void 0 : customConfig.memory,
|
|
44
|
+
timeout: customConfig === null || customConfig === void 0 ? void 0 : customConfig.timeout,
|
|
45
|
+
"vpc-connector": customConfig === null || customConfig === void 0 ? void 0 : customConfig.vpcConnector,
|
|
46
|
+
"vpc-egress": customConfig === null || customConfig === void 0 ? void 0 : customConfig.vpcEgress,
|
|
47
|
+
network: customConfig === null || customConfig === void 0 ? void 0 : customConfig.network,
|
|
48
|
+
subnet: customConfig === null || customConfig === void 0 ? void 0 : customConfig.subnet,
|
|
49
|
+
"use-http2": customConfig === null || customConfig === void 0 ? void 0 : customConfig.http2,
|
|
50
|
+
"allow-unauthenticated": (_e = customConfig === null || customConfig === void 0 ? void 0 : customConfig.allowUnauthenticated) !== null && _e !== void 0 ? _e : true,
|
|
51
|
+
ingress: (_f = customConfig === null || customConfig === void 0 ? void 0 : customConfig.ingress) !== null && _f !== void 0 ? _f : "all",
|
|
52
|
+
"session-affinity": customConfig === null || customConfig === void 0 ? void 0 : customConfig.sessionAffinity,
|
|
53
|
+
"cpu-boost": true,
|
|
54
|
+
"execution-environment": customConfig === null || customConfig === void 0 ? void 0 : customConfig.executionEnvironment,
|
|
55
|
+
gpu: customConfig === null || customConfig === void 0 ? void 0 : customConfig.gpu,
|
|
56
|
+
"gpu-type": customConfig === null || customConfig === void 0 ? void 0 : customConfig.gpuType,
|
|
57
|
+
...(0, healthCheck_1.healthCheckCliArgs)(customConfig === null || customConfig === void 0 ? void 0 : customConfig.healthCheck),
|
|
58
|
+
}, ...(0, volumes_1.createVolumeConfig)(customConfig === null || customConfig === void 0 ? void 0 : customConfig.volumes, "service"));
|
|
59
|
+
const version = requiresBeta(customConfig) ? "beta" : undefined;
|
|
60
|
+
return `${(0, common_1.gcloudRunCmd)(version)} deploy ${fullServiceName} ${argsString}`;
|
|
56
61
|
};
|
|
57
62
|
exports.getServiceDeployScript = getServiceDeployScript;
|
|
58
63
|
const getServiceDeleteScript = (context, serviceSuffix) => {
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
+
const commonArgs = (0, common_1.getCommonCloudRunArgs)(context);
|
|
65
|
+
const commonArgsString = (0, createArgsString_1.createArgsString)(commonArgs);
|
|
66
|
+
const serviceName = (0, getServiceName_1.getServiceName)(context);
|
|
67
|
+
const fullServiceName = serviceSuffix
|
|
68
|
+
? `${serviceName}-${serviceSuffix}`
|
|
69
|
+
: serviceName;
|
|
70
|
+
return [
|
|
71
|
+
`${(0, common_1.gcloudRunCmd)()} services delete ${fullServiceName} ${commonArgsString}`,
|
|
72
|
+
];
|
|
64
73
|
};
|
|
65
74
|
exports.getServiceDeleteScript = getServiceDeleteScript;
|
|
66
|
-
const requiresBeta = config => {
|
|
67
|
-
|
|
75
|
+
const requiresBeta = (config) => {
|
|
76
|
+
if (!config) {
|
|
77
|
+
return false;
|
|
78
|
+
}
|
|
79
|
+
if (config.gpuType) {
|
|
80
|
+
return true;
|
|
81
|
+
}
|
|
82
|
+
if (config.gpu && config.gpu > 0) {
|
|
83
|
+
return true;
|
|
84
|
+
}
|
|
85
|
+
if (config.healthCheck !== undefined) {
|
|
86
|
+
return true;
|
|
87
|
+
}
|
|
68
88
|
return false;
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
return true;
|
|
72
|
-
}
|
|
73
|
-
if (config.gpu && config.gpu > 0) {
|
|
74
|
-
return true;
|
|
75
|
-
}
|
|
76
|
-
if (config.healthCheck !== undefined) {
|
|
77
|
-
return true;
|
|
78
|
-
}
|
|
79
|
-
return false;
|
|
80
|
-
};
|
|
89
|
+
};
|
|
90
|
+
//# sourceMappingURL=cloudRunServices.js.map
|