@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
@@ -494,17 +485,17 @@ api ๐Ÿงช test:
494
485
  - when: on_success
495
486
  if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && $CI_COMMIT_MESSAGE !~ /^chore\\(release\\).*/
496
487
  needs:
497
- - job: api ๐Ÿ‘ฎ lint
488
+ - job: 'api ๐Ÿ‘ฎ lint | dev '
498
489
  artifacts: false
499
490
  - job: 'api ๐Ÿ”จ app | dev '
500
491
  artifacts: false
501
492
  - job: 'api ๐Ÿ”จ docker | dev '
502
493
  artifacts: false
503
- - job: api ๐Ÿงช test
494
+ - job: 'api ๐Ÿงช test | dev '
504
495
  artifacts: false
505
496
  - job: 'api ๐Ÿงพ sbom | dev '
506
497
  artifacts: true
507
- - job: api ๐Ÿ›ก audit
498
+ - job: 'api ๐Ÿ›ก audit | dev '
508
499
  artifacts: false
509
500
  retry: *a1
510
501
  interruptible: true
@@ -545,6 +536,115 @@ api ๐Ÿงช test:
545
536
  retry: *a1
546
537
  interruptible: true
547
538
  allow_failure: true
539
+ 'api ๐Ÿ›ก audit | review ':
540
+ stage: test
541
+ image: path/to/docker/jobs-default:the-version
542
+ variables:
543
+ KUBERNETES_CPU_REQUEST: '0.45'
544
+ KUBERNETES_MEMORY_REQUEST: 1Gi
545
+ KUBERNETES_MEMORY_LIMIT: 4Gi
546
+ script:
547
+ - collapseable_section_start "injectvars" "Injecting variables"
548
+ - export APP_PATH="api"
549
+ - collapseable_section_end "injectvars"
550
+ - cd api
551
+ - yarn npm audit --environment production
552
+ rules:
553
+ - when: never
554
+ if: $CI_PIPELINE_SOURCE == "trigger"
555
+ - if: $CI_MERGE_REQUEST_ID
556
+ needs: []
557
+ retry: *a1
558
+ interruptible: true
559
+ allow_failure: true
560
+ 'api ๐Ÿ‘ฎ lint | review ':
561
+ stage: test
562
+ image: path/to/docker/jobs-default:the-version
563
+ variables:
564
+ KUBERNETES_CPU_REQUEST: '0.45'
565
+ KUBERNETES_MEMORY_REQUEST: 1Gi
566
+ KUBERNETES_MEMORY_LIMIT: 4Gi
567
+ script:
568
+ - collapseable_section_start "injectvars" "Injecting variables"
569
+ - export APP_PATH="api"
570
+ - collapseable_section_end "injectvars"
571
+ - collapseable_section_start "nodeinstall" "Ensure node version"
572
+ - if [ -f ~/.nvm/nvm.sh ]; then source ~/.nvm/nvm.sh; fi
573
+ - if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi
574
+ - collapseable_section_end "nodeinstall"
575
+ - cd api
576
+ - collapseable_section_start "nodeinstall" "Ensure node version"
577
+ - if [ -f ~/.nvm/nvm.sh ]; then source ~/.nvm/nvm.sh; fi
578
+ - if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi
579
+ - collapseable_section_end "nodeinstall"
580
+ - collapseable_section_start "yarninstall" "Yarn install"
581
+ - yarn install --immutable
582
+ - collapseable_section_end "yarninstall"
583
+ - yarn lint
584
+ cache:
585
+ - key: api-yarn-mr$CI_MERGE_REQUEST_IID
586
+ policy: pull-push
587
+ paths:
588
+ - api/.yarn
589
+ fallback_keys:
590
+ - api-yarn
591
+ - key: api-node-modules-mr$CI_MERGE_REQUEST_IID
592
+ policy: pull-push
593
+ paths:
594
+ - api/node_modules
595
+ fallback_keys:
596
+ - api-node-modules
597
+ rules:
598
+ - when: never
599
+ if: $CI_PIPELINE_SOURCE == "trigger"
600
+ - if: $CI_MERGE_REQUEST_ID
601
+ needs: []
602
+ retry: *a1
603
+ interruptible: true
604
+ 'api ๐Ÿงช test | review ':
605
+ stage: test
606
+ image: path/to/docker/jobs-testing-chrome:the-version
607
+ variables:
608
+ KUBERNETES_CPU_REQUEST: '0.45'
609
+ KUBERNETES_MEMORY_REQUEST: 1Gi
610
+ KUBERNETES_MEMORY_LIMIT: 4Gi
611
+ script:
612
+ - collapseable_section_start "injectvars" "Injecting variables"
613
+ - export APP_PATH="api"
614
+ - collapseable_section_end "injectvars"
615
+ - collapseable_section_start "nodeinstall" "Ensure node version"
616
+ - if [ -f ~/.nvm/nvm.sh ]; then source ~/.nvm/nvm.sh; fi
617
+ - if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi
618
+ - collapseable_section_end "nodeinstall"
619
+ - cd api
620
+ - collapseable_section_start "nodeinstall" "Ensure node version"
621
+ - if [ -f ~/.nvm/nvm.sh ]; then source ~/.nvm/nvm.sh; fi
622
+ - if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi
623
+ - collapseable_section_end "nodeinstall"
624
+ - collapseable_section_start "yarninstall" "Yarn install"
625
+ - yarn install --immutable
626
+ - collapseable_section_end "yarninstall"
627
+ - yarn test
628
+ cache:
629
+ - key: api-yarn-mr$CI_MERGE_REQUEST_IID
630
+ policy: pull-push
631
+ paths:
632
+ - api/.yarn
633
+ fallback_keys:
634
+ - api-yarn
635
+ - key: api-node-modules-mr$CI_MERGE_REQUEST_IID
636
+ policy: pull-push
637
+ paths:
638
+ - api/node_modules
639
+ fallback_keys:
640
+ - api-node-modules
641
+ rules:
642
+ - when: never
643
+ if: $CI_PIPELINE_SOURCE == "trigger"
644
+ - if: $CI_MERGE_REQUEST_ID
645
+ needs: []
646
+ retry: *a1
647
+ interruptible: true
548
648
  'api ๐Ÿ”จ app | review ':
