@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
- 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
@@ -478,17 +469,17 @@ www ๐Ÿงช test:
478
469
  - when: on_success
479
470
  if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && $CI_COMMIT_MESSAGE !~ /^chore\\(release\\).*/
480
471
  needs:
481
- - job: www ๐Ÿ‘ฎ lint
472
+ - job: 'www ๐Ÿ‘ฎ lint | dev '
482
473
  artifacts: false
483
474
  - job: 'www ๐Ÿ”จ app | dev '
484
475
  artifacts: false
485
476
  - job: 'www ๐Ÿ”จ docker | dev '
486
477
  artifacts: false
487
- - job: www ๐Ÿงช test
478
+ - job: 'www ๐Ÿงช test | dev '
488
479
  artifacts: false
489
480
  - job: 'www ๐Ÿงพ sbom | dev '
490
481
  artifacts: true
491
- - job: www ๐Ÿ›ก audit
482
+ - job: 'www ๐Ÿ›ก audit | dev '
492
483
  artifacts: false
493
484
  retry: *a1
494
485
  interruptible: true
@@ -527,6 +518,115 @@ www ๐Ÿงช test:
527
518
  retry: *a1
528
519
  interruptible: true
529
520
  allow_failure: true
521
+ 'www ๐Ÿ›ก audit | review ':
522
+ stage: test
523
+ image: path/to/docker/jobs-default:the-version
524
+ variables:
525
+ KUBERNETES_CPU_REQUEST: '0.45'
526
+ KUBERNETES_MEMORY_REQUEST: 1Gi
527
+ KUBERNETES_MEMORY_LIMIT: 4Gi
528
+ script:
529
+ - collapseable_section_start "injectvars" "Injecting variables"
530
+ - export APP_PATH="www"
531
+ - collapseable_section_end "injectvars"
532
+ - cd www
533
+ - yarn npm audit --environment production
534
+ rules:
535
+ - when: never
536
+ if: $CI_PIPELINE_SOURCE == "trigger"
537
+ - if: $CI_MERGE_REQUEST_ID
538
+ needs: []
539
+ retry: *a1
540
+ interruptible: true
541
+ allow_failure: true
542
+ 'www ๐Ÿ‘ฎ lint | review ':
543
+ stage: test
544
+ image: path/to/docker/jobs-default:the-version
545
+ variables:
546
+ KUBERNETES_CPU_REQUEST: '0.45'
547
+ KUBERNETES_MEMORY_REQUEST: 1Gi
548
+ KUBERNETES_MEMORY_LIMIT: 4Gi
549
+ script:
550
+ - collapseable_section_start "injectvars" "Injecting variables"
551
+ - export APP_PATH="www"
552
+ - collapseable_section_end "injectvars"
553
+ - collapseable_section_start "nodeinstall" "Ensure node version"
554
+ - if [ -f ~/.nvm/nvm.sh ]; then source ~/.nvm/nvm.sh; fi
555
+ - if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi
556
+ - collapseable_section_end "nodeinstall"
557
+ - cd www
558
+ - collapseable_section_start "nodeinstall" "Ensure node version"
559
+ - if [ -f ~/.nvm/nvm.sh ]; then source ~/.nvm/nvm.sh; fi
560
+ - if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi
561
+ - collapseable_section_end "nodeinstall"
562
+ - collapseable_section_start "yarninstall" "Yarn install"
563
+ - yarn install --immutable
564
+ - collapseable_section_end "yarninstall"
565
+ - yarn lint
566
+ cache:
567
+ - key: www-yarn-mr$CI_MERGE_REQUEST_IID
568
+ policy: pull-push
569
+ paths:
570
+ - www/.yarn
571
+ fallback_keys:
572
+ - www-yarn
573
+ - key: www-node-modules-mr$CI_MERGE_REQUEST_IID
574
+ policy: pull-push
575
+ paths:
576
+ - www/node_modules
577
+ fallback_keys:
578
+ - www-node-modules
579
+ rules:
580
+ - when: never
581
+ if: $CI_PIPELINE_SOURCE == "trigger"
582
+ - if: $CI_MERGE_REQUEST_ID
583
+ needs: []
584
+ retry: *a1
585
+ interruptible: true
586
+ 'www ๐Ÿงช test | review ':
587
+ stage: test
588
+ image: path/to/docker/jobs-testing-chrome:the-version
589
+ variables:
590
+ KUBERNETES_CPU_REQUEST: '0.45'
591
+ KUBERNETES_MEMORY_REQUEST: 1Gi
592
+ KUBERNETES_MEMORY_LIMIT: 4Gi
593
+ script:
594
+ - collapseable_section_start "injectvars" "Injecting variables"
595
+ - export APP_PATH="www"
596
+ - collapseable_section_end "injectvars"
597
+ - collapseable_section_start "nodeinstall" "Ensure node version"
598
+ - if [ -f ~/.nvm/nvm.sh ]; then source ~/.nvm/nvm.sh; fi
599
+ - if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi
600
+ - collapseable_section_end "nodeinstall"
601
+ - cd www
602
+ - collapseable_section_start "nodeinstall" "Ensure node version"
603
+ - if [ -f ~/.nvm/nvm.sh ]; then source ~/.nvm/nvm.sh; fi
604
+ - if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi
605
+ - collapseable_section_end "nodeinstall"
606
+ - collapseable_section_start "yarninstall" "Yarn install"
607
+ - yarn install --immutable
608
+ - collapseable_section_end "yarninstall"
609
+ - yarn test
610
+ cache:
611
+ - key: www-yarn-mr$CI_MERGE_REQUEST_IID
612
+ policy: pull-push
613
+ paths:
614
+ - www/.yarn
615
+ fallback_keys:
616
+ - www-yarn
617
+ - key: www-node-modules-mr$CI_MERGE_REQUEST_IID
618
+ policy: pull-push
619
+ paths:
620
+ - www/node_modules
621
+ fallback_keys:
622
+ - www-node-modules
623
+ rules:
624
+ - when: never
625
+ if: $CI_PIPELINE_SOURCE == "trigger"
626
+ - if: $CI_MERGE_REQUEST_ID
627
+ needs: []
628
+ retry: *a1
629
+ interruptible: true
530
630
  'www ๐Ÿ”จ app | review ':
