@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
- web ๐Ÿ›ก audit:
106
+ 'web ๐Ÿ›ก audit | dev ':
107
107
  stage: test
108
108
  image: path/to/docker/jobs-default:the-version
109
109
  variables:
@@ -120,9 +120,6 @@ web ๐Ÿ›ก 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 @@ web ๐Ÿ›ก audit:
131
128
  - stuck_or_timeout_failure
132
129
  interruptible: true
133
130
  allow_failure: true
134
- web ๐Ÿ‘ฎ lint:
131
+ 'web ๐Ÿ‘ฎ lint | dev ':
135
132
  stage: test
136
133
  image: path/to/docker/jobs-default:the-version
137
134
  variables:
@@ -168,13 +165,10 @@ web ๐Ÿ‘ฎ 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
- web ๐Ÿงช test:
171
+ 'web ๐Ÿงช test | dev ':
178
172
  stage: test
179
173
  image: path/to/docker/jobs-testing-chrome:the-version
180
174
  variables:
@@ -211,9 +205,6 @@ web ๐Ÿงช 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
@@ -504,17 +495,17 @@ web ๐Ÿงช test:
504
495
  - when: on_success
505
496
  if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && $CI_COMMIT_MESSAGE !~ /^chore\\(release\\).*/
506
497
  needs:
507
- - job: web ๐Ÿ‘ฎ lint
498
+ - job: 'web ๐Ÿ‘ฎ lint | dev '
508
499
  artifacts: false
509
500
  - job: 'web ๐Ÿ”จ app | dev '
510
501
  artifacts: false
511
502
  - job: 'web ๐Ÿ”จ docker | dev '
512
503
  artifacts: false
513
- - job: web ๐Ÿงช test
504
+ - job: 'web ๐Ÿงช test | dev '
514
505
  artifacts: false
515
506
  - job: 'web ๐Ÿงพ sbom | dev '
516
507
  artifacts: true
517
- - job: web ๐Ÿ›ก audit
508
+ - job: 'web ๐Ÿ›ก audit | dev '
518
509
  artifacts: false
519
510
  retry: *a1
520
511
  interruptible: true
@@ -621,6 +612,115 @@ web ๐Ÿงช test:
621
612
  retry: *a1
622
613
  interruptible: true
623
614
  allow_failure: true
