@catladder/pipeline 3.25.0 โ†’ 3.26.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 (73) hide show
  1. package/dist/build/custom/testJob.js +1 -2
  2. package/dist/build/node/testJob.js +1 -2
  3. package/dist/build/rails/test.js +1 -2
  4. package/dist/constants.js +1 -1
  5. package/dist/pipeline/agent/createAgentReviewJob.js +1 -0
  6. package/dist/pipeline/agent/shared.d.ts +1 -1
  7. package/dist/pipeline/agent/shared.js +0 -1
  8. package/dist/pipeline/createMainPipeline.js +1 -0
  9. package/dist/pipeline/gitlab/cache.d.ts +9 -0
  10. package/dist/pipeline/gitlab/cache.js +47 -0
  11. package/dist/pipeline/gitlab/createGitlabJobs.js +7 -7
  12. package/dist/tsconfig.tsbuildinfo +1 -1
  13. package/dist/types/jobs.d.ts +2 -3
  14. package/examples/__snapshots__/automatic-releases.test.ts.snap +127 -21
  15. package/examples/__snapshots__/cloud-run-health-check-defaults.test.ts.snap +127 -21
  16. package/examples/__snapshots__/cloud-run-health-check-only-startup.test.ts.snap +127 -21
  17. package/examples/__snapshots__/cloud-run-health-check.test.ts.snap +127 -21
  18. package/examples/__snapshots__/cloud-run-http2.test.ts.snap +127 -21
  19. package/examples/__snapshots__/cloud-run-memory-limit.test.ts.snap +127 -21
  20. package/examples/__snapshots__/cloud-run-meteor-with-worker.test.ts.snap +127 -21
  21. package/examples/__snapshots__/cloud-run-nextjs.test.ts.snap +130 -22
  22. package/examples/__snapshots__/cloud-run-no-cpu-throttling.test.ts.snap +127 -21
  23. package/examples/__snapshots__/cloud-run-no-service.test.ts.snap +127 -21
  24. package/examples/__snapshots__/cloud-run-non-public.test.ts.snap +127 -21
  25. package/examples/__snapshots__/cloud-run-post-stop-job.test.ts.snap +127 -21
  26. package/examples/__snapshots__/cloud-run-service-custom-vpc-connector.test.ts.snap +127 -21
  27. package/examples/__snapshots__/cloud-run-service-custom-vpc.test.ts.snap +127 -21
  28. package/examples/__snapshots__/cloud-run-service-gen2.test.ts.snap +127 -21
  29. package/examples/__snapshots__/cloud-run-service-increase-timout.test.ts.snap +127 -21
  30. package/examples/__snapshots__/cloud-run-service-with-volumes.test.ts.snap +127 -21
  31. package/examples/__snapshots__/cloud-run-storybook.test.ts.snap +9 -3
  32. package/examples/__snapshots__/cloud-run-with-agents.test.ts.snap +130 -22
  33. package/examples/__snapshots__/cloud-run-with-gpu.test.ts.snap +127 -21
  34. package/examples/__snapshots__/cloud-run-with-ngnix.test.ts.snap +127 -21
  35. package/examples/__snapshots__/cloud-run-with-sql-legacy-jobs.test.ts.snap +127 -21
  36. package/examples/__snapshots__/cloud-run-with-sql-multiple-dbs.test.ts.snap +381 -63
  37. package/examples/__snapshots__/cloud-run-with-sql-reuse-db.test.ts.snap +254 -42
  38. package/examples/__snapshots__/cloud-run-with-sql.test.ts.snap +127 -21
  39. package/examples/__snapshots__/cloud-run-with-worker.test.ts.snap +127 -21
  40. package/examples/__snapshots__/custom-build-job-with-tests.test.ts.snap +93 -22
  41. package/examples/__snapshots__/custom-deploy.test.ts.snap +127 -21
  42. package/examples/__snapshots__/custom-envs.test.ts.snap +320 -32
  43. package/examples/__snapshots__/custom-verify-job.test.ts.snap +130 -22
  44. package/examples/__snapshots__/git-submodule.test.ts.snap +127 -21
  45. package/examples/__snapshots__/kubernetes-application-customization.test.ts.snap +127 -21
  46. package/examples/__snapshots__/kubernetes-with-cloud-sql.test.ts.snap +127 -21
  47. package/examples/__snapshots__/kubernetes-with-jobs.test.ts.snap +254 -42
  48. package/examples/__snapshots__/kubernetes-with-mongodb.test.ts.snap +127 -21
  49. package/examples/__snapshots__/local-dot-env.test.ts.snap +127 -21
  50. package/examples/__snapshots__/meteor-kubernetes.test.ts.snap +127 -21
  51. package/examples/__snapshots__/modify-generated-files.test.ts.snap +118 -14
  52. package/examples/__snapshots__/modify-generated-yaml.test.ts.snap +118 -14
  53. package/examples/__snapshots__/multiline-var.test.ts.snap +381 -63
  54. package/examples/__snapshots__/native-app.test.ts.snap +257 -41
  55. package/examples/__snapshots__/node-build-with-custom-image.test.ts.snap +127 -21
  56. package/examples/__snapshots__/node-build-with-docker-additions.test.ts.snap +127 -21
  57. package/examples/__snapshots__/override-secrets.test.ts.snap +127 -21
  58. package/examples/__snapshots__/rails-k8s-with-worker-dockerfile.test.ts.snap +84 -22
  59. package/examples/__snapshots__/rails-k8s-with-worker.test.ts.snap +84 -22
  60. package/examples/__snapshots__/referencing-other-vars.test.ts.snap +381 -63
  61. package/examples/__snapshots__/wait-for-other-deploy.test.ts.snap +248 -40
  62. package/examples/__snapshots__/workspace-api-www-turbo-cache.test.ts.snap +139 -29
  63. package/examples/__snapshots__/workspace-api-www.test.ts.snap +139 -29
  64. package/package.json +1 -1
  65. package/src/build/custom/testJob.ts +0 -1
  66. package/src/build/node/testJob.ts +0 -1
  67. package/src/build/rails/test.ts +0 -1
  68. package/src/pipeline/agent/createAgentReviewJob.ts +1 -0
  69. package/src/pipeline/agent/shared.ts +2 -2
  70. package/src/pipeline/createMainPipeline.ts +1 -0
  71. package/src/pipeline/gitlab/cache.ts +49 -0
  72. package/src/pipeline/gitlab/createGitlabJobs.ts +7 -9
  73. 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
