@catladder/pipeline 1.119.0 → 1.121.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 (29) hide show
  1. package/dist/build/node/yarn.js +3 -2
  2. package/dist/bundles/catladder-gitlab/index.js +1 -1
  3. package/dist/constants.js +1 -1
  4. package/dist/deploy/cloudRun/deployJob.js +2 -1
  5. package/dist/deploy/types/googleCloudRun.d.ts +12 -1
  6. package/dist/tsconfig.tsbuildinfo +1 -1
  7. package/examples/__snapshots__/cloud-run-memory-limit.ts.snap +44 -4
  8. package/examples/__snapshots__/cloud-run-no-cpu-throttling.ts.snap +44 -4
  9. package/examples/__snapshots__/cloud-run-non-public.ts.snap +44 -4
  10. package/examples/__snapshots__/cloud-run-with-sql-reuse-db.ts.snap +88 -8
  11. package/examples/__snapshots__/cloud-run-with-sql.ts.snap +88 -8
  12. package/examples/__snapshots__/custom-build-job-with-tests.ts.snap +12 -4
  13. package/examples/__snapshots__/custom-build-job.ts.snap +12 -4
  14. package/examples/__snapshots__/custom-deploy.ts.snap +40 -0
  15. package/examples/__snapshots__/custom-envs.ts.snap +52 -0
  16. package/examples/__snapshots__/custom-sbom-java.ts.snap +12 -4
  17. package/examples/__snapshots__/kubernetes-application-customization.ts.snap +40 -0
  18. package/examples/__snapshots__/kubernetes-with-cloud-sql-legacy.ts.snap +40 -0
  19. package/examples/__snapshots__/kubernetes-with-cloud-sql.ts.snap +40 -0
  20. package/examples/__snapshots__/kubernetes-with-jobs.ts.snap +80 -0
  21. package/examples/__snapshots__/kubernetes-with-mongodb.ts.snap +40 -0
  22. package/examples/__snapshots__/meteor-kubernetes.ts.snap +40 -0
  23. package/examples/__snapshots__/native-app.ts.snap +84 -4
  24. package/examples/__snapshots__/node-build-with-custom-image.ts.snap +44 -4
  25. package/examples/__snapshots__/wait-for-other-deploy.ts.snap +80 -0
  26. package/package.json +1 -1
  27. package/src/build/node/yarn.ts +14 -6
  28. package/src/deploy/cloudRun/deployJob.ts +1 -0
  29. package/src/deploy/types/googleCloudRun.ts +13 -1
@@ -34,9 +34,13 @@ exports[`matches snapshot 1`] = `
34
34
  },
35
35
  "script": [
36
36
  "cd www",
37
+ "echo -e "\\e[0Ksection_start:$(date +%s):yarn prepare[collapsed=true]\\r\\e[0KNode and yarn install"",
38
+ "echo -e "\\e[0Ksection_start:$(date +%s):node install[collapsed=true]\\r\\e[0KEnsure node version"",
37
39
  "if [ -f ~/.nvm/nvm.sh ]; then source ~/.nvm/nvm.sh; fi",
38
40
  "if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi",
41
+ "echo -e "\\e[0Ksection_end:$(date +%s):node install\\r\\e[0K"",
39
42
  "yarn install --immutable",
43
+ "echo -e "\\e[0Ksection_end:$(date +%s):yarn prepare\\r\\e[0K"",
40
44
  "yarn lint",
41
45
  ],
42
46
  "stage": "test",
@@ -96,12 +100,18 @@ exports[`matches snapshot 1`] = `
96
100
  },