615
+ 'web ๐Ÿ›ก audit | review ':
616
+ stage: test
617
+ image: path/to/docker/jobs-default:the-version
618
+ variables:
619
+ KUBERNETES_CPU_REQUEST: '0.45'
620
+ KUBERNETES_MEMORY_REQUEST: 1Gi
621
+ KUBERNETES_MEMORY_LIMIT: 4Gi
622
+ script:
623
+ - collapseable_section_start "injectvars" "Injecting variables"
624
+ - export APP_PATH="app"
625
+ - collapseable_section_end "injectvars"
626
+ - cd app
627
+ - yarn npm audit --environment production
628
+ rules:
629
+ - when: never
630
+ if: $CI_PIPELINE_SOURCE == "trigger"
631
+ - if: $CI_MERGE_REQUEST_ID
632
+ needs: []
633
+ retry: *a1
634
+ interruptible: true
635
+ allow_failure: true
636
+ 'web ๐Ÿ‘ฎ lint | review ':
637
+ stage: test
638
+ image: path/to/docker/jobs-default:the-version
639
+ variables:
640
+ KUBERNETES_CPU_REQUEST: '0.45'
641
+ KUBERNETES_MEMORY_REQUEST: 1Gi
642
+ KUBERNETES_MEMORY_LIMIT: 4Gi
643
+ script:
644
+ - collapseable_section_start "injectvars" "Injecting variables"
645
+ - export APP_PATH="app"
646
+ - collapseable_section_end "injectvars"
647
+ - collapseable_section_start "nodeinstall" "Ensure node version"
648
+ - if [ -f ~/.nvm/nvm.sh ]; then source ~/.nvm/nvm.sh; fi
649
+ - if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi
650
+ - collapseable_section_end "nodeinstall"
651
+ - cd app
652
+ - collapseable_section_start "nodeinstall" "Ensure node version"
653
+ - if [ -f ~/.nvm/nvm.sh ]; then source ~/.nvm/nvm.sh; fi
654
+ - if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi
655
+ - collapseable_section_end "nodeinstall"
656
+ - collapseable_section_start "yarninstall" "Yarn install"
657
+ - yarn install --immutable
658
+ - collapseable_section_end "yarninstall"
659
+ - yarn lint
660
+ cache:
661
+ - key: app-yarn-mr$CI_MERGE_REQUEST_IID
662
+ policy: pull-push
663
+ paths:
664
+ - app/.yarn
665
+ fallback_keys:
666
+ - app-yarn
667
+ - key: app-node-modules-mr$CI_MERGE_REQUEST_IID
668
+ policy: pull-push
669
+ paths:
670
+ - app/node_modules
671
+ fallback_keys:
672
+ - app-node-modules
673
+ rules:
674
+ - when: never
675
+ if: $CI_PIPELINE_SOURCE == "trigger"
676
+ - if: $CI_MERGE_REQUEST_ID
677
+ needs: []
678
+ retry: *a1
679
+ interruptible: true
680
+ 'web ๐Ÿงช test | review ':
681
+ stage: test
682
+ image: path/to/docker/jobs-testing-chrome:the-version
683
+ variables:
684
+ KUBERNETES_CPU_REQUEST: '0.45'
685
+ KUBERNETES_MEMORY_REQUEST: 1Gi
686
+ KUBERNETES_MEMORY_LIMIT: 4Gi
687
+ script:
688
+ - collapseable_section_start "injectvars" "Injecting variables"
689
+ - export APP_PATH="app"
690
+ - collapseable_section_end "injectvars"
691
+ - collapseable_section_start "nodeinstall" "Ensure node version"
692
+ - if [ -f ~/.nvm/nvm.sh ]; then source ~/.nvm/nvm.sh; fi
693
+ - if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi
694
+ - collapseable_section_end "nodeinstall"
695
+ - cd app
696
+ - collapseable_section_start "nodeinstall" "Ensure node version"
697
+ - if [ -f ~/.nvm/nvm.sh ]; then source ~/.nvm/nvm.sh; fi
698
+ - if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi
699
+ - collapseable_section_end "nodeinstall"
700
+ - collapseable_section_start "yarninstall" "Yarn install"
701
+ - yarn install --immutable
702
+ - collapseable_section_end "yarninstall"
703
+ - yarn test
704
+ cache:
705
+ - key: app-yarn-mr$CI_MERGE_REQUEST_IID
706
+ policy: pull-push
707
+ paths:
708
+ - app/.yarn
709
+ fallback_keys:
710
+ - app-yarn
711
+ - key: app-node-modules-mr$CI_MERGE_REQUEST_IID
712
+ policy: pull-push
713
+ paths:
714
+ - app/node_modules
715
+ fallback_keys:
716
+ - app-node-modules
717
+ rules:
718
+ - when: never
719
+ if: $CI_PIPELINE_SOURCE == "trigger"
720
+ - if: $CI_MERGE_REQUEST_ID
721
+ needs: []
722
+ retry: *a1
723
+ interruptible: true
624
724
  'web ๐Ÿ”จ app | review ':
625
725
  stage: build
626
726
  image: path/to/docker/jobs-meteor:the-version
@@ -666,21 +766,27 @@ web ๐Ÿงช test:
666
766
  - TOOL_NODE_FLAGS="--max_old_space_size=3584 --min_semi_space_size=8 --max_semi_space_size=256 --optimize_for_size" meteor build ./dist --architecture os.linux.x86_64 --allow-superuser --server-only --directory
667
767
  - cp ./__build_info.json ./dist/bundle/programs/server
668
768
  cache:
669
- - key: app-yarn
769
+ - key: app-yarn-mr$CI_MERGE_REQUEST_IID
670
770
  policy: pull-push
671
771
  paths:
672
772
  - app/.yarn
673
- - key: app-node-modules
773
+ fallback_keys:
774
+ - app-yarn
775
+ - key: app-node-modules-mr$CI_MERGE_REQUEST_IID
674
776
  policy: pull-push
675
777
  paths:
676
778
  - app/node_modules
677
- - key: web-meteor-build-cache
779
+ fallback_keys:
780
+ - app-node-modules
781
+ - key: web-meteor-build-cache-mr$CI_MERGE_REQUEST_IID
678
782
  policy: pull-push
679
783
  paths:
680
784
  - app/.meteor/local/resolver-result-cache.json
681
785
  - app/.meteor/local/plugin-cache
682
786
  - app/.meteor/local/isopacks
683
787
  - app/.meteor/local/bundler-cache/scanner
788
+ fallback_keys:
789
+ - web-meteor-build-cache
684
790
  artifacts:
685
791
  paths:
686
792
  - app/__build_info.json
@@ -909,17 +1015,17 @@ web ๐Ÿงช test:
909
1015
  - when: on_success
910
1016
  if: $CI_MERGE_REQUEST_ID
911
1017
  needs:
912
- - job: web ๐Ÿ‘ฎ lint
1018
+ - job: 'web ๐Ÿ‘ฎ lint | review '
913
1019
  artifacts: false
914
1020
  - job: 'web ๐Ÿ”จ app | review '
915
1021
  artifacts: false
916
1022
  - job: 'web ๐Ÿ”จ docker | review '
917
1023
  artifacts: false
918
- - job: web ๐Ÿงช test
1024
+ - job: 'web ๐Ÿงช test | review '
919
1025
  artifacts: false
920
1026
  - job: 'web ๐Ÿงพ sbom | review '
921
1027
  artifacts: true
922
- - job: web ๐Ÿ›ก audit
1028
+ - job: 'web ๐Ÿ›ก audit | review '
923
1029
  artifacts: false
924
1030
  retry: *a1
925
1031
  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
@@ -314,6 +305,115 @@ api ๐Ÿงช test:
314
305
  retry: *a1
315
306
  interruptible: true
316
307
  allow_failure: true
308
+ 'api ๐Ÿ›ก audit | review ':
309
+ stage: test
310
+ image: path/to/docker/jobs-default:the-version
311
+ variables:
312
+ KUBERNETES_CPU_REQUEST: '0.45'
313
+ KUBERNETES_MEMORY_REQUEST: 1Gi
314
+ KUBERNETES_MEMORY_LIMIT: 4Gi
315
+ script:
316
+ - collapseable_section_start "injectvars" "Injecting variables"
317
+ - export APP_PATH="api"
318
+ - collapseable_section_end "injectvars"
319
+ - cd api
320
+ - yarn npm audit --environment production
321
+ rules:
322
+ - when: never
323
+ if: $CI_PIPELINE_SOURCE == "trigger"
324
+ - if: $CI_MERGE_REQUEST_ID
325
+ needs: []
326
+ retry: *a1
327
+ interruptible: true
328
+ allow_failure: true
329
+ 'api ๐Ÿ‘ฎ lint | review ':
330
+ stage: test
331
+ image: path/to/docker/jobs-default:the-version
332
+ variables:
333
+ KUBERNETES_CPU_REQUEST: '0.45'
334
+ KUBERNETES_MEMORY_REQUEST: 1Gi
335
+ KUBERNETES_MEMORY_LIMIT: 4Gi
336
+ script:
337
+ - collapseable_section_start "injectvars" "Injecting variables"
338
+ - export APP_PATH="api"
339
+ - collapseable_section_end "injectvars"
340
+ - collapseable_section_start "nodeinstall" "Ensure node version"
341
+ - if [ -f ~/.nvm/nvm.sh ]; then source ~/.nvm/nvm.sh; fi
342
+ - if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi
343
+ - collapseable_section_end "nodeinstall"
344
+ - cd api
345
+ - collapseable_section_start "nodeinstall" "Ensure node version"
346
+ - if [ -f ~/.nvm/nvm.sh ]; then source ~/.nvm/nvm.sh; fi
347
+ - if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi
348
+ - collapseable_section_end "nodeinstall"
349
+ - collapseable_section_start "yarninstall" "Yarn install"
350
+ - yarn install --immutable
351
+ - collapseable_section_end "yarninstall"
352
+ - yarn lint
353
+ cache:
354
+ - key: api-yarn-mr$CI_MERGE_REQUEST_IID
355
+ policy: pull-push
356
+ paths:
357
+ - api/.yarn
358
+ fallback_keys:
359
+ - api-yarn
360
+ - key: api-node-modules-mr$CI_MERGE_REQUEST_IID
361
+ policy: pull-push
362
+ paths:
363
+ - api/node_modules
364
+ fallback_keys:
365
+ - api-node-modules
366
+ rules:
367
+ - when: never
368
+ if: $CI_PIPELINE_SOURCE == "trigger"
369
+ - if: $CI_MERGE_REQUEST_ID
370
+ needs: []
371
+ retry: *a1
372
+ interruptible: true
373
+ 'api ๐Ÿงช test | review ':
374
+ stage: test
375
+ image: path/to/docker/jobs-testing-chrome:the-version
376
+ variables:
377
+ KUBERNETES_CPU_REQUEST: '0.45'
378
+ KUBERNETES_MEMORY_REQUEST: 1Gi
379
+ KUBERNETES_MEMORY_LIMIT: 4Gi
380
+ script:
381
+ - collapseable_section_start "injectvars" "Injecting variables"
382
+ - export APP_PATH="api"
383
+ - collapseable_section_end "injectvars"
384
+ - collapseable_section_start "nodeinstall" "Ensure node version"
385
+ - if [ -f ~/.nvm/nvm.sh ]; then source ~/.nvm/nvm.sh; fi
386
+ - if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi
387
+ - collapseable_section_end "nodeinstall"
388
+ - cd api
389
+ - collapseable_section_start "nodeinstall" "Ensure node version"
390
+ - if [ -f ~/.nvm/nvm.sh ]; then source ~/.nvm/nvm.sh; fi
391
+ - if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi
392
+ - collapseable_section_end "nodeinstall"
393
+ - collapseable_section_start "yarninstall" "Yarn install"
394
+ - yarn install --immutable
395
+ - collapseable_section_end "yarninstall"
396
+ - yarn test
397
+ cache:
398
+ - key: api-yarn-mr$CI_MERGE_REQUEST_IID
399
+ policy: pull-push
400
+ paths:
401
+ - api/.yarn
402
+ fallback_keys:
403
+ - api-yarn
404
+ - key: api-node-modules-mr$CI_MERGE_REQUEST_IID
405
+ policy: pull-push
406
+ paths:
407
+ - api/node_modules
408
+ fallback_keys:
409
+ - api-node-modules
410
+ rules:
411
+ - when: never
412
+ if: $CI_PIPELINE_SOURCE == "trigger"
413
+ - if: $CI_MERGE_REQUEST_ID
414
+ needs: []
415
+ retry: *a1
416
+ interruptible: true
317
417
  'api ๐Ÿ”จ app | review ':