- api ๐Ÿ›ก audit:
106
+ 'api ๐Ÿ›ก audit | dev ':
107
107
  stage: test
108
108
  image: path/to/docker/jobs-default:the-version
109
109
  variables:
@@ -120,9 +120,6 @@ api ๐Ÿ›ก audit:
120
120
  - when: never
121
121
  if: $CI_PIPELINE_SOURCE == "trigger"
122
122
  - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && $CI_COMMIT_MESSAGE !~ /^chore\\(release\\).*/
123
- - when: never
124
- if: $CI_PIPELINE_SOURCE == "trigger"
125
- - if: $CI_MERGE_REQUEST_ID
126
123
  needs: []
127
124
  retry: &a1
128
125
  max: 2
@@ -131,7 +128,7 @@ api ๐Ÿ›ก audit:
131
128
  - stuck_or_timeout_failure
132
129
  interruptible: true
133
130
  allow_failure: true
134
- api ๐Ÿ‘ฎ lint:
131
+ 'api ๐Ÿ‘ฎ lint | dev ':
135
132
  stage: test
136
133
  image: path/to/docker/jobs-default:the-version
137
134
  variables:
@@ -168,13 +165,10 @@ api ๐Ÿ‘ฎ lint:
168
165
  - when: never
169
166
  if: $CI_PIPELINE_SOURCE == "trigger"
170
167
  - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && $CI_COMMIT_MESSAGE !~ /^chore\\(release\\).*/
171
- - when: never
172
- if: $CI_PIPELINE_SOURCE == "trigger"
173
- - if: $CI_MERGE_REQUEST_ID
174
168
  needs: []
175
169
  retry: *a1
176
170
  interruptible: true
177
- api ๐Ÿงช test:
171
+ 'api ๐Ÿงช test | dev ':
178
172
  stage: test
179
173
  image: path/to/docker/jobs-testing-chrome:the-version
180
174
  variables:
@@ -211,9 +205,6 @@ api ๐Ÿงช test:
211
205
  - when: never
212
206
  if: $CI_PIPELINE_SOURCE == "trigger"
213
207
  - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && $CI_COMMIT_MESSAGE !~ /^chore\\(release\\).*/
214
- - when: never
215
- if: $CI_PIPELINE_SOURCE == "trigger"
216
- - if: $CI_MERGE_REQUEST_ID
217
208
  needs: []
218
209
  retry: *a1
219
210
  interruptible: true
@@ -579,17 +570,17 @@ api ๐Ÿงช test:
579
570
  - when: on_success
580
571
  if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && $CI_COMMIT_MESSAGE !~ /^chore\\(release\\).*/
581
572
  needs:
582
- - job: api ๐Ÿ‘ฎ lint
573
+ - job: 'api ๐Ÿ‘ฎ lint | dev '
583
574
  artifacts: false
584
575
  - job: 'api ๐Ÿ”จ app | dev '
585
576
  artifacts: false
586
577
  - job: 'api ๐Ÿ”จ docker | dev '
