@catladder/pipeline 3.13.0 → 3.14.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 (107) hide show
  1. package/dist/bash/bashEscape.d.ts +2 -0
  2. package/dist/bash/bashEscape.js +9 -1
  3. package/dist/constants.js +1 -1
  4. package/dist/pipeline/agent/createAgentContext.d.ts +6 -0
  5. package/dist/pipeline/agent/createAgentContext.js +141 -0
  6. package/dist/pipeline/agent/createAgentEventJob.d.ts +2 -0
  7. package/dist/pipeline/agent/createAgentEventJob.js +74 -0
  8. package/dist/pipeline/agent/createAgentReviewJob.d.ts +2 -0
  9. package/dist/pipeline/agent/createAgentReviewJob.js +69 -0
  10. package/dist/pipeline/agent/createJobsForAgentContext.d.ts +2 -0
  11. package/dist/pipeline/agent/createJobsForAgentContext.js +12 -0
  12. package/dist/pipeline/agent/prompts.d.ts +10 -0
  13. package/dist/pipeline/agent/prompts.js +66 -0
  14. package/dist/pipeline/agent/shared.d.ts +8 -0
  15. package/dist/pipeline/agent/shared.js +29 -0
  16. package/dist/pipeline/agent/utils.d.ts +3 -0
  17. package/dist/pipeline/agent/utils.js +16 -0
  18. package/dist/pipeline/createAllJobs.d.ts +5 -1
  19. package/dist/pipeline/createAllJobs.js +32 -6
  20. package/dist/pipeline/createMainPipeline.js +10 -5
  21. package/dist/pipeline/gitlab/createGitlabJobs.d.ts +3 -3
  22. package/dist/pipeline/gitlab/createGitlabJobs.js +13 -11
  23. package/dist/pipeline/gitlab/createGitlabPipeline.js +7 -1
  24. package/dist/rules/index.d.ts +1 -0
  25. package/dist/rules/index.js +8 -3
  26. package/dist/tsconfig.tsbuildinfo +1 -1
  27. package/dist/types/agent.d.ts +7 -0
  28. package/dist/types/agent.js +5 -0
  29. package/dist/types/config.d.ts +2 -0
  30. package/dist/types/context.d.ts +7 -0
  31. package/dist/types/index.d.ts +2 -1
  32. package/dist/types/index.js +2 -1
  33. package/dist/types/jobs.d.ts +5 -1
  34. package/dist/types/jobs.js +1 -1
  35. package/examples/__snapshots__/cloud-run-health-check-defaults.test.ts.snap +66 -1
  36. package/examples/__snapshots__/cloud-run-health-check-only-startup.test.ts.snap +66 -1
  37. package/examples/__snapshots__/cloud-run-health-check.test.ts.snap +66 -1
  38. package/examples/__snapshots__/cloud-run-http2.test.ts.snap +66 -1
  39. package/examples/__snapshots__/cloud-run-llama.test.ts.snap +30 -1
  40. package/examples/__snapshots__/cloud-run-memory-limit.test.ts.snap +66 -1
  41. package/examples/__snapshots__/cloud-run-meteor-with-worker.test.ts.snap +66 -1
  42. package/examples/__snapshots__/cloud-run-nextjs.test.ts.snap +66 -1
  43. package/examples/__snapshots__/cloud-run-no-cpu-throttling.test.ts.snap +66 -1
  44. package/examples/__snapshots__/cloud-run-no-service.test.ts.snap +66 -1
  45. package/examples/__snapshots__/cloud-run-non-public.test.ts.snap +66 -1
  46. package/examples/__snapshots__/cloud-run-post-stop-job.test.ts.snap +66 -1
  47. package/examples/__snapshots__/cloud-run-service-custom-vpc-connector.test.ts.snap +66 -1
  48. package/examples/__snapshots__/cloud-run-service-custom-vpc.test.ts.snap +66 -1
  49. package/examples/__snapshots__/cloud-run-service-gen2.test.ts.snap +66 -1
  50. package/examples/__snapshots__/cloud-run-service-increase-timout.test.ts.snap +66 -1
  51. package/examples/__snapshots__/cloud-run-service-with-volumes.test.ts.snap +66 -1
  52. package/examples/__snapshots__/cloud-run-storybook.test.ts.snap +54 -1
  53. package/examples/__snapshots__/cloud-run-with-agents.test.ts.snap +1576 -0
  54. package/examples/__snapshots__/cloud-run-with-gpu.test.ts.snap +66 -1
  55. package/examples/__snapshots__/cloud-run-with-ngnix.test.ts.snap +66 -1
  56. package/examples/__snapshots__/cloud-run-with-sql-legacy-jobs.test.ts.snap +66 -1
  57. package/examples/__snapshots__/cloud-run-with-sql-multiple-dbs.test.ts.snap +170 -1
  58. package/examples/__snapshots__/cloud-run-with-sql-reuse-db.test.ts.snap +118 -1
  59. package/examples/__snapshots__/cloud-run-with-sql.test.ts.snap +66 -1
  60. package/examples/__snapshots__/cloud-run-with-worker.test.ts.snap +66 -1
  61. package/examples/__snapshots__/custom-build-job-with-tests.test.ts.snap +66 -1
  62. package/examples/__snapshots__/custom-build-job.test.ts.snap +54 -1
  63. package/examples/__snapshots__/custom-deploy.test.ts.snap +60 -1
  64. package/examples/__snapshots__/custom-envs.test.ts.snap +64 -1
  65. package/examples/__snapshots__/custom-sbom-java.test.ts.snap +54 -1
  66. package/examples/__snapshots__/custom-verify-job.test.ts.snap +74 -1
  67. package/examples/__snapshots__/git-submodule.test.ts.snap +66 -1
  68. package/examples/__snapshots__/kubernetes-application-customization.test.ts.snap +74 -1
  69. package/examples/__snapshots__/kubernetes-with-cloud-sql.test.ts.snap +74 -1
  70. package/examples/__snapshots__/kubernetes-with-jobs.test.ts.snap +134 -1
  71. package/examples/__snapshots__/kubernetes-with-mongodb.test.ts.snap +74 -1
  72. package/examples/__snapshots__/local-dot-env.test.ts.snap +66 -1
  73. package/examples/__snapshots__/meteor-kubernetes.test.ts.snap +74 -1
  74. package/examples/__snapshots__/multiline-var.test.ts.snap +178 -1
  75. package/examples/__snapshots__/native-app.test.ts.snap +102 -1
  76. package/examples/__snapshots__/node-build-with-custom-image.test.ts.snap +66 -1
  77. package/examples/__snapshots__/node-build-with-docker-additions.test.ts.snap +66 -1
  78. package/examples/__snapshots__/override-secrets.test.ts.snap +66 -1
  79. package/examples/__snapshots__/rails-k8s-with-worker-dockerfile.test.ts.snap +66 -1
  80. package/examples/__snapshots__/rails-k8s-with-worker.test.ts.snap +66 -1
  81. package/examples/__snapshots__/referencing-other-vars.test.ts.snap +178 -1
  82. package/examples/__snapshots__/wait-for-other-deploy.test.ts.snap +86 -1
  83. package/examples/__snapshots__/workspace-api-www-turbo-cache.test.ts.snap +98 -1
  84. package/examples/__snapshots__/workspace-api-www.test.ts.snap +98 -1
  85. package/examples/cloud-run-with-agents.test.ts +11 -0
  86. package/examples/cloud-run-with-agents.ts +36 -0
  87. package/package.json +1 -1
  88. package/src/bash/bashEscape.ts +6 -0
  89. package/src/pipeline/__tests__/__snapshots__/getPipelineStages.test.ts.snap +9 -0
  90. package/src/pipeline/agent/createAgentContext.ts +19 -0
  91. package/src/pipeline/agent/createAgentEventJob.ts +35 -0
  92. package/src/pipeline/agent/createAgentReviewJob.ts +33 -0
  93. package/src/pipeline/agent/createJobsForAgentContext.ts +7 -0
  94. package/src/pipeline/agent/prompts.ts +233 -0
  95. package/src/pipeline/agent/shared.ts +36 -0
  96. package/src/pipeline/agent/utils.ts +9 -0
  97. package/src/pipeline/createAllJobs.ts +20 -1
  98. package/src/pipeline/createJobsForComponent.ts +1 -0
  99. package/src/pipeline/createMainPipeline.ts +19 -4
  100. package/src/pipeline/gitlab/createGitlabJobs.ts +39 -30
  101. package/src/pipeline/gitlab/createGitlabPipeline.ts +9 -1
  102. package/src/rules/index.ts +7 -0
  103. package/src/types/agent.ts +7 -0
  104. package/src/types/config.ts +3 -0
  105. package/src/types/context.ts +8 -0
  106. package/src/types/index.ts +1 -0
  107. package/src/types/jobs.ts +6 -0
