@catladder/pipeline 1.115.0 → 1.116.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.
@@ -57,16 +57,13 @@ export const createGoogleCloudRunDeployJobs = (
57
57
  ];
58
58
  const gcloudImageName = `${gcloudImagePath.join("/")}:$DOCKER_IMAGE_TAG`;
59
59
 
60
- const pushImageToArtifactsRegistry = collapseableSection(
61
- "pushToArtifactRegistry",
62
- "pushing image to artifacts registry"
63
- )([
60
+ const pushImageToArtifactsRegistry = [
64
61
  gitlabDockerLogin,
65
62
  `gcloud auth configure-docker ${deployConfig.region}-docker.pkg.dev`,
66
63
  `docker pull $DOCKER_IMAGE:$DOCKER_IMAGE_TAG`,
67
64
  `docker tag $DOCKER_IMAGE:$DOCKER_IMAGE_TAG ${gcloudImageName}`,
68
65
  `docker push ${gcloudImageName}`,
69
- ]);
66
+ ];
70
67
  const allEnvVars = omit(
71
68
  context.environment.envVars,
72
69
  GCLOUD_DEPLOY_CREDENTIALS_KEY
@@ -228,25 +225,37 @@ export const createGoogleCloudRunDeployJobs = (
228
225
  ]);
229
226
 
230
227
  const deployScripts = [
231
- ...gcloudServiceAccountLoginCommands(context),
232
- ...setExtraVarsScripts(deployConfig),
233
- ...pushImageToArtifactsRegistry,
234
- `echo "$ENV_VARS" > ____envvars.yaml`, // TODO: split secrets out
235
- ...(deployConfig.cloudSql
236
- ? getDatabaseCreateScript(context, deployConfig) // we create the db, so that we can also delete it afterwards
237
- : []),
238
- ...getCreateScheduleScripts(),
239
- ...getJobCreateScripts(),
240
- ...getJobRunScripts("preDeploy"),
241
-
242
- ...(deployConfig.service !== false
243
- ? [getServiceDeployScript(deployConfig.service)]
244
- : []),
245
- ...Object.entries(deployConfig.additionalServices ?? {}).map(
246
- ([name, service]) => getServiceDeployScript(service, "-" + name)
247
- ),
248
- ...getJobRunScripts("postDeploy"),
228
+ ...collapseableSection(
229
+ "prepare",
230
+ "Prepare..."
231
+ )([
232
+ ...gcloudServiceAccountLoginCommands(context),
233
+ ...setExtraVarsScripts(deployConfig),
234
+ ]),
235
+ ...collapseableSection(
236
+ "pushToArtifactRegistry",
237
+ "Pushing image to artifacts registry"
238
+ )(pushImageToArtifactsRegistry),
239
+ ...collapseableSection(
240
+ "deploy",
241
+ "Deploy to cloud run"
242
+ )([
243
+ `echo "$ENV_VARS" > ____envvars.yaml`, // TODO: split secrets out
244
+ ...(deployConfig.cloudSql
245
+ ? getDatabaseCreateScript(context, deployConfig) // we create the db, so that we can also delete it afterwards
246
+ : []),
247
+ ...getCreateScheduleScripts(),
248
+ ...getJobCreateScripts(),
249
+ ...getJobRunScripts("preDeploy"),
249
250
 
251
+ ...(deployConfig.service !== false
252
+ ? [getServiceDeployScript(deployConfig.service)]
253
+ : []),
254
+ ...Object.entries(deployConfig.additionalServices ?? {}).map(
255
+ ([name, service]) => getServiceDeployScript(service, "-" + name)
256
+ ),
257
+ ...getJobRunScripts("postDeploy"),
258
+ ]),
250
259
  `docker image rm ${gcloudImageName}`,
251
260
  ...getDependencyTrackUploadScript(context),
252
261
  ];