587
578
  artifacts: false
588
- - job: api ๐Ÿงช test
579
+ - job: 'api ๐Ÿงช test | dev '
589
580
  artifacts: false
590
581
  - job: 'api ๐Ÿงพ sbom | dev '
591
582
  artifacts: true
592
- - job: api ๐Ÿ›ก audit
583
+ - job: 'api ๐Ÿ›ก audit | dev '
593
584
  artifacts: false
594
585
  retry: *a1
595
586
  interruptible: true
@@ -637,6 +628,115 @@ api ๐Ÿงช test:
637
628
  retry: *a1
638
629
  interruptible: true
639
630
  allow_failure: true
631
+ 'api ๐Ÿ›ก audit | review ':
632
+ stage: test
633
+ image: path/to/docker/jobs-default:the-version
634
+ variables:
635
+ KUBERNETES_CPU_REQUEST: '0.45'
636
+ KUBERNETES_MEMORY_REQUEST: 1Gi
637
+ KUBERNETES_MEMORY_LIMIT: 4Gi
638
+ script:
639
+ - collapseable_section_start "injectvars" "Injecting variables"
640
+ - export APP_PATH="api"
641
+ - collapseable_section_end "injectvars"
642
+ - cd api
643
+ - yarn npm audit --environment production
644
+ rules:
645
+ - when: never
646
+ if: $CI_PIPELINE_SOURCE == "trigger"
647
+ - if: $CI_MERGE_REQUEST_ID
648
+ needs: []
649
+ retry: *a1
650
+ interruptible: true
651
+ allow_failure: true
652
+ 'api ๐Ÿ‘ฎ lint | review ':
653
+ stage: test
654
+ image: path/to/docker/jobs-default:the-version
655
+ variables:
656
+ KUBERNETES_CPU_REQUEST: '0.45'
657
+ KUBERNETES_MEMORY_REQUEST: 1Gi
658
+ KUBERNETES_MEMORY_LIMIT: 4Gi
659
+ script:
660
+ - collapseable_section_start "injectvars" "Injecting variables"
661
+ - export APP_PATH="api"
662
+ - collapseable_section_end "injectvars"
663
+ - collapseable_section_start "nodeinstall" "Ensure node version"
664
+ - if [ -f ~/.nvm/nvm.sh ]; then source ~/.nvm/nvm.sh; fi
665
+ - if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi
666
+ - collapseable_section_end "nodeinstall"
667
+ - cd api
668
+ - collapseable_section_start "nodeinstall" "Ensure node version"
669
+ - if [ -f ~/.nvm/nvm.sh ]; then source ~/.nvm/nvm.sh; fi
670
+ - if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi
671
+ - collapseable_section_end "nodeinstall"
672
+ - collapseable_section_start "yarninstall" "Yarn install"
673
+ - yarn install --immutable
674
+ - collapseable_section_end "yarninstall"
675
+ - yarn lint
676
+ cache:
677
+ - key: api-yarn-mr$CI_MERGE_REQUEST_IID
678
+ policy: pull-push
679
+ paths:
680
+ - api/.yarn
681
+ fallback_keys:
682
+ - api-yarn
683
+ - key: api-node-modules-mr$CI_MERGE_REQUEST_IID
684
+ policy: pull-push
685
+ paths:
686
+ - api/node_modules
687
+ fallback_keys:
688
+ - api-node-modules
689
+ rules:
690
+ - when: never
691
+ if: $CI_PIPELINE_SOURCE == "trigger"
692
+ - if: $CI_MERGE_REQUEST_ID
693
+ needs: []
694
+ retry: *a1
695
+ interruptible: true
696
+ 'api ๐Ÿงช test | review ':
697
+ stage: test
698
+ image: path/to/docker/jobs-testing-chrome:the-version
699
+ variables:
700
+ KUBERNETES_CPU_REQUEST: '0.45'
701
+ KUBERNETES_MEMORY_REQUEST: 1Gi
702
+ KUBERNETES_MEMORY_LIMIT: 4Gi
703
+ script:
704
+ - collapseable_section_start "injectvars" "Injecting variables"
705
+ - export APP_PATH="api"
706
+ - collapseable_section_end "injectvars"
707
+ - collapseable_section_start "nodeinstall" "Ensure node version"
708
+ - if [ -f ~/.nvm/nvm.sh ]; then source ~/.nvm/nvm.sh; fi
709
+ - if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi
710
+ - collapseable_section_end "nodeinstall"
711
+ - cd api
712
+ - collapseable_section_start "nodeinstall" "Ensure node version"
713
+ - if [ -f ~/.nvm/nvm.sh ]; then source ~/.nvm/nvm.sh; fi
714
+ - if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi
715
+ - collapseable_section_end "nodeinstall"
716
+ - collapseable_section_start "yarninstall" "Yarn install"
717
+ - yarn install --immutable
718
+ - collapseable_section_end "yarninstall"
719
+ - yarn test
720
+ cache:
721
+ - key: api-yarn-mr$CI_MERGE_REQUEST_IID
722
+ policy: pull-push
723
+ paths:
724
+ - api/.yarn
725
+ fallback_keys:
726
+ - api-yarn
727
+ - key: api-node-modules-mr$CI_MERGE_REQUEST_IID
728
+ policy: pull-push
729
+ paths:
730
+ - api/node_modules
731
+ fallback_keys:
732
+ - api-node-modules
733
+ rules:
734
+ - when: never
735
+ if: $CI_PIPELINE_SOURCE == "trigger"
736
+ - if: $CI_MERGE_REQUEST_ID
737
+ needs: []
738
+ retry: *a1
739
+ interruptible: true
640
740
  'api ๐Ÿ”จ app | review ':