318
418
  stage: build
319
419
  image: path/to/docker/jobs-default:the-version
@@ -363,14 +463,18 @@ api ๐Ÿงช test:
363
463
  - collapseable_section_end "yarninstall"
364
464
  - yarn build
365
465
  cache:
366
- - key: api-yarn
466
+ - key: api-yarn-mr$CI_MERGE_REQUEST_IID
367
467
  policy: pull-push
368
468
  paths:
369
469
  - api/.yarn
370
- - key: api-node-modules
470
+ fallback_keys:
471
+ - api-yarn
472
+ - key: api-node-modules-mr$CI_MERGE_REQUEST_IID
371
473
  policy: pull-push
372
474
  paths:
373
475
  - api/node_modules
476
+ fallback_keys:
477
+ - api-node-modules
374
478
  artifacts:
375
479
  paths:
376
480
  - api/__build_info.json
@@ -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
@@ -314,6 +305,115 @@ api ๐Ÿงช test:
314
305
  retry: *a1
315
306
  interruptible: true
316
307
  allow_failure: true
308
+ 'api ๐Ÿ›ก audit | review ':
309
+ stage: test
310
+ image: path/to/docker/jobs-default:the-version
311
+ variables:
312
+ KUBERNETES_CPU_REQUEST: '0.45'
313
+ KUBERNETES_MEMORY_REQUEST: 1Gi
314
+ KUBERNETES_MEMORY_LIMIT: 4Gi
315
+ script:
316
+ - collapseable_section_start "injectvars" "Injecting variables"
317
+ - export APP_PATH="api"
318
+ - collapseable_section_end "injectvars"
319
+ - cd api
320
+ - yarn npm audit --environment production
321
+ rules:
322
+ - when: never
323
+ if: $CI_PIPELINE_SOURCE == "trigger"
324
+ - if: $CI_MERGE_REQUEST_ID
325
+ needs: []
326
+ retry: *a1
327
+ interruptible: true
328
+ allow_failure: true
329
+ 'api ๐Ÿ‘ฎ lint | review ':
330
+ stage: test
331
+ image: path/to/docker/jobs-default:the-version
332
+ variables:
333
+ KUBERNETES_CPU_REQUEST: '0.45'
334
+ KUBERNETES_MEMORY_REQUEST: 1Gi
335
+ KUBERNETES_MEMORY_LIMIT: 4Gi
336
+ script:
337
+ - collapseable_section_start "injectvars" "Injecting variables"
338
+ - export APP_PATH="api"
339
+ - collapseable_section_end "injectvars"
340
+ - collapseable_section_start "nodeinstall" "Ensure node version"
341
+ - if [ -f ~/.nvm/nvm.sh ]; then source ~/.nvm/nvm.sh; fi
342
+ - if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi
343
+ - collapseable_section_end "nodeinstall"
344
+ - cd api
345
+ - collapseable_section_start "nodeinstall" "Ensure node version"
346
+ - if [ -f ~/.nvm/nvm.sh ]; then source ~/.nvm/nvm.sh; fi
347
+ - if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi
348
+ - collapseable_section_end "nodeinstall"
349
+ - collapseable_section_start "yarninstall" "Yarn install"
350
+ - yarn install --immutable
351
+ - collapseable_section_end "yarninstall"
352
+ - yarn lint
353
+ cache:
354
+ - key: api-yarn-mr$CI_MERGE_REQUEST_IID
355
+ policy: pull-push
356
+ paths:
357
+ - api/.yarn
358
+ fallback_keys:
359
+ - api-yarn
360
+ - key: api-node-modules-mr$CI_MERGE_REQUEST_IID
361
+ policy: pull-push
362
+ paths:
363
+ - api/node_modules
364
+ fallback_keys:
365
+ - api-node-modules
366
+ rules:
367
+ - when: never
368
+ if: $CI_PIPELINE_SOURCE == "trigger"
369
+ - if: $CI_MERGE_REQUEST_ID
370
+ needs: []
371
+ retry: *a1
372
+ interruptible: true
373
+ 'api ๐Ÿงช test | review ':
374
+ stage: test
375
+ image: path/to/docker/jobs-testing-chrome:the-version
376
+ variables:
377
+ KUBERNETES_CPU_REQUEST: '0.45'
378
+ KUBERNETES_MEMORY_REQUEST: 1Gi
379
+ KUBERNETES_MEMORY_LIMIT: 4Gi
380
+ script:
381
+ - collapseable_section_start "injectvars" "Injecting variables"
382
+ - export APP_PATH="api"
383
+ - collapseable_section_end "injectvars"
384
+ - collapseable_section_start "nodeinstall" "Ensure node version"
385
+ - if [ -f ~/.nvm/nvm.sh ]; then source ~/.nvm/nvm.sh; fi
386
+ - if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi
387
+ - collapseable_section_end "nodeinstall"
388
+ - cd api
389
+ - collapseable_section_start "nodeinstall" "Ensure node version"
390
+ - if [ -f ~/.nvm/nvm.sh ]; then source ~/.nvm/nvm.sh; fi
391
+ - if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi
392
+ - collapseable_section_end "nodeinstall"
393
+ - collapseable_section_start "yarninstall" "Yarn install"
394
+ - yarn install --immutable
395
+ - collapseable_section_end "yarninstall"
396
+ - yarn test
397
+ cache:
398
+ - key: api-yarn-mr$CI_MERGE_REQUEST_IID
399
+ policy: pull-push
400
+ paths:
401
+ - api/.yarn
402
+ fallback_keys:
403
+ - api-yarn
404
+ - key: api-node-modules-mr$CI_MERGE_REQUEST_IID
405
+ policy: pull-push
406
+ paths:
407
+ - api/node_modules
408
+ fallback_keys:
409
+ - api-node-modules
410
+ rules:
411
+ - when: never
412
+ if: $CI_PIPELINE_SOURCE == "trigger"
413
+ - if: $CI_MERGE_REQUEST_ID
414
+ needs: []
415
+ retry: *a1
416
+ interruptible: true
317
417
  'api ๐Ÿ”จ app | review ':
318
418
  stage: build
319
419
  image: path/to/docker/jobs-default:the-version
@@ -363,14 +463,18 @@ api ๐Ÿงช test:
363
463
  - collapseable_section_end "yarninstall"
364
464
  - yarn build
365
465
  cache:
366
- - key: api-yarn
466
+ - key: api-yarn-mr$CI_MERGE_REQUEST_IID
367
467
  policy: pull-push
368
468
  paths:
369
469
  - api/.yarn
370
- - key: api-node-modules
470
+ fallback_keys:
471
+ - api-yarn
472
+ - key: api-node-modules-mr$CI_MERGE_REQUEST_IID
371
473
  policy: pull-push
372
474
  paths:
373
475
  - api/node_modules
476
+ fallback_keys:
477
+ - api-node-modules
374
478
  artifacts:
375
479
  paths:
376
480
  - api/__build_info.json