@@ -28,6 +28,11 @@ stages:
28
28
  - verify review
29
29
  - verify stage
30
30
  - verify prod
31
+ - agents
32
+ - agents dev
33
+ - agents review
34
+ - agents stage
35
+ - agents prod
31
36
  - rollback
32
37
  - rollback dev
33
38
  - rollback review
@@ -48,6 +53,10 @@ variables:
48
53
  workflow:
49
54
  name: $PIPELINE_ICON $PIPELINE_NAME
50
55
  rules:
56
+ - if: $CI_PIPELINE_SOURCE == "trigger"
57
+ variables:
58
+ PIPELINE_ICON: 🤖
59
+ PIPELINE_NAME: Thinking...
51
60
  - if: $CI_MERGE_REQUEST_ID
52
61
  variables:
53
62
  PIPELINE_ICON: 🐱🔨
@@ -59,7 +68,7 @@ workflow:
59
68
  - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && $CI_COMMIT_MESSAGE !~ /^chore\\(release\\).*/
60
69
  variables:
61
70
  PIPELINE_ICON: 🐱🔨
62
- PIPELINE_NAME: Main $CI_COMMIT_REF_NAME
71
+ PIPELINE_NAME: Main
63
72
  - when: always
64
73
  variables:
65
74
  PIPELINE_ICON: 🐱❓