641
741
  stage: build
642
742
  image: path/to/docker/jobs-default:the-version
@@ -712,14 +812,18 @@ api ๐Ÿงช test:
712
812
  - collapseable_section_end "yarninstall"
713
813
  - yarn build
714
814
  cache:
715
- - key: api-yarn
815
+ - key: api-yarn-mr$CI_MERGE_REQUEST_IID
716
816
  policy: pull-push
717
817
  paths:
718
818
  - api/.yarn
719
- - key: api-node-modules
819
+ fallback_keys:
820
+ - api-yarn
821
+ - key: api-node-modules-mr$CI_MERGE_REQUEST_IID
720
822
  policy: pull-push
721
823
  paths:
722
824
  - api/node_modules
825
+ fallback_keys:
826
+ - api-node-modules
723
827
  artifacts:
724
828
  paths:
725
829
  - api/__build_info.json
@@ -786,10 +890,12 @@ api ๐Ÿงช test:
786
890
  - docker push $DOCKER_CACHE_IMAGE
787
891
  - collapseable_section_end "docker-push"
788
892
  cache:
789
- - key: api-yarn
893
+ - key: api-yarn-mr$CI_MERGE_REQUEST_IID
790
894
  policy: pull
791
895
  paths:
792
896
  - api/.yarn
897
+ fallback_keys:
898
+ - api-yarn
793
899
  rules:
794
900
  - when: never
795
901
  if: $CI_PIPELINE_SOURCE == "trigger"
@@ -995,17 +1101,17 @@ api ๐Ÿงช test:
995
1101
  - when: on_success
996
1102
  if: $CI_MERGE_REQUEST_ID
997
1103
  needs:
998
- - job: api ๐Ÿ‘ฎ lint
1104
+ - job: 'api ๐Ÿ‘ฎ lint | review '
999
1105
  artifacts: false
1000
1106
  - job: 'api ๐Ÿ”จ app | review '
1001
1107
  artifacts: false
1002
1108
  - job: 'api ๐Ÿ”จ docker | review '
1003
1109
  artifacts: false
1004
- - job: api ๐Ÿงช test
1110
+ - job: 'api ๐Ÿงช test | review '
1005
1111
  artifacts: false
1006
1112
  - job: 'api ๐Ÿงพ sbom | review '
1007
1113
  artifacts: true
1008
- - job: api ๐Ÿ›ก audit
1114
+ - job: 'api ๐Ÿ›ก audit | review '
1009
1115
  artifacts: false
1010
1116
  retry: *a1
1011
1117
  interruptible: true
@@ -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
- api ๐Ÿ›ก audit:
106
+ 'api ๐Ÿ›ก audit | dev ':
107
107
  stage: test
108
108
  image: path/to/docker/jobs-default:the-version
109
109
  variables:
@@ -120,9 +120,6 @@ api ๐Ÿ›ก audit:
120
120
  - when: never
121
121
  if: $CI_PIPELINE_SOURCE == "trigger"
122
122
  - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && $CI_COMMIT_MESSAGE !~ /^chore\\(release\\).*/
123
- - when: never
124
- if: $CI_PIPELINE_SOURCE == "trigger"
125
- - if: $CI_MERGE_REQUEST_ID
126
123
  needs: []
127
124
  retry: &a1
128
125
  max: 2
@@ -131,7 +128,7 @@ api ๐Ÿ›ก audit:
131
128
  - stuck_or_timeout_failure
132
129
  interruptible: true
133
130
  allow_failure: true
134
- api ๐Ÿ‘ฎ lint:
131
+ 'api ๐Ÿ‘ฎ lint | dev ':
135
132
  stage: test
136
133
  image: path/to/docker/jobs-default:the-version
137
134
  variables:
@@ -168,13 +165,10 @@ api ๐Ÿ‘ฎ lint:
168
165
  - when: never