549
649
  stage: build
550
650
  image: path/to/docker/jobs-default:the-version
@@ -604,14 +704,18 @@ api ๐Ÿงช test:
604
704
  - collapseable_section_end "yarninstall"
605
705
  - yarn build
606
706
  cache:
607
- - key: api-yarn
707
+ - key: api-yarn-mr$CI_MERGE_REQUEST_IID
608
708
  policy: pull-push
609
709
  paths:
610
710
  - api/.yarn
611
- - key: api-node-modules
711
+ fallback_keys:
712
+ - api-yarn
713
+ - key: api-node-modules-mr$CI_MERGE_REQUEST_IID
612
714
  policy: pull-push
613
715
  paths:
614
716
  - api/node_modules
717
+ fallback_keys:
718
+ - api-node-modules
615
719
  artifacts:
616
720
  paths:
617
721
  - api/__build_info.json
@@ -678,10 +782,12 @@ api ๐Ÿงช test:
678
782
  - docker push $DOCKER_CACHE_IMAGE
679
783
  - collapseable_section_end "docker-push"
680
784
  cache:
681
- - key: api-yarn
785
+ - key: api-yarn-mr$CI_MERGE_REQUEST_IID
682
786
  policy: pull
683
787
  paths:
684
788
  - api/.yarn
789
+ fallback_keys:
790
+ - api-yarn
685
791
  rules:
686
792
  - when: never
687
793
  if: $CI_PIPELINE_SOURCE == "trigger"
@@ -825,17 +931,17 @@ api ๐Ÿงช test:
825
931
  - when: on_success
826
932
  if: $CI_MERGE_REQUEST_ID
827
933
  needs:
828
- - job: api ๐Ÿ‘ฎ lint
934
+ - job: 'api ๐Ÿ‘ฎ lint | review '
829
935
  artifacts: false
830
936
  - job: 'api ๐Ÿ”จ app | review '
831
937
  artifacts: false
832
938
  - job: 'api ๐Ÿ”จ docker | review '
833
939
  artifacts: false
834
- - job: api ๐Ÿงช test
940
+ - job: 'api ๐Ÿงช test | review '
835
941
  artifacts: false
836
942
  - job: 'api ๐Ÿงพ sbom | review '
837
943
  artifacts: true
838
- - job: api ๐Ÿ›ก audit
944
+ - job: 'api ๐Ÿ›ก audit | review '
839
945
  artifacts: false
840
946
  retry: *a1
841
947
  interruptible: true
@@ -468,14 +468,18 @@ before_script:
468
468
  - collapseable_section_end "yarninstall"
469
469
  - yarn build-storybook --quiet -o ./dist
470
470
  cache:
471
- - key: app-yarn
471
+ - key: app-yarn-mr$CI_MERGE_REQUEST_IID
472
472
  policy: pull-push
473
473
  paths:
474
474
  - app/.yarn
475
- - key: app-node-modules
475
+ fallback_keys:
476
+ - app-yarn
477
+ - key: app-node-modules-mr$CI_MERGE_REQUEST_IID
476
478
  policy: pull-push
477
479
  paths:
478
480
  - app/node_modules
481
+ fallback_keys:
482
+ - app-node-modules
479
483
  artifacts:
480
484
  paths:
481
485
  - app/__build_info.json
@@ -542,10 +546,12 @@ before_script:
542
546
  - docker push $DOCKER_CACHE_IMAGE
543
547
  - collapseable_section_end "docker-push"
544
548
  cache:
545
- - key: app-yarn
549
+ - key: app-yarn-mr$CI_MERGE_REQUEST_IID
546
550
  policy: pull
547
551
  paths:
548
552
  - app/.yarn
553
+ fallback_keys:
554
+ - app-yarn
549
555
  rules:
550
556
  - when: never
551
557
  if: $CI_PIPELINE_SOURCE == "trigger"
@@ -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: path/to/docker/jobs-default:the-version
109
109
  variables:
@@ -120,9 +120,6 @@ www ๐Ÿ›ก 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 @@ www ๐Ÿ›ก audit:
131
128
  - stuck_or_timeout_failure
132
129
  interruptible: true
133
130
  allow_failure: true
134
- www ๐Ÿ‘ฎ lint:
131
+ 'www ๐Ÿ‘ฎ lint | dev ':
135
132
  stage: test
136
133
  image: path/to/docker/jobs-default:the-version
137
134
  variables:
@@ -168,13 +165,10 @@ www ๐Ÿ‘ฎ 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
- www ๐Ÿงช test:
171
+ 'www ๐Ÿงช test | dev ':
178
172
  stage: test
179
173
  image: path/to/docker/jobs-testing-chrome:the-version
180
174
  variables:
@@ -211,9 +205,6 @@ www ๐Ÿงช 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
@@ -482,17 +473,17 @@ www ๐Ÿงช test:
482
473
  - when: on_success
483
474
  if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && $CI_COMMIT_MESSAGE !~ /^chore\\(release\\).*/
484
475
  needs:
485
- - job: www ๐Ÿ‘ฎ lint
476
+ - job: 'www ๐Ÿ‘ฎ lint | dev '
486
477
  artifacts: false
487
478
  - job: 'www ๐Ÿ”จ app | dev '
488
479
  artifacts: false
489
480
  - job: 'www ๐Ÿ”จ docker | dev '
490
481
  artifacts: false
491
- - job: www ๐Ÿงช test
482
+ - job: 'www ๐Ÿงช test | dev '
492
483
  artifacts: false
493
484
  - job: 'www ๐Ÿงพ sbom | dev '
494
485
  artifacts: true
495
- - job: www ๐Ÿ›ก audit
486
+ - job: 'www ๐Ÿ›ก audit | dev '
496
487
  artifacts: false