@@ -170,6 +179,8 @@ before_script:
170
179
  when: always
171
180
  reports: {}
172
181
  rules:
182
+ - when: never
183
+ if: $CI_PIPELINE_SOURCE == "trigger"
173
184
  - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && $CI_COMMIT_MESSAGE !~ /^chore\\(release\\).*/
174
185
  needs: []
175
186
  retry: &a1
@@ -231,6 +242,8 @@ before_script:
231
242
  paths:
232
243
  - app/.yarn
233
244
  rules:
245
+ - when: never
246
+ if: $CI_PIPELINE_SOURCE == "trigger"
234
247
  - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && $CI_COMMIT_MESSAGE !~ /^chore\\(release\\).*/
235
248
  needs:
236
249
  - 'api 🔨 app | dev '
@@ -251,6 +264,8 @@ before_script:
251
264
  paths:
252
265
  - __sbom.json
253
266
  rules:
267
+ - when: never
268
+ if: $CI_PIPELINE_SOURCE == "trigger"
254
269
  - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && $CI_COMMIT_MESSAGE !~ /^chore\\(release\\).*/
255
270
  needs: []
256
271
  retry: *a1
@@ -347,6 +362,8 @@ before_script:
347
362
  reports:
348
363
  dotenv: gitlab_environment.env
349
364
  rules:
365
+ - when: never
366
+ if: $CI_PIPELINE_SOURCE == "trigger"
350
367
  - when: on_success
351
368
  if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && $CI_COMMIT_MESSAGE !~ /^chore\\(release\\).*/
352
369
  needs:
@@ -385,6 +402,8 @@ before_script:
385
402
  rules:
386
403
  - if: $CI_COMMIT_BRANCH =~ /^[0-9]+\\.([0-9]+|x)\\.x$/
387
404
  when: on_success
405
+ - when: never
406
+ if: $CI_PIPELINE_SOURCE == "trigger"
388
407
  - when: manual
389
408
  if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && $CI_COMMIT_MESSAGE !~ /^chore\\(release\\).*/
390
409
  needs: []
@@ -467,6 +486,8 @@ before_script:
467
486
  when: always
468
487
  reports: {}
469
488
  rules:
489
+ - when: never
490
+ if: $CI_PIPELINE_SOURCE == "trigger"
470
491
  - if: $CI_MERGE_REQUEST_ID
471
492
  needs: []
472
493
  retry: *a1
@@ -524,6 +545,8 @@ before_script:
524
545
  paths:
525
546
  - app/.yarn
526
547
  rules:
548
+ - when: never
549
+ if: $CI_PIPELINE_SOURCE == "trigger"
527
550
  - if: $CI_MERGE_REQUEST_ID
528
551
  needs:
529
552
  - 'api 🔨 app | review '
@@ -544,6 +567,8 @@ before_script:
544
567
  paths:
545
568
  - __sbom.json
546
569
  rules:
570
+ - when: never
571
+ if: $CI_PIPELINE_SOURCE == "trigger"
547
572
  - if: $CI_MERGE_REQUEST_ID
548
573
  needs: []
549
574
  retry: *a1
@@ -643,6 +668,8 @@ before_script:
643
668
  reports:
644
669
  dotenv: gitlab_environment.env
645
670
  rules:
671
+ - when: never
672
+ if: $CI_PIPELINE_SOURCE == "trigger"
646
673
  - when: on_success
647
674
  if: $CI_MERGE_REQUEST_ID
648
675
  needs:
@@ -684,6 +711,8 @@ before_script:
684
711
  rules:
685
712
  - if: $CI_COMMIT_BRANCH =~ /^[0-9]+\\.([0-9]+|x)\\.x$/
686
713
  when: on_success
714
+ - when: never
715
+ if: $CI_PIPELINE_SOURCE == "trigger"
687
716
  - when: manual
688
717
  if: $CI_MERGE_REQUEST_ID