169
166
  if: $CI_PIPELINE_SOURCE == "trigger"
170
167
  - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && $CI_COMMIT_MESSAGE !~ /^chore\\(release\\).*/
171
- - when: never
172
- if: $CI_PIPELINE_SOURCE == "trigger"
173
- - if: $CI_MERGE_REQUEST_ID
174
168
  needs: []
175
169
  retry: *a1
176
170
  interruptible: true
177
- api ๐Ÿงช test:
171
+ 'api ๐Ÿงช test | dev ':
178
172
  stage: test
179
173
  image: path/to/docker/jobs-testing-chrome:the-version
180
174
  variables:
@@ -211,9 +205,6 @@ api ๐Ÿงช test:
211
205
  - when: never
212
206
  if: $CI_PIPELINE_SOURCE == "trigger"
213
207
  - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && $CI_COMMIT_MESSAGE !~ /^chore\\(release\\).*/
214
- - when: never
215
- if: $CI_PIPELINE_SOURCE == "trigger"
216
- - if: $CI_MERGE_REQUEST_ID
217
208
  needs: []
218
209
  retry: *a1
219
210
  interruptible: true
@@ -479,17 +470,17 @@ api ๐Ÿงช test:
479
470
  - when: on_success
480
471
  if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && $CI_COMMIT_MESSAGE !~ /^chore\\(release\\).*/
481
472
  needs:
482
- - job: api ๐Ÿ‘ฎ lint
473
+ - job: 'api ๐Ÿ‘ฎ lint | dev '
483
474
  artifacts: false
484
475
  - job: 'api ๐Ÿ”จ app | dev '
485
476
  artifacts: false
486
477
  - job: 'api ๐Ÿ”จ docker | dev '
487
478
  artifacts: false
488
- - job: api ๐Ÿงช test
479
+ - job: 'api ๐Ÿงช test | dev '
489
480
  artifacts: false
490
481
  - job: 'api ๐Ÿงพ sbom | dev '
491
482
  artifacts: true
492
- - job: api ๐Ÿ›ก audit
483
+ - job: 'api ๐Ÿ›ก audit | dev '
493
484
  artifacts: false
494
485
  retry: *a1
495
486
  interruptible: true
@@ -529,6 +520,115 @@ api ๐Ÿงช test:
529
520
  retry: *a1
530
521
  interruptible: true
531
522
  allow_failure: true