497
488
  retry: *a1
498
489
  interruptible: true
@@ -531,6 +522,115 @@ www ๐Ÿงช test:
531
522
  retry: *a1
532
523
  interruptible: true
533
524
  allow_failure: true
525
+ 'www ๐Ÿ›ก audit | review ':
526
+ stage: test
527
+ image: path/to/docker/jobs-default:the-version
528
+ variables:
529
+ KUBERNETES_CPU_REQUEST: '0.45'
530
+ KUBERNETES_MEMORY_REQUEST: 1Gi
531
+ KUBERNETES_MEMORY_LIMIT: 4Gi
532
+ script:
533
+ - collapseable_section_start "injectvars" "Injecting variables"
534
+ - export APP_PATH="www"
535
+ - collapseable_section_end "injectvars"
536
+ - cd www
537
+ - yarn npm audit --environment production
538
+ rules:
539
+ - when: never
540
+ if: $CI_PIPELINE_SOURCE == "trigger"
541
+ - if: $CI_MERGE_REQUEST_ID
542
+ needs: []
543
+ retry: *a1
544
+ interruptible: true
545
+ allow_failure: true
546
+ 'www ๐Ÿ‘ฎ lint | review ':
547
+ stage: test
548
+ image: path/to/docker/jobs-default:the-version
549
+ variables:
550
+ KUBERNETES_CPU_REQUEST: '0.45'
551
+ KUBERNETES_MEMORY_REQUEST: 1Gi
552
+ KUBERNETES_MEMORY_LIMIT: 4Gi
553
+ script:
554
+ - collapseable_section_start "injectvars" "Injecting variables"
555
+ - export APP_PATH="www"
556
+ - collapseable_section_end "injectvars"
557
+ - collapseable_section_start "nodeinstall" "Ensure node version"
558
+ - if [ -f ~/.nvm/nvm.sh ]; then source ~/.nvm/nvm.sh; fi
559
+ - if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi
560
+ - collapseable_section_end "nodeinstall"
561
+ - cd www
562
+ - collapseable_section_start "nodeinstall" "Ensure node version"
563
+ - if [ -f ~/.nvm/nvm.sh ]; then source ~/.nvm/nvm.sh; fi
564
+ - if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi
565
+ - collapseable_section_end "nodeinstall"
566
+ - collapseable_section_start "yarninstall" "Yarn install"
567
+ - yarn install --immutable
568
+ - collapseable_section_end "yarninstall"
569
+ - yarn lint
570
+ cache:
571
+ - key: www-yarn-mr$CI_MERGE_REQUEST_IID
572
+ policy: pull-push
573
+ paths:
574
+ - www/.yarn
575
+ fallback_keys:
576
+ - www-yarn
577
+ - key: www-node-modules-mr$CI_MERGE_REQUEST_IID
578
+ policy: pull-push
579
+ paths:
580
+ - www/node_modules
581
+ fallback_keys:
582
+ - www-node-modules
583
+ rules:
584
+ - when: never
585
+ if: $CI_PIPELINE_SOURCE == "trigger"
586
+ - if: $CI_MERGE_REQUEST_ID
587
+ needs: []
588
+ retry: *a1
589
+ interruptible: true
590
+ 'www ๐Ÿงช test | review ':
591
+ stage: test
592
+ image: path/to/docker/jobs-testing-chrome:the-version
593
+ variables:
594
+ KUBERNETES_CPU_REQUEST: '0.45'
595
+ KUBERNETES_MEMORY_REQUEST: 1Gi
596
+ KUBERNETES_MEMORY_LIMIT: 4Gi
597
+ script:
598
+ - collapseable_section_start "injectvars" "Injecting variables"
599
+ - export APP_PATH="www"
600
+ - collapseable_section_end "injectvars"
601
+ - collapseable_section_start "nodeinstall" "Ensure node version"
602
+ - if [ -f ~/.nvm/nvm.sh ]; then source ~/.nvm/nvm.sh; fi
603
+ - if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi
604
+ - collapseable_section_end "nodeinstall"
605
+ - cd www
606
+ - collapseable_section_start "nodeinstall" "Ensure node version"
607
+ - if [ -f ~/.nvm/nvm.sh ]; then source ~/.nvm/nvm.sh; fi
608
+ - if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi
609
+ - collapseable_section_end "nodeinstall"
610
+ - collapseable_section_start "yarninstall" "Yarn install"
611
+ - yarn install --immutable
612
+ - collapseable_section_end "yarninstall"
613
+ - yarn test
614
+ cache:
615
+ - key: www-yarn-mr$CI_MERGE_REQUEST_IID
616
+ policy: pull-push
617
+ paths:
618
+ - www/.yarn
619
+ fallback_keys:
620
+ - www-yarn
621
+ - key: www-node-modules-mr$CI_MERGE_REQUEST_IID
622
+ policy: pull-push
623
+ paths:
624
+ - www/node_modules
625
+ fallback_keys:
626
+ - www-node-modules
627
+ rules:
628
+ - when: never
629
+ if: $CI_PIPELINE_SOURCE == "trigger"
630
+ - if: $CI_MERGE_REQUEST_ID
631
+ needs: []
632
+ retry: *a1
633
+ interruptible: true
534
634
  'www ๐Ÿ”จ app | review ':