689
718
  needs: []
@@ -766,6 +795,8 @@ before_script:
766
795
  when: always
767
796
  reports: {}
768
797
  rules:
798
+ - when: never
799
+ if: $CI_PIPELINE_SOURCE == "trigger"
769
800
  - if: $CI_COMMIT_TAG
770
801
  needs: []
771
802
  retry: *a1
@@ -823,6 +854,8 @@ before_script:
823
854
  paths:
824
855
  - app/.yarn
825
856
  rules:
857
+ - when: never
858
+ if: $CI_PIPELINE_SOURCE == "trigger"
826
859
  - if: $CI_COMMIT_TAG
827
860
  needs:
828
861
  - 'api 🔨 app | stage '
@@ -843,6 +876,8 @@ before_script:
843
876
  paths:
844
877
  - __sbom.json
845
878
  rules:
879
+ - when: never
880
+ if: $CI_PIPELINE_SOURCE == "trigger"
846
881
  - if: $CI_COMMIT_TAG
847
882
  needs: []
848
883
  retry: *a1
@@ -938,6 +973,8 @@ before_script:
938
973
  reports:
939
974
  dotenv: gitlab_environment.env
940
975
  rules:
976
+ - when: never
977
+ if: $CI_PIPELINE_SOURCE == "trigger"
941
978
  - when: on_success
942
979
  if: $CI_COMMIT_TAG
943
980
  needs:
@@ -976,6 +1013,8 @@ before_script:
976
1013
  rules:
977
1014
  - if: $CI_COMMIT_BRANCH =~ /^[0-9]+\\.([0-9]+|x)\\.x$/
978
1015
  when: on_success
1016
+ - when: never
1017
+ if: $CI_PIPELINE_SOURCE == "trigger"
979
1018
  - when: manual
980
1019
  if: $CI_COMMIT_TAG
981
1020
  needs: []
@@ -1058,6 +1097,8 @@ before_script:
1058
1097
  when: always
1059
1098
  reports: {}
1060
1099
  rules:
1100
+ - when: never
1101
+ if: $CI_PIPELINE_SOURCE == "trigger"
1061
1102
  - if: $CI_COMMIT_TAG
1062
1103
  needs: []
1063
1104
  retry: *a1
@@ -1115,6 +1156,8 @@ before_script:
1115
1156
  paths:
1116
1157
  - app/.yarn
1117
1158
  rules:
1159
+ - when: never
1160
+ if: $CI_PIPELINE_SOURCE == "trigger"
1118
1161
  - if: $CI_COMMIT_TAG
1119
1162
  needs:
1120
1163
  - 'api 🔨 app | prod '
@@ -1135,6 +1178,8 @@ before_script:
1135
1178
  paths:
1136
1179
  - __sbom.json
1137
1180
  rules:
1181
+ - when: never
1182
+ if: $CI_PIPELINE_SOURCE == "trigger"
1138
1183
  - if: $CI_COMMIT_TAG
1139
1184
  needs: []
1140
1185
  retry: *a1
@@ -1230,6 +1275,8 @@ before_script:
1230
1275
  reports:
1231
1276
  dotenv: gitlab_environment.env
1232
1277
  rules:
1278
+ - when: never
1279
+ if: $CI_PIPELINE_SOURCE == "trigger"
1233
1280
  - when: manual
1234
1281
  if: $CI_COMMIT_TAG
1235
1282
  needs:
@@ -1268,6 +1315,8 @@ before_script:
1268
1315
  rules:
1269
1316
  - if: $CI_COMMIT_BRANCH =~ /^[0-9]+\\.([0-9]+|x)\\.x$/
1270
1317
  when: on_success
1318
+ - when: never
1319
+ if: $CI_PIPELINE_SOURCE == "trigger"
1271
1320
  - when: manual
1272
1321
  if: $CI_COMMIT_TAG
1273
1322
  needs: []
@@ -1285,6 +1334,9 @@ create release:
1285
1334
  if: $CI_COMMIT_MESSAGE =~ /^chore\\(release\\).*/
1286
1335
  when: never
1287
1336
  - &a3
1337
+ if: $CI_PIPELINE_SOURCE == "trigger"
1338
+ when: never
1339
+ - &a4
1288
1340
  if: $CI_PIPELINE_SOURCE == "schedule"
1289
1341
  when: never
1290
1342
  - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && $AUTO_RELEASE == "true"
@@ -1302,6 +1354,7 @@ create release:
1302
1354
  rules:
1303
1355
  - *a2
1304
1356
  - *a3
1357
+ - *a4
1305
1358
  - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
1306
1359
  when: manual
1307
1360
  - if: $CI_COMMIT_BRANCH =~ /^[0-9]+.([0-9]+|x).x$/