523
+ 'api ๐Ÿ›ก audit | review ':
524
+ stage: test
525
+ image: path/to/docker/jobs-default:the-version
526
+ variables:
527
+ KUBERNETES_CPU_REQUEST: '0.45'
528
+ KUBERNETES_MEMORY_REQUEST: 1Gi
529
+ KUBERNETES_MEMORY_LIMIT: 4Gi
530
+ script:
531
+ - collapseable_section_start "injectvars" "Injecting variables"
532
+ - export APP_PATH="api"
533
+ - collapseable_section_end "injectvars"
534
+ - cd api
535
+ - yarn npm audit --environment production
536
+ rules:
537
+ - when: never
538
+ if: $CI_PIPELINE_SOURCE == "trigger"
539
+ - if: $CI_MERGE_REQUEST_ID
540
+ needs: []
541
+ retry: *a1
542
+ interruptible: true
543
+ allow_failure: true
544
+ 'api ๐Ÿ‘ฎ lint | review ':
545
+ stage: test
546
+ image: path/to/docker/jobs-default:the-version
547
+ variables:
548
+ KUBERNETES_CPU_REQUEST: '0.45'
549
+ KUBERNETES_MEMORY_REQUEST: 1Gi
550
+ KUBERNETES_MEMORY_LIMIT: 4Gi
551
+ script:
552
+ - collapseable_section_start "injectvars" "Injecting variables"
553
+ - export APP_PATH="api"
554
+ - collapseable_section_end "injectvars"
555
+ - collapseable_section_start "nodeinstall" "Ensure node version"
556
+ - if [ -f ~/.nvm/nvm.sh ]; then source ~/.nvm/nvm.sh; fi
557
+ - if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi
558
+ - collapseable_section_end "nodeinstall"
559
+ - cd api
560
+ - collapseable_section_start "nodeinstall" "Ensure node version"
561
+ - if [ -f ~/.nvm/nvm.sh ]; then source ~/.nvm/nvm.sh; fi
562
+ - if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi
563
+ - collapseable_section_end "nodeinstall"
564
+ - collapseable_section_start "yarninstall" "Yarn install"
565
+ - yarn install --immutable
566
+ - collapseable_section_end "yarninstall"
567
+ - yarn lint
568
+ cache:
569
+ - key: api-yarn-mr$CI_MERGE_REQUEST_IID
570
+ policy: pull-push
571
+ paths:
572
+ - api/.yarn
573
+ fallback_keys:
574
+ - api-yarn
575
+ - key: api-node-modules-mr$CI_MERGE_REQUEST_IID
576
+ policy: pull-push
577
+ paths:
578
+ - api/node_modules
579
+ fallback_keys:
580
+ - api-node-modules
581
+ rules:
582
+ - when: never
583
+ if: $CI_PIPELINE_SOURCE == "trigger"
584
+ - if: $CI_MERGE_REQUEST_ID
585
+ needs: []
586
+ retry: *a1
587
+ interruptible: true
588
+ 'api ๐Ÿงช test | review ':
589
+ stage: test
590
+ image: path/to/docker/jobs-testing-chrome:the-version
591
+ variables:
592
+ KUBERNETES_CPU_REQUEST: '0.45'
593
+ KUBERNETES_MEMORY_REQUEST: 1Gi
594
+ KUBERNETES_MEMORY_LIMIT: 4Gi
595
+ script:
596
+ - collapseable_section_start "injectvars" "Injecting variables"
597
+ - export APP_PATH="api"
598
+ - collapseable_section_end "injectvars"
599
+ - collapseable_section_start "nodeinstall" "Ensure node version"
600
+ - if [ -f ~/.nvm/nvm.sh ]; then source ~/.nvm/nvm.sh; fi
601
+ - if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi
602
+ - collapseable_section_end "nodeinstall"
603
+ - cd api
604
+ - collapseable_section_start "nodeinstall" "Ensure node version"
605
+ - if [ -f ~/.nvm/nvm.sh ]; then source ~/.nvm/nvm.sh; fi
606
+ - if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi
607
+ - collapseable_section_end "nodeinstall"
608
+ - collapseable_section_start "yarninstall" "Yarn install"
609
+ - yarn install --immutable
610
+ - collapseable_section_end "yarninstall"
611
+ - yarn test
612
+ cache:
613
+ - key: api-yarn-mr$CI_MERGE_REQUEST_IID
614
+ policy: pull-push
615
+ paths:
616
+ - api/.yarn
617
+ fallback_keys:
618
+ - api-yarn
619
+ - key: api-node-modules-mr$CI_MERGE_REQUEST_IID
620
+ policy: pull-push
621
+ paths:
622
+ - api/node_modules
623
+ fallback_keys:
624
+ - api-node-modules
625
+ rules:
626
+ - when: never
627
+ if: $CI_PIPELINE_SOURCE == "trigger"
628
+ - if: $CI_MERGE_REQUEST_ID
629
+ needs: []
630
+ retry: *a1
631
+ interruptible: true
532
632
  'api ๐Ÿ”จ app | review ':
533
633
  stage: build
534
634
  image: path/to/docker/jobs-default:the-version
@@ -586,14 +686,18 @@ api ๐Ÿงช test:
586
686
  - collapseable_section_end "yarninstall"
587
687
  - yarn build
588
688
  cache:
589
- - key: api-yarn
689
+ - key: api-yarn-mr$CI_MERGE_REQUEST_IID
590
690
  policy: pull-push
591
691
  paths:
592
692
  - api/.yarn
593
- - key: api-node-modules
693
+ fallback_keys:
694
+ - api-yarn
695
+ - key: api-node-modules-mr$CI_MERGE_REQUEST_IID
594
696
  policy: pull-push
595
697
  paths:
596
698
  - api/node_modules
699
+ fallback_keys:
700
+ - api-node-modules
597
701
  artifacts:
598
702
  paths:
599
703
  - api/__build_info.json
@@ -660,10 +764,12 @@ api ๐Ÿงช test:
660
764
  - docker push $DOCKER_CACHE_IMAGE
661
765
  - collapseable_section_end "docker-push"
662
766
  cache:
663
- - key: api-yarn
767
+ - key: api-yarn-mr$CI_MERGE_REQUEST_IID
664
768
  policy: pull
665
769
  paths:
666
770
  - api/.yarn
771
+ fallback_keys:
772
+ - api-yarn
667
773
  rules:
668
774
  - when: never
669
775
  if: $CI_PIPELINE_SOURCE == "trigger"
@@ -793,17 +899,17 @@ api ๐Ÿงช test:
793
899
  - when: on_success
794
900
  if: $CI_MERGE_REQUEST_ID
795
901
  needs:
796
- - job: api ๐Ÿ‘ฎ lint
902
+ - job: 'api ๐Ÿ‘ฎ lint | review '
797
903
  artifacts: false
798
904
  - job: 'api ๐Ÿ”จ app | review '
799
905
  artifacts: false
800
906
  - job: 'api ๐Ÿ”จ docker | review '
801
907
  artifacts: false