535
635
  stage: build
536
636
  image: path/to/docker/jobs-default:the-version
@@ -588,18 +688,24 @@ www ๐Ÿงช test:
588
688
  - collapseable_section_end "yarninstall"
589
689
  - yarn build
590
690
  cache:
591
- - key: www-yarn
691
+ - key: www-yarn-mr$CI_MERGE_REQUEST_IID
592
692
  policy: pull-push
593
693
  paths:
594
694
  - www/.yarn
595
- - key: www-node-modules
695
+ fallback_keys:
696
+ - www-yarn
697
+ - key: www-node-modules-mr$CI_MERGE_REQUEST_IID
596
698
  policy: pull-push
597
699
  paths:
598
700
  - www/node_modules
599
- - key: www-default
701
+ fallback_keys:
702
+ - www-node-modules
703
+ - key: www-default-mr$CI_MERGE_REQUEST_IID
600
704
  policy: pull-push
601
705
  paths:
602
706
  - www/.next/cache
707
+ fallback_keys:
708
+ - www-default
603
709
  artifacts:
604
710
  paths:
605
711
  - www/__build_info.json
@@ -666,10 +772,12 @@ www ๐Ÿงช test:
666
772
  - docker push $DOCKER_CACHE_IMAGE
667
773
  - collapseable_section_end "docker-push"
668
774
  cache:
669
- - key: www-yarn
775
+ - key: www-yarn-mr$CI_MERGE_REQUEST_IID
670
776
  policy: pull
671
777
  paths:
672
778
  - www/.yarn
779
+ fallback_keys:
780
+ - www-yarn
673
781
  rules:
674
782
  - when: never
675
783
  if: $CI_PIPELINE_SOURCE == "trigger"
@@ -799,17 +907,17 @@ www ๐Ÿงช test:
799
907
  - when: on_success
800
908
  if: $CI_MERGE_REQUEST_ID
801
909
  needs:
802
- - job: www ๐Ÿ‘ฎ lint
910
+ - job: 'www ๐Ÿ‘ฎ lint | review '
803
911
  artifacts: false
804
912
  - job: 'www ๐Ÿ”จ app | review '
805
913
  artifacts: false
806
914
  - job: 'www ๐Ÿ”จ docker | review '
807
915
  artifacts: false
808
- - job: www ๐Ÿงช test
916
+ - job: 'www ๐Ÿงช test | review '
809
917
  artifacts: false
810
918
  - job: 'www ๐Ÿงพ sbom | review '
811
919
  artifacts: true
812
- - job: www ๐Ÿ›ก audit
920
+ - job: 'www ๐Ÿ›ก audit | review '
813
921
  artifacts: false
814
922
  retry: *a1
815
923
  interruptible: true