531
631
  stage: build
532
632
  image: my-custom-image
@@ -584,14 +684,18 @@ www ๐Ÿงช test:
584
684
  - collapseable_section_end "yarninstall"
585
685
  - yarn build
586
686
  cache:
587
- - key: www-yarn
687
+ - key: www-yarn-mr$CI_MERGE_REQUEST_IID
588
688
  policy: pull-push
589
689
  paths:
590
690
  - www/.yarn
591
- - key: www-node-modules
691
+ fallback_keys:
692
+ - www-yarn
693
+ - key: www-node-modules-mr$CI_MERGE_REQUEST_IID
592
694
  policy: pull-push
593
695
  paths:
594
696
  - www/node_modules
697
+ fallback_keys:
698
+ - www-node-modules
595
699
  artifacts:
596
700
  paths:
597
701
  - www/__build_info.json
@@ -658,10 +762,12 @@ www ๐Ÿงช test:
658
762
  - docker push $DOCKER_CACHE_IMAGE
659
763
  - collapseable_section_end "docker-push"
660
764
  cache:
661
- - key: www-yarn
765
+ - key: www-yarn-mr$CI_MERGE_REQUEST_IID
662
766
  policy: pull
663
767
  paths:
664
768
  - www/.yarn
769
+ fallback_keys:
770
+ - www-yarn
665
771
  rules:
666
772
  - when: never
667
773
  if: $CI_PIPELINE_SOURCE == "trigger"
@@ -791,17 +897,17 @@ www ๐Ÿงช test:
791
897
  - when: on_success
792
898
  if: $CI_MERGE_REQUEST_ID
793
899
  needs:
794
- - job: www ๐Ÿ‘ฎ lint
900
+ - job: 'www ๐Ÿ‘ฎ lint | review '
795
901
  artifacts: false
796
902
  - job: 'www ๐Ÿ”จ app | review '
797
903
  artifacts: false
798
904
  - job: 'www ๐Ÿ”จ docker | review '
799
905
  artifacts: false
800
- - job: www ๐Ÿงช test
906
+ - job: 'www ๐Ÿงช test | review '
801
907
  artifacts: false
802
908
  - job: 'www ๐Ÿงพ sbom | review '
803
909
  artifacts: true
804
- - job: www ๐Ÿ›ก audit
910
+ - job: 'www ๐Ÿ›ก audit | review '
805
911
  artifacts: false
806
912
  retry: *a1
807
913
  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: 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
@@ -480,17 +471,17 @@ www ๐Ÿงช test:
480
471
  - when: on_success
481
472
  if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && $CI_COMMIT_MESSAGE !~ /^chore\\(release\\).*/
482
473
  needs:
483
- - job: www ๐Ÿ‘ฎ lint
474
+ - job: 'www ๐Ÿ‘ฎ lint | dev '
484
475
  artifacts: false