802
- - job: api ๐Ÿงช test
908
+ - job: 'api ๐Ÿงช test | review '
803
909
  artifacts: false
804
910
  - job: 'api ๐Ÿงพ sbom | review '
805
911
  artifacts: true
806
- - job: api ๐Ÿ›ก audit
912
+ - job: 'api ๐Ÿ›ก audit | review '
807
913
  artifacts: false
808
914
  retry: *a1
809
915
  interruptible: true
@@ -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
- www ๐Ÿ›ก audit:
106
+ 'www ๐Ÿ›ก audit | dev ':
107
107
  stage: test
108
108
  image: audit-image
109
109
  services: &a1
@@ -128,9 +128,6 @@ www ๐Ÿ›ก audit:
128
128
  - when: never
129
129
  if: $CI_PIPELINE_SOURCE == "trigger"
130
130
  - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && $CI_COMMIT_MESSAGE !~ /^chore\\(release\\).*/
131
- - when: never
132
- if: $CI_PIPELINE_SOURCE == "trigger"
133
- - if: $CI_MERGE_REQUEST_ID
134
131
  needs: []
135
132
  retry: &a2
136
133
  max: 2
@@ -139,7 +136,7 @@ www ๐Ÿ›ก audit:
139
136
  - stuck_or_timeout_failure
140
137
  interruptible: true
141
138
  allow_failure: true
142
- www ๐Ÿ‘ฎ lint:
139
+ 'www ๐Ÿ‘ฎ lint | dev ':
143
140
  stage: test
144
141
  image: lint-image
145
142
  services: *a1
@@ -161,13 +158,10 @@ www ๐Ÿ‘ฎ lint:
161
158
  - when: never
162
159
  if: $CI_PIPELINE_SOURCE == "trigger"
163
160
  - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && $CI_COMMIT_MESSAGE !~ /^chore\\(release\\).*/
164
- - when: never
165
- if: $CI_PIPELINE_SOURCE == "trigger"
166
- - if: $CI_MERGE_REQUEST_ID
167
161
  needs: []
168
162
  retry: *a2
169
163
  interruptible: true
170
- www ๐Ÿงช test:
164
+ 'www ๐Ÿงช test | dev ':
171
165
  stage: test
172
166
  image: test-image
173
167
  services: *a1
@@ -190,9 +184,6 @@ www ๐Ÿงช test:
190
184
  - when: never
191
185
  if: $CI_PIPELINE_SOURCE == "trigger"
192
186
  - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && $CI_COMMIT_MESSAGE !~ /^chore\\(release\\).*/
193
- - when: never
194
- if: $CI_PIPELINE_SOURCE == "trigger"
195
- - if: $CI_MERGE_REQUEST_ID
196
187
  needs: []
197
188
  retry: *a2
198
189
  interruptible: true
@@ -428,17 +419,17 @@ www ๐Ÿงช test:
428
419
  - when: on_success
429
420
  if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && $CI_COMMIT_MESSAGE !~ /^chore\\(release\\).*/
430
421
  needs:
431
- - job: www ๐Ÿ‘ฎ lint
422
+ - job: 'www ๐Ÿ‘ฎ lint | dev '
432
423
  artifacts: false
433
424
  - job: 'www ๐Ÿ”จ app | dev '
434
425
  artifacts: false
435
426
  - job: 'www ๐Ÿ”จ docker | dev '
436
427
  artifacts: false
437
- - job: www ๐Ÿงช test
428
+ - job: 'www ๐Ÿงช test | dev '
438
429
  artifacts: false
439
430
  - job: 'www ๐Ÿงพ sbom | dev '
440
431
  artifacts: true
441
- - job: www ๐Ÿ›ก audit
432
+ - job: 'www ๐Ÿ›ก audit | dev '
442
433
  artifacts: false
443
434
  retry: *a2
444
435
  interruptible: true
@@ -477,6 +468,86 @@ www ๐Ÿงช test:
477
468
  retry: *a2
478
469
  interruptible: true
479
470
  allow_failure: true