97
101
  "script": [
98
102
  "echo '{"id":"some-id","time":"01-01-2023 12:13:14"}' > www/__build_info.json",
103
+ "echo -e "\\e[0Ksection_start:$(date +%s):node install[collapsed=true]\\r\\e[0KEnsure node version"",
99
104
  "if [ -f ~/.nvm/nvm.sh ]; then source ~/.nvm/nvm.sh; fi",
100
105
  "if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi",
106
+ "echo -e "\\e[0Ksection_end:$(date +%s):node install\\r\\e[0K"",
101
107
  "cd www",
108
+ "echo -e "\\e[0Ksection_start:$(date +%s):yarn prepare[collapsed=true]\\r\\e[0KNode and yarn install"",
109
+ "echo -e "\\e[0Ksection_start:$(date +%s):node install[collapsed=true]\\r\\e[0KEnsure node version"",
102
110
  "if [ -f ~/.nvm/nvm.sh ]; then source ~/.nvm/nvm.sh; fi",
103
111
  "if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi",
112
+ "echo -e "\\e[0Ksection_end:$(date +%s):node install\\r\\e[0K"",
104
113
  "yarn install --immutable",
114
+ "echo -e "\\e[0Ksection_end:$(date +%s):yarn prepare\\r\\e[0K"",
105
115
  "yarn build",
106
116
  ],
107
117
  "stage": "build",
@@ -262,7 +272,7 @@ COPY --chown=node:node .yarn /app/.yarn",
262
272
  "echo -e "\\e[0Ksection_end:$(date +%s):pushToArtifactRegistry\\r\\e[0K"",
263
273
  "echo -e "\\e[0Ksection_start:$(date +%s):deploy[collapsed=true]\\r\\e[0KDeploy to cloud run"",
264
274
  "echo "$ENV_VARS" > ____envvars.yaml",
265
- "gcloud run deploy pan-test-app-dev-www --command="yarn,start" --image=asia-east1-docker.pkg.dev/asdf/catladder-deploy/pan-test-app/dev/www:$DOCKER_IMAGE_TAG --project=asdf --region=asia-east1 --labels=customer-name=pan,component-name=www,app-name=test-app,env-type=dev,env-name=dev,build-type=node --env-vars-file=____envvars.yaml --min-instances=0 --max-instances=100 --cpu-throttling --allow-unauthenticated --cpu-boost",
275
+ "gcloud run deploy pan-test-app-dev-www --command="yarn,start" --image=asia-east1-docker.pkg.dev/asdf/catladder-deploy/pan-test-app/dev/www:$DOCKER_IMAGE_TAG --project=asdf --region=asia-east1 --labels=customer-name=pan,component-name=www,app-name=test-app,env-type=dev,env-name=dev,build-type=node --env-vars-file=____envvars.yaml --min-instances=0 --max-instances=100 --cpu-throttling --allow-unauthenticated --ingress=all --cpu-boost",
266
276
  "echo -e "\\e[0Ksection_end:$(date +%s):deploy\\r\\e[0K"",
267
277
  "echo -e "\\e[0Ksection_start:$(date +%s):cleanup[collapsed=true]\\r\\e[0KCleanup"",
268
278
  "gcloud run revisions list --project=asdf --region=asia-east1 --service=pan-test-app-dev-www --limit=unlimited --sort-by=metadata.creationTimestamp --format="value(name)" --filter='(status.conditions.status=False OR status.conditions.status=Unknown)' | while read -r revisionname; do gcloud run revisions delete --project=asdf --region=asia-east1 --quiet $revisionname ; done",
@@ -424,9 +434,13 @@ _ALL_ENV_VAR_KEYS: '["ENV_SHORT","APP_DIR","ENV_TYPE","BUILD_INFO_ID","BUILD_INF
424
434
  },
425
435
  "script": [
426
436
  "cd www",
437
+ "echo -e "\\e[0Ksection_start:$(date +%s):yarn prepare[collapsed=true]\\r\\e[0KNode and yarn install"",
438
+ "echo -e "\\e[0Ksection_start:$(date +%s):node install[collapsed=true]\\r\\e[0KEnsure node version"",
427
439
  "if [ -f ~/.nvm/nvm.sh ]; then source ~/.nvm/nvm.sh; fi",
428
440
  "if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi",
441
+ "echo -e "\\e[0Ksection_end:$(date +%s):node install\\r\\e[0K"",
429
442
  "yarn install --immutable",
443
+ "echo -e "\\e[0Ksection_end:$(date +%s):yarn prepare\\r\\e[0K"",
430
444
  "yarn test",
431
445
  ],
432
446
  "stage": "test",
@@ -562,9 +576,13 @@ _ALL_ENV_VAR_KEYS: '["ENV_SHORT","APP_DIR","ENV_TYPE","BUILD_INFO_ID","BUILD_INF
562
576
  },
563
577
  "script": [
564
578
  "cd www",
579
+ "echo -e "\\e[0Ksection_start:$(date +%s):yarn prepare[collapsed=true]\\r\\e[0KNode and yarn install"",
580
+ "echo -e "\\e[0Ksection_start:$(date +%s):node install[collapsed=true]\\r\\e[0KEnsure node version"",
565
581
  "if [ -f ~/.nvm/nvm.sh ]; then source ~/.nvm/nvm.sh; fi",
566
582
  "if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi",
583
+ "echo -e "\\e[0Ksection_end:$(date +%s):node install\\r\\e[0K"",
567
584
  "yarn install --immutable",
585
+ "echo -e "\\e[0Ksection_end:$(date +%s):yarn prepare\\r\\e[0K"",
568
586
  "yarn lint",
569
587
  ],
570
588
  "stage": "test",
@@ -624,12 +642,18 @@ _ALL_ENV_VAR_KEYS: '["ENV_SHORT","APP_DIR","ENV_TYPE","BUILD_INFO_ID","BUILD_INF
624
642
  },
625
643
  "script": [
626
644
  "echo '{"id":"some-id","time":"01-01-2023 12:13:14"}' > www/__build_info.json",
645
+ "echo -e "\\e[0Ksection_start:$(date +%s):node install[collapsed=true]\\r\\e[0KEnsure node version"",
627
646
  "if [ -f ~/.nvm/nvm.sh ]; then source ~/.nvm/nvm.sh; fi",
628
647
  "if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi",
648
+ "echo -e "\\e[0Ksection_end:$(date +%s):node install\\r\\e[0K"",
629
649
  "cd www",
650
+ "echo -e "\\e[0Ksection_start:$(date +%s):yarn prepare[collapsed=true]\\r\\e[0KNode and yarn install"",
651
+ "echo -e "\\e[0Ksection_start:$(date +%s):node install[collapsed=true]\\r\\e[0KEnsure node version"",
630
652
  "if [ -f ~/.nvm/nvm.sh ]; then source ~/.nvm/nvm.sh; fi",
631
653
  "if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi",
654
+ "echo -e "\\e[0Ksection_end:$(date +%s):node install\\r\\e[0K"",
632
655
  "yarn install --immutable",
656
+ "echo -e "\\e[0Ksection_end:$(date +%s):yarn prepare\\r\\e[0K"",
633
657
  "yarn build",
634
658
  ],
635
659
  "stage": "build",
@@ -790,7 +814,7 @@ COPY --chown=node:node .yarn /app/.yarn",
790
814
  "echo -e "\\e[0Ksection_end:$(date +%s):pushToArtifactRegistry\\r\\e[0K"",
791
815
  "echo -e "\\e[0Ksection_start:$(date +%s):deploy[collapsed=true]\\r\\e[0KDeploy to cloud run"",
792
816
  "echo "$ENV_VARS" > ____envvars.yaml",
793
- "gcloud run deploy pan-test-app-review-mr1234-www --command="yarn,start" --image=asia-east1-docker.pkg.dev/asdf/catladder-deploy/pan-test-app/review/www/mr1234:$DOCKER_IMAGE_TAG --project=asdf --region=asia-east1 --labels=customer-name=pan,component-name=www,app-name=test-app,env-type=review,env-name=review,build-type=node --env-vars-file=____envvars.yaml --min-instances=0 --max-instances=100 --cpu-throttling --allow-unauthenticated --cpu-boost",
817
+ "gcloud run deploy pan-test-app-review-mr1234-www --command="yarn,start" --image=asia-east1-docker.pkg.dev/asdf/catladder-deploy/pan-test-app/review/www/mr1234:$DOCKER_IMAGE_TAG --project=asdf --region=asia-east1 --labels=customer-name=pan,component-name=www,app-name=test-app,env-type=review,env-name=review,build-type=node --env-vars-file=____envvars.yaml --min-instances=0 --max-instances=100 --cpu-throttling --allow-unauthenticated --ingress=all --cpu-boost",
794
818
  "echo -e "\\e[0Ksection_end:$(date +%s):deploy\\r\\e[0K"",
795
819
  "echo -e "\\e[0Ksection_start:$(date +%s):cleanup[collapsed=true]\\r\\e[0KCleanup"",
796
820
  "gcloud run revisions list --project=asdf --region=asia-east1 --service=pan-test-app-review-mr1234-www --limit=unlimited --sort-by=metadata.creationTimestamp --format="value(name)" --filter='(status.conditions.status=False OR status.conditions.status=Unknown)' | while read -r revisionname; do gcloud run revisions delete --project=asdf --region=asia-east1 --quiet $revisionname ; done",
@@ -958,9 +982,13 @@ _ALL_ENV_VAR_KEYS: '["ENV_SHORT","APP_DIR","ENV_TYPE","BUILD_INFO_ID","BUILD_INF
958
982
  },
959
983
  "script": [
960
984
  "cd www",
985
+ "echo -e "\\e[0Ksection_start:$(date +%s):yarn prepare[collapsed=true]\\r\\e[0KNode and yarn install"",
986
+ "echo -e "\\e[0Ksection_start:$(date +%s):node install[collapsed=true]\\r\\e[0KEnsure node version"",
961
987
  "if [ -f ~/.nvm/nvm.sh ]; then source ~/.nvm/nvm.sh; fi",
962
988
  "if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi",
989
+ "echo -e "\\e[0Ksection_end:$(date +%s):node install\\r\\e[0K"",
963
990
  "yarn install --immutable",
991
+ "echo -e "\\e[0Ksection_end:$(date +%s):yarn prepare\\r\\e[0K"",
964
992
  "yarn test",
965
993
  ],
966
994
  "stage": "test",
@@ -1115,12 +1143,18 @@ _ALL_ENV_VAR_KEYS: '["ENV_SHORT","APP_DIR","ENV_TYPE","BUILD_INFO_ID","BUILD_INF
1115
1143
  },
1116
1144
  "script": [
1117
1145
  "echo '{"id":"some-id","time":"01-01-2023 12:13:14"}' > www/__build_info.json",
1146
+ "echo -e "\\e[0Ksection_start:$(date +%s):node install[collapsed=true]\\r\\e[0KEnsure node version"",
1118
1147
  "if [ -f ~/.nvm/nvm.sh ]; then source ~/.nvm/nvm.sh; fi",
1119
1148
  "if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi",
1149
+ "echo -e "\\e[0Ksection_end:$(date +%s):node install\\r\\e[0K"",
1120
1150
  "cd www",
1151
+ "echo -e "\\e[0Ksection_start:$(date +%s):yarn prepare[collapsed=true]\\r\\e[0KNode and yarn install"",
1152
+ "echo -e "\\e[0Ksection_start:$(date +%s):node install[collapsed=true]\\r\\e[0KEnsure node version"",
1121
1153
  "if [ -f ~/.nvm/nvm.sh ]; then source ~/.nvm/nvm.sh; fi",
1122
1154
  "if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi",
1155
+ "echo -e "\\e[0Ksection_end:$(date +%s):node install\\r\\e[0K"",
1123
1156
  "yarn install --immutable",
1157
+ "echo -e "\\e[0Ksection_end:$(date +%s):yarn prepare\\r\\e[0K"",
1124
1158
  "yarn build",
1125
1159
  ],
1126
1160
  "stage": "build",
@@ -1191,12 +1225,18 @@ _ALL_ENV_VAR_KEYS: '["ENV_SHORT","APP_DIR","ENV_TYPE","BUILD_INFO_ID","BUILD_INF
1191
1225
  },
1192
1226
  "script": [
1193
1227
  "echo '{"id":"some-id","time":"01-01-2023 12:13:14"}' > www/__build_info.json",
1228
+ "echo -e "\\e[0Ksection_start:$(date +%s):node install[collapsed=true]\\r\\e[0KEnsure node version"",
1194
1229
  "if [ -f ~/.nvm/nvm.sh ]; then source ~/.nvm/nvm.sh; fi",
1195
1230
  "if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi",
1231
+ "echo -e "\\e[0Ksection_end:$(date +%s):node install\\r\\e[0K"",
1196
1232
  "cd www",
1233
+ "echo -e "\\e[0Ksection_start:$(date +%s):yarn prepare[collapsed=true]\\r\\e[0KNode and yarn install"",
1234
+ "echo -e "\\e[0Ksection_start:$(date +%s):node install[collapsed=true]\\r\\e[0KEnsure node version"",
1197
1235
  "if [ -f ~/.nvm/nvm.sh ]; then source ~/.nvm/nvm.sh; fi",
1198
1236
  "if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi",
1237
+ "echo -e "\\e[0Ksection_end:$(date +%s):node install\\r\\e[0K"",
1199
1238
  "yarn install --immutable",
1239
+ "echo -e "\\e[0Ksection_end:$(date +%s):yarn prepare\\r\\e[0K"",
1200
1240
  "yarn build",
1201
1241
  ],
1202
1242
  "stage": "build",
@@ -1413,7 +1453,7 @@ COPY --chown=node:node .yarn /app/.yarn",
1413
1453
  "echo -e "\\e[0Ksection_end:$(date +%s):pushToArtifactRegistry\\r\\e[0K"",
1414
1454
  "echo -e "\\e[0Ksection_start:$(date +%s):deploy[collapsed=true]\\r\\e[0KDeploy to cloud run"",
1415
1455
  "echo "$ENV_VARS" > ____envvars.yaml",
1416
- "gcloud run deploy pan-test-app-prod-www --command="yarn,start" --image=asia-east1-docker.pkg.dev/asdf/catladder-deploy/pan-test-app/prod/www:$DOCKER_IMAGE_TAG --project=asdf --region=asia-east1 --labels=customer-name=pan,component-name=www,app-name=test-app,env-type=prod,env-name=prod,build-type=node --env-vars-file=____envvars.yaml --min-instances=0 --max-instances=100 --cpu-throttling --allow-unauthenticated --cpu-boost",
1456
+ "gcloud run deploy pan-test-app-prod-www --command="yarn,start" --image=asia-east1-docker.pkg.dev/asdf/catladder-deploy/pan-test-app/prod/www:$DOCKER_IMAGE_TAG --project=asdf --region=asia-east1 --labels=customer-name=pan,component-name=www,app-name=test-app,env-type=prod,env-name=prod,build-type=node --env-vars-file=____envvars.yaml --min-instances=0 --max-instances=100 --cpu-throttling --allow-unauthenticated --ingress=all --cpu-boost",
1417
1457
  "echo -e "\\e[0Ksection_end:$(date +%s):deploy\\r\\e[0K"",
1418
1458
  "echo -e "\\e[0Ksection_start:$(date +%s):cleanup[collapsed=true]\\r\\e[0KCleanup"",
1419
1459
  "gcloud run revisions list --project=asdf --region=asia-east1 --service=pan-test-app-prod-www --limit=unlimited --sort-by=metadata.creationTimestamp --format="value(name)" --filter='(status.conditions.status=False OR status.conditions.status=Unknown)' | tail -n +6 | while read -r revisionname; do gcloud run revisions delete --project=asdf --region=asia-east1 --quiet $revisionname ; done",
@@ -1531,7 +1571,7 @@ _ALL_ENV_VAR_KEYS: '["ENV_SHORT","APP_DIR","ENV_TYPE","BUILD_INFO_ID","BUILD_INF
1531
1571
  "echo -e "\\e[0Ksection_end:$(date +%s):pushToArtifactRegistry\\r\\e[0K"",
1532
1572
  "echo -e "\\e[0Ksection_start:$(date +%s):deploy[collapsed=true]\\r\\e[0KDeploy to cloud run"",
1533
1573
  "echo "$ENV_VARS" > ____envvars.yaml",
1534
- "gcloud run deploy pan-test-app-stage-www --command="yarn,start" --image=asia-east1-docker.pkg.dev/asdf/catladder-deploy/pan-test-app/stage/www:$DOCKER_IMAGE_TAG --project=asdf --region=asia-east1 --labels=customer-name=pan,component-name=www,app-name=test-app,env-type=stage,env-name=stage,build-type=node --env-vars-file=____envvars.yaml --min-instances=0 --max-instances=100 --cpu-throttling --allow-unauthenticated --cpu-boost",
1574
+ "gcloud run deploy pan-test-app-stage-www --command="yarn,start" --image=asia-east1-docker.pkg.dev/asdf/catladder-deploy/pan-test-app/stage/www:$DOCKER_IMAGE_TAG --project=asdf --region=asia-east1 --labels=customer-name=pan,component-name=www,app-name=test-app,env-type=stage,env-name=stage,build-type=node --env-vars-file=____envvars.yaml --min-instances=0 --max-instances=100 --cpu-throttling --allow-unauthenticated --ingress=all --cpu-boost",
1535
1575
  "echo -e "\\e[0Ksection_end:$(date +%s):deploy\\r\\e[0K"",
1536
1576
  "echo -e "\\e[0Ksection_start:$(date +%s):cleanup[collapsed=true]\\r\\e[0KCleanup"",
1537
1577
  "gcloud run revisions list --project=asdf --region=asia-east1 --service=pan-test-app-stage-www --limit=unlimited --sort-by=metadata.creationTimestamp --format="value(name)" --filter='(status.conditions.status=False OR status.conditions.status=Unknown)' | while read -r revisionname; do gcloud run revisions delete --project=asdf --region=asia-east1 --quiet $revisionname ; done",
@@ -34,9 +34,13 @@ exports[`matches snapshot 1`] = `
34
34
  },
35
35
  "script": [
36
36
  "cd api",
37
+ "echo -e "\\e[0Ksection_start:$(date +%s):yarn prepare[collapsed=true]\\r\\e[0KNode and yarn install"",
38
+ "echo -e "\\e[0Ksection_start:$(date +%s):node install[collapsed=true]\\r\\e[0KEnsure node version"",
37
39
  "if [ -f ~/.nvm/nvm.sh ]; then source ~/.nvm/nvm.sh; fi",
38
40
  "if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi",
41
+ "echo -e "\\e[0Ksection_end:$(date +%s):node install\\r\\e[0K"",
39
42
  "yarn install --immutable",
43
+ "echo -e "\\e[0Ksection_end:$(date +%s):yarn prepare\\r\\e[0K"",
40
44
  "yarn lint",
41
45
  ],
42
46
  "stage": "test",
@@ -96,12 +100,18 @@ exports[`matches snapshot 1`] = `
96
100
  },
97
101
  "script": [
98
102
  "echo '{"id":"some-id","time":"01-01-2023 12:13:14"}' > api/__build_info.json",
103
+ "echo -e "\\e[0Ksection_start:$(date +%s):node install[collapsed=true]\\r\\e[0KEnsure node version"",
99
104
  "if [ -f ~/.nvm/nvm.sh ]; then source ~/.nvm/nvm.sh; fi",
100
105
  "if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi",
106
+ "echo -e "\\e[0Ksection_end:$(date +%s):node install\\r\\e[0K"",
101
107
  "cd api",
108
+ "echo -e "\\e[0Ksection_start:$(date +%s):yarn prepare[collapsed=true]\\r\\e[0KNode and yarn install"",
109
+ "echo -e "\\e[0Ksection_start:$(date +%s):node install[collapsed=true]\\r\\e[0KEnsure node version"",
102
110
  "if [ -f ~/.nvm/nvm.sh ]; then source ~/.nvm/nvm.sh; fi",
103
111
  "if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi",
112
+ "echo -e "\\e[0Ksection_end:$(date +%s):node install\\r\\e[0K"",
104
113
  "yarn install --immutable",
114
+ "echo -e "\\e[0Ksection_end:$(date +%s):yarn prepare\\r\\e[0K"",
105
115
  "yarn build",
106
116
  ],
107
117
  "stage": "build",
@@ -241,9 +251,13 @@ exports[`matches snapshot 1`] = `
241
251
  },
242
252
  "script": [
243
253
  "cd api",
254
+ "echo -e "\\e[0Ksection_start:$(date +%s):yarn prepare[collapsed=true]\\r\\e[0KNode and yarn install"",
255
+ "echo -e "\\e[0Ksection_start:$(date +%s):node install[collapsed=true]\\r\\e[0KEnsure node version"",
244
256
  "if [ -f ~/.nvm/nvm.sh ]; then source ~/.nvm/nvm.sh; fi",
245
257
  "if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi",
258
+ "echo -e "\\e[0Ksection_end:$(date +%s):node install\\r\\e[0K"",
246
259
  "yarn install --immutable",
260
+ "echo -e "\\e[0Ksection_end:$(date +%s):yarn prepare\\r\\e[0K"",
247
261
  "yarn test",
248
262
  ],
249
263
  "stage": "test",
@@ -307,9 +321,13 @@ exports[`matches snapshot 1`] = `
307
321
  },
308
322
  "script": [
309
323
  "cd www",
324
+ "echo -e "\\e[0Ksection_start:$(date +%s):yarn prepare[collapsed=true]\\r\\e[0KNode and yarn install"",
325
+ "echo -e "\\e[0Ksection_start:$(date +%s):node install[collapsed=true]\\r\\e[0KEnsure node version"",
310
326
  "if [ -f ~/.nvm/nvm.sh ]; then source ~/.nvm/nvm.sh; fi",
311
327
  "if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi",
328
+ "echo -e "\\e[0Ksection_end:$(date +%s):node install\\r\\e[0K"",
312
329
  "yarn install --immutable",
330
+ "echo -e "\\e[0Ksection_end:$(date +%s):yarn prepare\\r\\e[0K"",
313
331
  "yarn lint",
314
332
  ],
315
333
  "stage": "test",
@@ -369,12 +387,18 @@ exports[`matches snapshot 1`] = `
369
387
  },
370
388
  "script": [
371
389
  "echo '{"id":"some-id","time":"01-01-2023 12:13:14"}' > www/__build_info.json",
390
+ "echo -e "\\e[0Ksection_start:$(date +%s):node install[collapsed=true]\\r\\e[0KEnsure node version"",
372
391
  "if [ -f ~/.nvm/nvm.sh ]; then source ~/.nvm/nvm.sh; fi",
373
392
  "if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi",
393
+ "echo -e "\\e[0Ksection_end:$(date +%s):node install\\r\\e[0K"",
374
394
  "cd www",
395
+ "echo -e "\\e[0Ksection_start:$(date +%s):yarn prepare[collapsed=true]\\r\\e[0KNode and yarn install"",
396
+ "echo -e "\\e[0Ksection_start:$(date +%s):node install[collapsed=true]\\r\\e[0KEnsure node version"",
375
397
  "if [ -f ~/.nvm/nvm.sh ]; then source ~/.nvm/nvm.sh; fi",
376
398
  "if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi",
399
+ "echo -e "\\e[0Ksection_end:$(date +%s):node install\\r\\e[0K"",
377
400
  "yarn install --immutable",
401
+ "echo -e "\\e[0Ksection_end:$(date +%s):yarn prepare\\r\\e[0K"",
378
402
  "yarn build",
379
403
  ],
380
404
  "stage": "build",
@@ -518,9 +542,13 @@ exports[`matches snapshot 1`] = `
518
542
  },
519
543
  "script": [
520
544
  "cd www",
545
+ "echo -e "\\e[0Ksection_start:$(date +%s):yarn prepare[collapsed=true]\\r\\e[0KNode and yarn install"",
546
+ "echo -e "\\e[0Ksection_start:$(date +%s):node install[collapsed=true]\\r\\e[0KEnsure node version"",
521
547
  "if [ -f ~/.nvm/nvm.sh ]; then source ~/.nvm/nvm.sh; fi",
522
548
  "if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi",
549
+ "echo -e "\\e[0Ksection_end:$(date +%s):node install\\r\\e[0K"",
523
550
  "yarn install --immutable",
551
+ "echo -e "\\e[0Ksection_end:$(date +%s):yarn prepare\\r\\e[0K"",
524
552
  "yarn test",
525
553
  ],
526
554
  "stage": "test",
@@ -656,9 +684,13 @@ exports[`matches snapshot 1`] = `
656
684
  },
657
685
  "script": [
658
686
  "cd api",
687
+ "echo -e "\\e[0Ksection_start:$(date +%s):yarn prepare[collapsed=true]\\r\\e[0KNode and yarn install"",
688
+ "echo -e "\\e[0Ksection_start:$(date +%s):node install[collapsed=true]\\r\\e[0KEnsure node version"",
659
689
  "if [ -f ~/.nvm/nvm.sh ]; then source ~/.nvm/nvm.sh; fi",
660
690
  "if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi",
691
+ "echo -e "\\e[0Ksection_end:$(date +%s):node install\\r\\e[0K"",
661
692
  "yarn install --immutable",
693
+ "echo -e "\\e[0Ksection_end:$(date +%s):yarn prepare\\r\\e[0K"",
662
694
  "yarn lint",
663
695
  ],
664
696
  "stage": "test",
@@ -718,12 +750,18 @@ exports[`matches snapshot 1`] = `
718
750
  },
719
751
  "script": [
720
752
  "echo '{"id":"some-id","time":"01-01-2023 12:13:14"}' > api/__build_info.json",
753
+ "echo -e "\\e[0Ksection_start:$(date +%s):node install[collapsed=true]\\r\\e[0KEnsure node version"",
721
754
  "if [ -f ~/.nvm/nvm.sh ]; then source ~/.nvm/nvm.sh; fi",
722
755
  "if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi",
756
+ "echo -e "\\e[0Ksection_end:$(date +%s):node install\\r\\e[0K"",
723
757
  "cd api",
758
+ "echo -e "\\e[0Ksection_start:$(date +%s):yarn prepare[collapsed=true]\\r\\e[0KNode and yarn install"",
759
+ "echo -e "\\e[0Ksection_start:$(date +%s):node install[collapsed=true]\\r\\e[0KEnsure node version"",
724
760
  "if [ -f ~/.nvm/nvm.sh ]; then source ~/.nvm/nvm.sh; fi",
725
761
  "if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi",
762
+ "echo -e "\\e[0Ksection_end:$(date +%s):node install\\r\\e[0K"",
726
763
  "yarn install --immutable",
764
+ "echo -e "\\e[0Ksection_end:$(date +%s):yarn prepare\\r\\e[0K"",
727
765
  "yarn build",
728
766
  ],
729
767
  "stage": "build",
@@ -863,9 +901,13 @@ exports[`matches snapshot 1`] = `
863
901
  },
864
902
  "script": [
865
903
  "cd api",
904
+ "echo -e "\\e[0Ksection_start:$(date +%s):yarn prepare[collapsed=true]\\r\\e[0KNode and yarn install"",
905
+ "echo -e "\\e[0Ksection_start:$(date +%s):node install[collapsed=true]\\r\\e[0KEnsure node version"",
866
906
  "if [ -f ~/.nvm/nvm.sh ]; then source ~/.nvm/nvm.sh; fi",
867
907
  "if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi",
908
+ "echo -e "\\e[0Ksection_end:$(date +%s):node install\\r\\e[0K"",
868
909
  "yarn install --immutable",
910
+ "echo -e "\\e[0Ksection_end:$(date +%s):yarn prepare\\r\\e[0K"",
869
911
  "yarn test",
870
912
  ],
871
913
  "stage": "test",
@@ -929,9 +971,13 @@ exports[`matches snapshot 1`] = `
929
971
  },
930
972
  "script": [
931
973
  "cd www",
974
+ "echo -e "\\e[0Ksection_start:$(date +%s):yarn prepare[collapsed=true]\\r\\e[0KNode and yarn install"",
975
+ "echo -e "\\e[0Ksection_start:$(date +%s):node install[collapsed=true]\\r\\e[0KEnsure node version"",
932
976
  "if [ -f ~/.nvm/nvm.sh ]; then source ~/.nvm/nvm.sh; fi",
933
977
  "if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi",
978
+ "echo -e "\\e[0Ksection_end:$(date +%s):node install\\r\\e[0K"",
934
979
  "yarn install --immutable",
980
+ "echo -e "\\e[0Ksection_end:$(date +%s):yarn prepare\\r\\e[0K"",
935
981
  "yarn lint",
936
982
  ],
937
983
  "stage": "test",
@@ -991,12 +1037,18 @@ exports[`matches snapshot 1`] = `
991
1037
  },
992
1038
  "script": [
993
1039
  "echo '{"id":"some-id","time":"01-01-2023 12:13:14"}' > www/__build_info.json",
1040
+ "echo -e "\\e[0Ksection_start:$(date +%s):node install[collapsed=true]\\r\\e[0KEnsure node version"",
994
1041
  "if [ -f ~/.nvm/nvm.sh ]; then source ~/.nvm/nvm.sh; fi",
995
1042
  "if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi",
1043
+ "echo -e "\\e[0Ksection_end:$(date +%s):node install\\r\\e[0K"",
996
1044
  "cd www",
1045
+ "echo -e "\\e[0Ksection_start:$(date +%s):yarn prepare[collapsed=true]\\r\\e[0KNode and yarn install"",
1046
+ "echo -e "\\e[0Ksection_start:$(date +%s):node install[collapsed=true]\\r\\e[0KEnsure node version"",
997
1047
  "if [ -f ~/.nvm/nvm.sh ]; then source ~/.nvm/nvm.sh; fi",
998
1048
  "if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi",
1049
+ "echo -e "\\e[0Ksection_end:$(date +%s):node install\\r\\e[0K"",
999
1050
  "yarn install --immutable",
1051
+ "echo -e "\\e[0Ksection_end:$(date +%s):yarn prepare\\r\\e[0K"",
1000
1052
  "yarn build",
1001
1053
  ],
1002
1054
  "stage": "build",
@@ -1140,9 +1192,13 @@ exports[`matches snapshot 1`] = `
1140
1192
  },
1141
1193
  "script": [
1142
1194
  "cd www",
1195
+ "echo -e "\\e[0Ksection_start:$(date +%s):yarn prepare[collapsed=true]\\r\\e[0KNode and yarn install"",
1196
+ "echo -e "\\e[0Ksection_start:$(date +%s):node install[collapsed=true]\\r\\e[0KEnsure node version"",
1143
1197
  "if [ -f ~/.nvm/nvm.sh ]; then source ~/.nvm/nvm.sh; fi",
1144
1198
  "if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi",
1199
+ "echo -e "\\e[0Ksection_end:$(date +%s):node install\\r\\e[0K"",
1145
1200
  "yarn install --immutable",
1201
+ "echo -e "\\e[0Ksection_end:$(date +%s):yarn prepare\\r\\e[0K"",
1146
1202
  "yarn test",
1147
1203
  ],
1148
1204
  "stage": "test",
@@ -1297,12 +1353,18 @@ exports[`matches snapshot 1`] = `
1297
1353
  },
1298
1354
  "script": [
1299
1355
  "echo '{"id":"some-id","time":"01-01-2023 12:13:14"}' > api/__build_info.json",
1356
+ "echo -e "\\e[0Ksection_start:$(date +%s):node install[collapsed=true]\\r\\e[0KEnsure node version"",
1300
1357
  "if [ -f ~/.nvm/nvm.sh ]; then source ~/.nvm/nvm.sh; fi",
1301
1358
  "if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi",
1359
+ "echo -e "\\e[0Ksection_end:$(date +%s):node install\\r\\e[0K"",
1302
1360
  "cd api",
1361
+ "echo -e "\\e[0Ksection_start:$(date +%s):yarn prepare[collapsed=true]\\r\\e[0KNode and yarn install"",
1362
+ "echo -e "\\e[0Ksection_start:$(date +%s):node install[collapsed=true]\\r\\e[0KEnsure node version"",
1303
1363
  "if [ -f ~/.nvm/nvm.sh ]; then source ~/.nvm/nvm.sh; fi",
1304
1364
  "if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi",
1365
+ "echo -e "\\e[0Ksection_end:$(date +%s):node install\\r\\e[0K"",
1305
1366
  "yarn install --immutable",
1367
+ "echo -e "\\e[0Ksection_end:$(date +%s):yarn prepare\\r\\e[0K"",
1306
1368
  "yarn build",
1307
1369
  ],
1308
1370
  "stage": "build",
@@ -1370,12 +1432,18 @@ exports[`matches snapshot 1`] = `
1370
1432
  },
1371
1433
  "script": [
1372
1434
  "echo '{"id":"some-id","time":"01-01-2023 12:13:14"}' > api/__build_info.json",
1435
+ "echo -e "\\e[0Ksection_start:$(date +%s):node install[collapsed=true]\\r\\e[0KEnsure node version"",
1373
1436
  "if [ -f ~/.nvm/nvm.sh ]; then source ~/.nvm/nvm.sh; fi",
1374
1437
  "if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi",
1438
+ "echo -e "\\e[0Ksection_end:$(date +%s):node install\\r\\e[0K"",
1375
1439
  "cd api",
1440
+ "echo -e "\\e[0Ksection_start:$(date +%s):yarn prepare[collapsed=true]\\r\\e[0KNode and yarn install"",
1441
+ "echo -e "\\e[0Ksection_start:$(date +%s):node install[collapsed=true]\\r\\e[0KEnsure node version"",
1376
1442
  "if [ -f ~/.nvm/nvm.sh ]; then source ~/.nvm/nvm.sh; fi",
1377
1443
  "if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi",
1444
+ "echo -e "\\e[0Ksection_end:$(date +%s):node install\\r\\e[0K"",
1378
1445
  "yarn install --immutable",
1446
+ "echo -e "\\e[0Ksection_end:$(date +%s):yarn prepare\\r\\e[0K"",
1379
1447
  "yarn build",
1380
1448
  ],
1381
1449
  "stage": "build",
@@ -1597,12 +1665,18 @@ exports[`matches snapshot 1`] = `
1597
1665
  },
1598
1666
  "script": [
1599
1667
  "echo '{"id":"some-id","time":"01-01-2023 12:13:14"}' > www/__build_info.json",
1668
+ "echo -e "\\e[0Ksection_start:$(date +%s):node install[collapsed=true]\\r\\e[0KEnsure node version"",
1600
1669
  "if [ -f ~/.nvm/nvm.sh ]; then source ~/.nvm/nvm.sh; fi",
1601
1670
  "if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi",
1671
+ "echo -e "\\e[0Ksection_end:$(date +%s):node install\\r\\e[0K"",
1602
1672
  "cd www",
1673
+ "echo -e "\\e[0Ksection_start:$(date +%s):yarn prepare[collapsed=true]\\r\\e[0KNode and yarn install"",
1674
+ "echo -e "\\e[0Ksection_start:$(date +%s):node install[collapsed=true]\\r\\e[0KEnsure node version"",
1603
1675
  "if [ -f ~/.nvm/nvm.sh ]; then source ~/.nvm/nvm.sh; fi",
1604
1676
  "if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi",
1677
+ "echo -e "\\e[0Ksection_end:$(date +%s):node install\\r\\e[0K"",
1605
1678
  "yarn install --immutable",
1679
+ "echo -e "\\e[0Ksection_end:$(date +%s):yarn prepare\\r\\e[0K"",
1606
1680
  "yarn build",
1607
1681
  ],
1608
1682
  "stage": "build",
@@ -1670,12 +1744,18 @@ exports[`matches snapshot 1`] = `
1670
1744
  },
1671
1745
  "script": [
1672
1746
  "echo '{"id":"some-id","time":"01-01-2023 12:13:14"}' > www/__build_info.json",
1747
+ "echo -e "\\e[0Ksection_start:$(date +%s):node install[collapsed=true]\\r\\e[0KEnsure node version"",
1673
1748
  "if [ -f ~/.nvm/nvm.sh ]; then source ~/.nvm/nvm.sh; fi",
1674
1749
  "if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi",
1750
+ "echo -e "\\e[0Ksection_end:$(date +%s):node install\\r\\e[0K"",
1675
1751
  "cd www",
1752
+ "echo -e "\\e[0Ksection_start:$(date +%s):yarn prepare[collapsed=true]\\r\\e[0KNode and yarn install"",
1753
+ "echo -e "\\e[0Ksection_start:$(date +%s):node install[collapsed=true]\\r\\e[0KEnsure node version"",
1676
1754
  "if [ -f ~/.nvm/nvm.sh ]; then source ~/.nvm/nvm.sh; fi",
1677
1755
  "if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi",
1756
+ "echo -e "\\e[0Ksection_end:$(date +%s):node install\\r\\e[0K"",
1678
1757
  "yarn install --immutable",
1758
+ "echo -e "\\e[0Ksection_end:$(date +%s):yarn prepare\\r\\e[0K"",
1679
1759
  "yarn build",
1680
1760
  ],
1681
1761
  "stage": "build",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@catladder/pipeline",
3
- "version": "1.119.0",
3
+ "version": "1.121.0",
4
4
  "scripts": {
5
5
  "build:tsc": "yarn tsc",
6
6
  "build": "yarn build:compile && yarn build:inline-variables && yarn build:bundle",
@@ -1,5 +1,6 @@
1
1
  import type { Context } from "../../types";
2
2
  import { ensureArray } from "../../utils";
3
+ import { collapseableSection } from "../../utils/gitlab";
3
4
 
4
5
  const YARN_INSTALL_CLASSIC = `yarn install --frozen-lockfile`;
5
6
 
@@ -14,10 +15,14 @@ const getYarnInstallCommand = (context: Context) => {
14
15
  return `yarn install --immutable`;
15
16
  };
16
17
 
17
- export const ensureNodeVersion = (context: Context) => [
18
- "if [ -f ~/.nvm/nvm.sh ]; then source ~/.nvm/nvm.sh; fi",
19
- "if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi",
20
- ];
18
+ export const ensureNodeVersion = (context: Context) =>
19
+ collapseableSection(
20
+ "node install",
21
+ "Ensure node version"
22
+ )([
23
+ "if [ -f ~/.nvm/nvm.sh ]; then source ~/.nvm/nvm.sh; fi",
24
+ "if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi",
25
+ ]);
21
26
 
22
27
  export const getYarnInstall = (
23
28
  context: Context,
@@ -29,13 +34,16 @@ export const getYarnInstall = (
29
34
  "postInstall" in context.componentConfig.build
30
35
  ? context.componentConfig.build.postInstall
31
36
  : null;
32
- return [
37
+ return collapseableSection(
38
+ "yarn prepare",
39
+ "Node and yarn install"
40
+ )([
33
41
  ...ensureNodeVersion(context),
34
42
  getYarnInstallCommand(context),
35
43
  ...(postInstall && !options?.noCustomPostInstall
36
44
  ? ensureArray(postInstall) ?? []
37
45
  : []),
38
- ];
46
+ ]);
39
47
  };
40
48
 
41
49
  const DOCKER_COPY_FILES = `COPY --chown=node:node $APP_DIR .`;
@@ -122,6 +122,7 @@ export const createGoogleCloudRunDeployJobs = (
122
122
  "cpu-throttling": customConfig?.noCpuThrottling !== true,
123
123
  memory: customConfig?.memory,
124
124
  "allow-unauthenticated": customConfig?.allowUnauthenticated ?? true,
125
+ ingress: customConfig?.ingress ?? "all",
125
126
  "cpu-boost": true,
126
127
  });
127
128
 
@@ -97,10 +97,22 @@ export type DeployConfigCloudRunService = {
97
97
  noCpuThrottling?: true;
98
98
 
99
99
  /**
100
- * whether to allow public access (defaults to true)
100
+ * whether to allow public access without authentification (defaults to true)
101
101
  */
102
102
  allowUnauthenticated?: boolean;
103
103
 
104
+ /**
105
+ * whether to expose the service to the internet.
106
+ *
107
+ * The options are:
108
+ * - all: expose to the internet and internal traffic
109
+ * - internal: only expose to internal traffic
110
+ * - internal-and-cloud-load-balancing: expose to internal traffic and cloud load balancing
111
+ *
112
+ * Defaults to "all"
113
+ */
114
+ ingress?: "all" | "internal" | "internal-and-cloud-load-balancing";
115
+
104
116
  /**
105
117
  * memory limit. Defaults to 512MB
106
118
  */