@catladder/pipeline 3.25.0 โ†’ 3.27.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 (77) hide show
  1. package/dist/build/custom/testJob.js +1 -2
  2. package/dist/build/node/testJob.js +1 -2
  3. package/dist/build/node/yarn.js +3 -2
  4. package/dist/build/rails/test.js +1 -2
  5. package/dist/constants.js +1 -1
  6. package/dist/deploy/types/googleCloudRun.d.ts +1 -1
  7. package/dist/pipeline/agent/createAgentReviewJob.js +1 -0
  8. package/dist/pipeline/agent/shared.d.ts +1 -1
  9. package/dist/pipeline/agent/shared.js +0 -1
  10. package/dist/pipeline/createMainPipeline.js +1 -0
  11. package/dist/pipeline/gitlab/cache.d.ts +9 -0
  12. package/dist/pipeline/gitlab/cache.js +47 -0
  13. package/dist/pipeline/gitlab/createGitlabJobs.js +7 -7
  14. package/dist/tsconfig.tsbuildinfo +1 -1
  15. package/dist/types/jobs.d.ts +2 -3
  16. package/examples/__snapshots__/automatic-releases.test.ts.snap +141 -31
  17. package/examples/__snapshots__/cloud-run-health-check-defaults.test.ts.snap +141 -31
  18. package/examples/__snapshots__/cloud-run-health-check-only-startup.test.ts.snap +141 -31
  19. package/examples/__snapshots__/cloud-run-health-check.test.ts.snap +141 -31
  20. package/examples/__snapshots__/cloud-run-http2.test.ts.snap +141 -31
  21. package/examples/__snapshots__/cloud-run-memory-limit.test.ts.snap +141 -31
  22. package/examples/__snapshots__/cloud-run-meteor-with-worker.test.ts.snap +133 -27
  23. package/examples/__snapshots__/cloud-run-nextjs.test.ts.snap +144 -32
  24. package/examples/__snapshots__/cloud-run-no-cpu-throttling.test.ts.snap +141 -31
  25. package/examples/__snapshots__/cloud-run-no-service.test.ts.snap +141 -31
  26. package/examples/__snapshots__/cloud-run-non-public.test.ts.snap +141 -31
  27. package/examples/__snapshots__/cloud-run-post-stop-job.test.ts.snap +141 -31
  28. package/examples/__snapshots__/cloud-run-service-custom-vpc-connector.test.ts.snap +141 -31
  29. package/examples/__snapshots__/cloud-run-service-custom-vpc.test.ts.snap +141 -31
  30. package/examples/__snapshots__/cloud-run-service-gen2.test.ts.snap +141 -31
  31. package/examples/__snapshots__/cloud-run-service-increase-timout.test.ts.snap +141 -31
  32. package/examples/__snapshots__/cloud-run-service-with-volumes.test.ts.snap +141 -31
  33. package/examples/__snapshots__/cloud-run-storybook.test.ts.snap +21 -11
  34. package/examples/__snapshots__/cloud-run-with-agents.test.ts.snap +144 -32
  35. package/examples/__snapshots__/cloud-run-with-gpu.test.ts.snap +141 -31
  36. package/examples/__snapshots__/cloud-run-with-ngnix.test.ts.snap +141 -31
  37. package/examples/__snapshots__/cloud-run-with-sql-legacy-jobs.test.ts.snap +141 -31
  38. package/examples/__snapshots__/cloud-run-with-sql-multiple-dbs.test.ts.snap +423 -93
  39. package/examples/__snapshots__/cloud-run-with-sql-reuse-db.test.ts.snap +282 -62
  40. package/examples/__snapshots__/cloud-run-with-sql.test.ts.snap +141 -31
  41. package/examples/__snapshots__/cloud-run-with-worker.test.ts.snap +141 -31
  42. package/examples/__snapshots__/custom-build-job-with-tests.test.ts.snap +93 -22
  43. package/examples/__snapshots__/custom-deploy.test.ts.snap +141 -31
  44. package/examples/__snapshots__/custom-envs.test.ts.snap +328 -40
  45. package/examples/__snapshots__/custom-verify-job.test.ts.snap +144 -32
  46. package/examples/__snapshots__/git-submodule.test.ts.snap +141 -31
  47. package/examples/__snapshots__/kubernetes-application-customization.test.ts.snap +141 -31
  48. package/examples/__snapshots__/kubernetes-with-cloud-sql.test.ts.snap +141 -31
  49. package/examples/__snapshots__/kubernetes-with-jobs.test.ts.snap +282 -62
  50. package/examples/__snapshots__/kubernetes-with-mongodb.test.ts.snap +141 -31
  51. package/examples/__snapshots__/local-dot-env.test.ts.snap +141 -31
  52. package/examples/__snapshots__/meteor-kubernetes.test.ts.snap +133 -27
  53. package/examples/__snapshots__/modify-generated-files.test.ts.snap +124 -20
  54. package/examples/__snapshots__/modify-generated-yaml.test.ts.snap +124 -20
  55. package/examples/__snapshots__/multiline-var.test.ts.snap +423 -93
  56. package/examples/__snapshots__/native-app.test.ts.snap +277 -57
  57. package/examples/__snapshots__/node-build-with-custom-image.test.ts.snap +141 -31
  58. package/examples/__snapshots__/node-build-with-docker-additions.test.ts.snap +141 -31
  59. package/examples/__snapshots__/override-secrets.test.ts.snap +141 -31
  60. package/examples/__snapshots__/rails-k8s-with-worker-dockerfile.test.ts.snap +84 -22
  61. package/examples/__snapshots__/rails-k8s-with-worker.test.ts.snap +84 -22
  62. package/examples/__snapshots__/referencing-other-vars.test.ts.snap +423 -93
  63. package/examples/__snapshots__/wait-for-other-deploy.test.ts.snap +260 -52
  64. package/examples/__snapshots__/workspace-api-www-turbo-cache.test.ts.snap +161 -43
  65. package/examples/__snapshots__/workspace-api-www.test.ts.snap +161 -43
  66. package/package.json +1 -1
  67. package/src/build/custom/testJob.ts +0 -1
  68. package/src/build/node/testJob.ts +0 -1
  69. package/src/build/node/yarn.ts +3 -2
  70. package/src/build/rails/test.ts +0 -1
  71. package/src/deploy/types/googleCloudRun.ts +1 -1
  72. package/src/pipeline/agent/createAgentReviewJob.ts +1 -0
  73. package/src/pipeline/agent/shared.ts +2 -2
  74. package/src/pipeline/createMainPipeline.ts +1 -0
  75. package/src/pipeline/gitlab/cache.ts +49 -0
  76. package/src/pipeline/gitlab/createGitlabJobs.ts +7 -9
  77. package/src/types/jobs.ts +2 -3