485
476
  - job: 'www ๐Ÿ”จ app | dev '
486
477
  artifacts: false
487
478
  - job: 'www ๐Ÿ”จ docker | dev '
488
479
  artifacts: false
489
- - job: www ๐Ÿงช test
480
+ - job: 'www ๐Ÿงช test | dev '
490
481
  artifacts: false
491
482
  - job: 'www ๐Ÿงพ sbom | dev '
492
483
  artifacts: true
493
- - job: www ๐Ÿ›ก audit
484
+ - job: 'www ๐Ÿ›ก audit | dev '
494
485
  artifacts: false
495
486
  retry: *a1
496
487
  interruptible: true
@@ -529,6 +520,115 @@ www ๐Ÿงช test:
529
520
  retry: *a1
530
521
  interruptible: true
531
522
  allow_failure: true
523
+ 'www ๐Ÿ›ก 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="www"
533
+ - collapseable_section_end "injectvars"
534
+ - cd www
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
+ 'www ๐Ÿ‘ฎ 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="www"
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 www
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: www-yarn-mr$CI_MERGE_REQUEST_IID
570
+ policy: pull-push
571
+ paths:
572
+ - www/.yarn
573
+ fallback_keys:
574
+ - www-yarn
575
+ - key: www-node-modules-mr$CI_MERGE_REQUEST_IID
576
+ policy: pull-push
577
+ paths:
578
+ - www/node_modules
579
+ fallback_keys:
580
+ - www-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
+ 'www ๐Ÿงช 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="www"
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 www
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: www-yarn-mr$CI_MERGE_REQUEST_IID
614
+ policy: pull-push
615
+ paths:
616
+ - www/.yarn
617
+ fallback_keys:
618
+ - www-yarn
619
+ - key: www-node-modules-mr$CI_MERGE_REQUEST_IID
620
+ policy: pull-push
621
+ paths:
622
+ - www/node_modules
623
+ fallback_keys:
624
+ - www-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
  'www ๐Ÿ”จ app | review ':
533
633
  stage: build
534
634
  image: path/to/docker/jobs-default:the-version
@@ -586,14 +686,18 @@ www ๐Ÿงช test:
586
686
  - collapseable_section_end "yarninstall"
587
687
  - yarn build
588
688
  cache:
589
- - key: www-yarn
689
+ - key: www-yarn-mr$CI_MERGE_REQUEST_IID
590
690
  policy: pull-push
591
691
  paths:
592
692
  - www/.yarn
593
- - key: www-node-modules
693
+ fallback_keys:
694
+ - www-yarn
695
+ - key: www-node-modules-mr$CI_MERGE_REQUEST_IID
594
696
  policy: pull-push
595
697
  paths:
596
698
  - www/node_modules
699
+ fallback_keys:
700
+ - www-node-modules
597
701
  artifacts:
598
702
  paths:
599
703
  - www/__build_info.json
@@ -662,10 +766,12 @@ www ๐Ÿงช test:
662
766
  - docker push $DOCKER_CACHE_IMAGE
663
767
  - collapseable_section_end "docker-push"
664
768
  cache:
665
- - key: www-yarn
769
+ - key: www-yarn-mr$CI_MERGE_REQUEST_IID
666
770
  policy: pull
667
771
  paths:
668
772
  - www/.yarn
773
+ fallback_keys:
774
+ - www-yarn
669
775
  rules:
670
776
  - when: never
671
777
  if: $CI_PIPELINE_SOURCE == "trigger"
@@ -795,17 +901,17 @@ www ๐Ÿงช test:
795
901
  - when: on_success
796
902
  if: $CI_MERGE_REQUEST_ID
797
903
  needs:
798
- - job: www ๐Ÿ‘ฎ lint
904
+ - job: 'www ๐Ÿ‘ฎ lint | review '
799
905
  artifacts: false
800
906
  - job: 'www ๐Ÿ”จ app | review '
801
907
  artifacts: false
802
908
  - job: 'www ๐Ÿ”จ docker | review '
803
909
  artifacts: false
804
- - job: www ๐Ÿงช test
910
+ - job: 'www ๐Ÿงช test | review '
805
911
  artifacts: false
806
912
  - job: 'www ๐Ÿงพ sbom | review '
807
913
  artifacts: true
808
- - job: www ๐Ÿ›ก audit
914
+ - job: 'www ๐Ÿ›ก audit | review '
809
915
  artifacts: false
810
916
  retry: *a1
811
917
  interruptible: true