471
+ 'www ๐Ÿ›ก audit | review ':
472
+ stage: test
473
+ image: audit-image
474
+ services: &a3
475
+ - name: job-service-1
476
+ command:
477
+ - --some-command=some-value
478
+ variables:
479
+ KUBERNETES_CPU_REQUEST: '0.45'
480
+ KUBERNETES_MEMORY_REQUEST: 1Gi
481
+ KUBERNETES_MEMORY_LIMIT: 4Gi
482
+ script:
483
+ - collapseable_section_start "injectvars" "Injecting variables"
484
+ - export APP_PATH="www"
485
+ - collapseable_section_end "injectvars"
486
+ - audit
487
+ artifacts:
488
+ paths: []
489
+ reports:
490
+ junit:
491
+ - www/dist/audit.xml
492
+ rules:
493
+ - when: never
494
+ if: $CI_PIPELINE_SOURCE == "trigger"
495
+ - if: $CI_MERGE_REQUEST_ID
496
+ needs: []
497
+ retry: *a2
498
+ interruptible: true
499
+ allow_failure: true
500
+ 'www ๐Ÿ‘ฎ lint | review ':
501
+ stage: test
502
+ image: lint-image
503
+ services: *a3
504
+ variables:
505
+ KUBERNETES_CPU_REQUEST: '0.45'
506
+ KUBERNETES_MEMORY_REQUEST: 1Gi
507
+ KUBERNETES_MEMORY_LIMIT: 4Gi
508
+ script:
509
+ - collapseable_section_start "injectvars" "Injecting variables"
510
+ - export APP_PATH="www"
511
+ - collapseable_section_end "injectvars"
512
+ - lint
513
+ artifacts:
514
+ paths: []
515
+ reports:
516
+ junit:
517
+ - www/dist/lint.xml
518
+ rules:
519
+ - when: never
520
+ if: $CI_PIPELINE_SOURCE == "trigger"
521
+ - if: $CI_MERGE_REQUEST_ID
522
+ needs: []
523
+ retry: *a2
524
+ interruptible: true
525
+ 'www ๐Ÿงช test | review ':
526
+ stage: test
527
+ image: test-image
528
+ services: *a3
529
+ variables:
530
+ KUBERNETES_CPU_REQUEST: '0.45'
531
+ KUBERNETES_MEMORY_REQUEST: 1Gi
532
+ KUBERNETES_MEMORY_LIMIT: 4Gi
533
+ script:
534
+ - collapseable_section_start "injectvars" "Injecting variables"
535
+ - export APP_PATH="www"
536
+ - collapseable_section_end "injectvars"
537
+ - test
538
+ artifacts:
539
+ paths: []
540
+ reports:
541
+ junit:
542
+ - www/dist/TEST-*.xml
543
+ - www/dist/junit-*.xml
544
+ rules:
545
+ - when: never
546
+ if: $CI_PIPELINE_SOURCE == "trigger"
547
+ - if: $CI_MERGE_REQUEST_ID
548
+ needs: []
549
+ retry: *a2
550
+ interruptible: true
480
551
  'www ๐Ÿ”จ app | review ':
481
552
  stage: build
482
553
  image: foo
@@ -712,17 +783,17 @@ www ๐Ÿงช test:
712
783
  - when: on_success
713
784
  if: $CI_MERGE_REQUEST_ID
714
785
  needs:
715
- - job: www ๐Ÿ‘ฎ lint
786
+ - job: 'www ๐Ÿ‘ฎ lint | review '
716
787
  artifacts: false
717
788
  - job: 'www ๐Ÿ”จ app | review '
718
789
  artifacts: false
719
790
  - job: 'www ๐Ÿ”จ docker | review '
720
791
  artifacts: false
721
- - job: www ๐Ÿงช test
792
+ - job: 'www ๐Ÿงช test | review '
722
793
  artifacts: false
723
794
  - job: 'www ๐Ÿงพ sbom | review '
724
795
  artifacts: true
725
- - job: www ๐Ÿ›ก audit
796
+ - job: 'www ๐Ÿ›ก audit | review '
726
797
  artifacts: false
727
798
  retry: *a2
728
799
  interruptible: true
@@ -1319,13 +1390,13 @@ create release:
1319
1390
  - semanticRelease
1320
1391
  - echo '๐Ÿ‘‰ The project access token might be invald - run \`project-renew-token\` in catladder CLI to fix.'
1321
1392
  rules:
1322
- - &a3
1393
+ - &a4
1323
1394
  if: $CI_COMMIT_MESSAGE =~ /^chore\\(release\\).*/
1324
1395
  when: never
1325
- - &a4
1396
+ - &a5
1326
1397
  if: $CI_PIPELINE_SOURCE == "trigger"
1327
1398
  when: never
1328
- - &a5
1399
+ - &a6
1329
1400
  if: $CI_PIPELINE_SOURCE == "schedule"
1330
1401
  when: never
1331
1402
  - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
@@ -1339,9 +1410,9 @@ create release:
1339
1410
  - semanticRelease
1340
1411
  - echo '๐Ÿ‘‰ The project access token might be invald - run \`project-renew-token\` in catladder CLI to fix.'
1341
1412
  rules:
1342
- - *a3
1343
1413
  - *a4
1344
1414
  - *a5
1415
+ - *a6
1345
1416
  - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
1346
1417
  when: manual
1347
1418
  - if: $CI_COMMIT_BRANCH =~ /^[0-9]+.([0-9]+|x).x$/