@@ -103,7 +103,7 @@ before_script:
103
103
  local section_title="\${1}"
104
104
  echo -e "section_end:\`date +%s\`:\${section_title}\\r\\e[0K"
105
105
  }
106
- app ๐Ÿ›ก audit:
106
+ 'app ๐Ÿ›ก audit | dev ':
107
107
  stage: test
108
108
  image: ruby:3.2.1
109
109
  variables: {}
@@ -117,9 +117,6 @@ app ๐Ÿ›ก audit:
117
117
  - when: never
118
118
  if: $CI_PIPELINE_SOURCE == "trigger"
119
119
  - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && $CI_COMMIT_MESSAGE !~ /^chore\\(release\\).*/
120
- - when: never
121
- if: $CI_PIPELINE_SOURCE == "trigger"
122
- - if: $CI_MERGE_REQUEST_ID
123
120
  needs: []
124
121
  retry: &a1
125
122
  max: 2
@@ -128,7 +125,7 @@ app ๐Ÿ›ก audit:
128
125
  - stuck_or_timeout_failure
129
126
  interruptible: true
130
127
  allow_failure: true
131
- app ๐Ÿ‘ฎ lint:
128
+ 'app ๐Ÿ‘ฎ lint | dev ':
132
129
  stage: test
133
130
  image: ruby:3.2.1
134
131
  variables: {}
@@ -150,13 +147,10 @@ app ๐Ÿ‘ฎ lint:
150
147
  - when: never
151
148
  if: $CI_PIPELINE_SOURCE == "trigger"
152
149
  - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && $CI_COMMIT_MESSAGE !~ /^chore\\(release\\).*/
153
- - when: never
154
- if: $CI_PIPELINE_SOURCE == "trigger"
155
- - if: $CI_MERGE_REQUEST_ID
156
150
  needs: []
157
151
  retry: *a1
158
152
  interruptible: true
159
- app ๐Ÿงช test:
153
+ 'app ๐Ÿงช test | dev ':
160
154
  stage: test
161
155
  image: ruby:3.2.1
162
156
  services:
@@ -181,9 +175,6 @@ app ๐Ÿงช test:
181
175
  - when: never
182
176
  if: $CI_PIPELINE_SOURCE == "trigger"
183
177
  - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && $CI_COMMIT_MESSAGE !~ /^chore\\(release\\).*/
184
- - when: never
185
- if: $CI_PIPELINE_SOURCE == "trigger"
186
- - if: $CI_MERGE_REQUEST_ID
187
178
  needs: []
188
179
  retry: *a1
189
180
  interruptible: true
@@ -393,15 +384,15 @@ app ๐Ÿงช test:
393
384
  - when: on_success
394
385
  if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && $CI_COMMIT_MESSAGE !~ /^chore\\(release\\).*/
395
386
  needs:
396
- - job: app ๐Ÿ‘ฎ lint
387
+ - job: 'app ๐Ÿ‘ฎ lint | dev '
397
388
  artifacts: false
398
389
  - job: 'app ๐Ÿ”จ docker | dev '
399
390
  artifacts: false
400
- - job: app ๐Ÿงช test
391
+ - job: 'app ๐Ÿงช test | dev '
401
392
  artifacts: false
402
393
  - job: 'app ๐Ÿงพ sbom | dev '
403
394
  artifacts: true
404
- - job: app ๐Ÿ›ก audit
395
+ - job: 'app ๐Ÿ›ก audit | dev '
405
396
  artifacts: false
406
397
  retry: *a1
407
398
  interruptible: true
@@ -514,6 +505,77 @@ app ๐Ÿงช test:
514
505
  retry: *a1
515
506
  interruptible: true
516
507
  allow_failure: true
508
+ 'app ๐Ÿ›ก audit | review ':
509
+ stage: test
510
+ image: ruby:3.2.1
511
+ variables: {}
512
+ script:
513
+ - collapseable_section_start "injectvars" "Injecting variables"
514
+ - collapseable_section_end "injectvars"
515
+ - cd .
516
+ - gem install bundler-audit
517
+ - bundle audit check
518
+ rules:
519
+ - when: never
520
+ if: $CI_PIPELINE_SOURCE == "trigger"
521
+ - if: $CI_MERGE_REQUEST_ID
522
+ needs: []
523
+ retry: *a1
524
+ interruptible: true
525
+ allow_failure: true
526
+ 'app ๐Ÿ‘ฎ lint | review ':
527
+ stage: test
528
+ image: ruby:3.2.1
529
+ variables: {}
530
+ script:
531
+ - collapseable_section_start "injectvars" "Injecting variables"
532
+ - collapseable_section_end "injectvars"
533
+ - cd .
534
+ - bundle config set path 'tmp/cache'
535
+ - bundle install -j $(nproc)
536
+ - bundle exec rubocop
537
+ cache: &a3
538
+ key:
539
+ files:
540
+ - Gemfile.lock
541
+ prefix: $CI_JOB_IMAGE
542
+ paths:
543
+ - tmp/cache
544
+ rules:
545
+ - when: never
546
+ if: $CI_PIPELINE_SOURCE == "trigger"
547
+ - if: $CI_MERGE_REQUEST_ID
548
+ needs: []
549
+ retry: *a1
550
+ interruptible: true
551
+ 'app ๐Ÿงช test | review ':
552
+ stage: test
553
+ image: ruby:3.2.1
554
+ services:
555
+ - name: docker.io/postgres:latest
556
+ alias: database
557
+ variables:
558
+ POSTGRES_HOST_AUTH_METHOD: trust
559
+ variables:
560
+ RAILS_ENV: test
561
+ DATABASE_URL: postgresql://postgres@database
562
+ script:
563
+ - collapseable_section_start "injectvars" "Injecting variables"
564
+ - collapseable_section_end "injectvars"
565
+ - cd .
566
+ - bundle config set path 'tmp/cache'
567
+ - bundle install -j $(nproc)
568
+ - bundle exec rake db:test:prepare
569
+ - bundle exec rake assets:precompile assets:clean
570
+ - bundle exec rspec
571
+ cache: *a3
572
+ rules:
573
+ - when: never
574
+ if: $CI_PIPELINE_SOURCE == "trigger"
575
+ - if: $CI_MERGE_REQUEST_ID
576
+ needs: []
577
+ retry: *a1
578
+ interruptible: true
517
579
  'app ๐Ÿ”จ docker | review ':
518
580
  stage: build
519
581
  image: path/to/docker/docker-build:the-version
@@ -726,15 +788,15 @@ app ๐Ÿงช test:
726
788
  - when: on_success
727
789
  if: $CI_MERGE_REQUEST_ID
728
790
  needs:
729
- - job: app ๐Ÿ‘ฎ lint
791
+ - job: 'app ๐Ÿ‘ฎ lint | review '
730
792
  artifacts: false
731
793
  - job: 'app ๐Ÿ”จ docker | review '
732
794
  artifacts: false
733
- - job: app ๐Ÿงช test
795
+ - job: 'app ๐Ÿงช test | review '
734
796
  artifacts: false
735
797
  - job: 'app ๐Ÿงพ sbom | review '
736
798
  artifacts: true
737
- - job: app ๐Ÿ›ก audit
799
+ - job: 'app ๐Ÿ›ก audit | review '
738
800
  artifacts: false
739
801
  retry: *a1
740
802
  interruptible: true
@@ -1494,13 +1556,13 @@ create release:
1494
1556
  - semanticRelease
1495
1557
  - echo '๐Ÿ‘‰ The project access token might be invald - run \`project-renew-token\` in catladder CLI to fix.'
1496
1558
  rules:
1497
- - &a3
1559
+ - &a4
1498
1560
  if: $CI_COMMIT_MESSAGE =~ /^chore\\(release\\).*/
1499
1561
  when: never
1500
- - &a4
1562
+ - &a5
1501
1563
  if: $CI_PIPELINE_SOURCE == "trigger"
1502
1564
  when: never
1503
- - &a5
1565
+ - &a6
1504
1566
  if: $CI_PIPELINE_SOURCE == "schedule"
1505
1567
  when: never
1506
1568
  - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
@@ -1514,9 +1576,9 @@ create release:
1514
1576
  - semanticRelease
1515
1577
  - echo '๐Ÿ‘‰ The project access token might be invald - run \`project-renew-token\` in catladder CLI to fix.'
1516
1578
  rules:
1517
- - *a3
1518
1579
  - *a4
1519
1580
  - *a5
1581
+ - *a6
1520
1582
  - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
1521
1583
  when: manual
1522
1584
  - if: $CI_COMMIT_BRANCH =~ /^[0-9]+.([0-9]+|x).x$/