@catladder/pipeline 3.24.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 (75) hide show
  1. package/dist/build/custom/testJob.js +1 -2
  2. package/dist/build/index.js +2 -1
  3. package/dist/build/node/testJob.js +1 -2
  4. package/dist/build/rails/test.js +1 -2
  5. package/dist/constants.js +1 -1
  6. package/dist/pipeline/agent/createAgentReviewJob.js +1 -0
  7. package/dist/pipeline/agent/shared.d.ts +1 -1
  8. package/dist/pipeline/agent/shared.js +0 -1
  9. package/dist/pipeline/createMainPipeline.js +1 -0
  10. package/dist/pipeline/gitlab/cache.d.ts +9 -0
  11. package/dist/pipeline/gitlab/cache.js +47 -0
  12. package/dist/pipeline/gitlab/createGitlabJobs.js +7 -7
  13. package/dist/tsconfig.tsbuildinfo +1 -1
  14. package/dist/types/jobs.d.ts +2 -3
  15. package/examples/__snapshots__/automatic-releases.test.ts.snap +131 -21
  16. package/examples/__snapshots__/cloud-run-health-check-defaults.test.ts.snap +131 -21
  17. package/examples/__snapshots__/cloud-run-health-check-only-startup.test.ts.snap +131 -21
  18. package/examples/__snapshots__/cloud-run-health-check.test.ts.snap +131 -21
  19. package/examples/__snapshots__/cloud-run-http2.test.ts.snap +131 -21
  20. package/examples/__snapshots__/cloud-run-memory-limit.test.ts.snap +131 -21
  21. package/examples/__snapshots__/cloud-run-meteor-with-worker.test.ts.snap +127 -21
  22. package/examples/__snapshots__/cloud-run-nextjs.test.ts.snap +134 -22
  23. package/examples/__snapshots__/cloud-run-no-cpu-throttling.test.ts.snap +131 -21
  24. package/examples/__snapshots__/cloud-run-no-service.test.ts.snap +131 -21
  25. package/examples/__snapshots__/cloud-run-non-public.test.ts.snap +131 -21
  26. package/examples/__snapshots__/cloud-run-post-stop-job.test.ts.snap +131 -21
  27. package/examples/__snapshots__/cloud-run-service-custom-vpc-connector.test.ts.snap +131 -21
  28. package/examples/__snapshots__/cloud-run-service-custom-vpc.test.ts.snap +131 -21
  29. package/examples/__snapshots__/cloud-run-service-gen2.test.ts.snap +131 -21
  30. package/examples/__snapshots__/cloud-run-service-increase-timout.test.ts.snap +131 -21
  31. package/examples/__snapshots__/cloud-run-service-with-volumes.test.ts.snap +131 -21
  32. package/examples/__snapshots__/cloud-run-storybook.test.ts.snap +13 -3
  33. package/examples/__snapshots__/cloud-run-with-agents.test.ts.snap +134 -22
  34. package/examples/__snapshots__/cloud-run-with-gpu.test.ts.snap +131 -21
  35. package/examples/__snapshots__/cloud-run-with-ngnix.test.ts.snap +131 -21
  36. package/examples/__snapshots__/cloud-run-with-sql-legacy-jobs.test.ts.snap +131 -21
  37. package/examples/__snapshots__/cloud-run-with-sql-multiple-dbs.test.ts.snap +393 -63
  38. package/examples/__snapshots__/cloud-run-with-sql-reuse-db.test.ts.snap +262 -42
  39. package/examples/__snapshots__/cloud-run-with-sql.test.ts.snap +131 -21
  40. package/examples/__snapshots__/cloud-run-with-worker.test.ts.snap +131 -21
  41. package/examples/__snapshots__/custom-build-job-with-tests.test.ts.snap +93 -22
  42. package/examples/__snapshots__/custom-deploy.test.ts.snap +131 -21
  43. package/examples/__snapshots__/custom-envs.test.ts.snap +326 -32
  44. package/examples/__snapshots__/custom-verify-job.test.ts.snap +134 -22
  45. package/examples/__snapshots__/git-submodule.test.ts.snap +131 -21
  46. package/examples/__snapshots__/kubernetes-application-customization.test.ts.snap +135 -21
  47. package/examples/__snapshots__/kubernetes-with-cloud-sql.test.ts.snap +135 -21
  48. package/examples/__snapshots__/kubernetes-with-jobs.test.ts.snap +266 -42
  49. package/examples/__snapshots__/kubernetes-with-mongodb.test.ts.snap +135 -21
  50. package/examples/__snapshots__/local-dot-env.test.ts.snap +135 -21
  51. package/examples/__snapshots__/meteor-kubernetes.test.ts.snap +127 -21
  52. package/examples/__snapshots__/modify-generated-files.test.ts.snap +122 -14
  53. package/examples/__snapshots__/modify-generated-yaml.test.ts.snap +122 -14
  54. package/examples/__snapshots__/multiline-var.test.ts.snap +393 -63
  55. package/examples/__snapshots__/native-app.test.ts.snap +265 -41
  56. package/examples/__snapshots__/node-build-with-custom-image.test.ts.snap +131 -21
  57. package/examples/__snapshots__/node-build-with-docker-additions.test.ts.snap +131 -21
  58. package/examples/__snapshots__/override-secrets.test.ts.snap +131 -21
  59. package/examples/__snapshots__/rails-k8s-with-worker-dockerfile.test.ts.snap +84 -22
  60. package/examples/__snapshots__/rails-k8s-with-worker.test.ts.snap +84 -22
  61. package/examples/__snapshots__/referencing-other-vars.test.ts.snap +393 -63
  62. package/examples/__snapshots__/wait-for-other-deploy.test.ts.snap +256 -40
  63. package/examples/__snapshots__/workspace-api-www-turbo-cache.test.ts.snap +147 -29
  64. package/examples/__snapshots__/workspace-api-www.test.ts.snap +147 -29
  65. package/package.json +1 -1
  66. package/src/build/custom/testJob.ts +0 -1
  67. package/src/build/index.ts +1 -0
  68. package/src/build/node/testJob.ts +0 -1
  69. package/src/build/rails/test.ts +0 -1
  70. package/src/pipeline/agent/createAgentReviewJob.ts +1 -0
  71. package/src/pipeline/agent/shared.ts +2 -2
  72. package/src/pipeline/createMainPipeline.ts +1 -0
  73. package/src/pipeline/gitlab/cache.ts +49 -0
  74. package/src/pipeline/gitlab/createGitlabJobs.ts +7 -9
  75. 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
- ๐Ÿ”ธ myWorkspace ๐Ÿ›ก audit:
106
+ '๐Ÿ”ธ myWorkspace ๐Ÿ›ก audit | dev ':
107
107
  stage: test
108
108
  image: path/to/docker/jobs-default:the-version
109
109
  variables:
@@ -120,9 +120,6 @@ before_script:
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 @@ before_script:
131
128
  - stuck_or_timeout_failure
132
129
  interruptible: true
133
130
  allow_failure: true
134
- ๐Ÿ”ธ myWorkspace ๐Ÿ‘ฎ lint:
131
+ '๐Ÿ”ธ myWorkspace ๐Ÿ‘ฎ lint | dev ':
135
132
  stage: test
136
133
  image: path/to/docker/jobs-default:the-version
137
134
  variables:
@@ -168,13 +165,10 @@ before_script:
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
- ๐Ÿ”ธ myWorkspace ๐Ÿงช test:
171
+ '๐Ÿ”ธ myWorkspace ๐Ÿงช test | dev ':
178
172
  stage: test
179
173
  image: path/to/docker/jobs-testing-chrome:the-version
180
174
  variables:
@@ -211,9 +205,6 @@ before_script:
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
@@ -298,7 +289,9 @@ before_script:
298
289
  - www/dist
299
290
  exclude:
300
291
  - api/.env
292
+ - api/.next/cache/**/*
301
293
  - www/.env
294
+ - www/.next/cache/**/*
302
295
  expire_in: 1 day
303
296
  when: always
304
297
  reports: {}
@@ -309,6 +302,115 @@ before_script:
309
302
  needs: []
310
303
  retry: *a1
311
304
  interruptible: true
305
+ '๐Ÿ”ธ myWorkspace ๐Ÿ›ก audit | review ':
306
+ stage: test
307
+ image: path/to/docker/jobs-default:the-version
308
+ variables:
309
+ KUBERNETES_CPU_REQUEST: '0.45'
310
+ KUBERNETES_MEMORY_REQUEST: 1Gi
311
+ KUBERNETES_MEMORY_LIMIT: 4Gi
312
+ script:
313
+ - collapseable_section_start "injectvars" "Injecting variables"
314
+ - export APP_PATH="."
315
+ - collapseable_section_end "injectvars"
316
+ - cd .
317
+ - yarn npm audit --environment production
318
+ rules:
319
+ - when: never
320
+ if: $CI_PIPELINE_SOURCE == "trigger"
321
+ - if: $CI_MERGE_REQUEST_ID
322
+ needs: []
323
+ retry: *a1
324
+ interruptible: true
325
+ allow_failure: true
326
+ '๐Ÿ”ธ myWorkspace ๐Ÿ‘ฎ lint | review ':
327
+ stage: test
328
+ image: path/to/docker/jobs-default:the-version
329
+ variables:
330
+ KUBERNETES_CPU_REQUEST: '0.45'
331
+ KUBERNETES_MEMORY_REQUEST: 1Gi
332
+ KUBERNETES_MEMORY_LIMIT: 4Gi
333
+ script:
334
+ - collapseable_section_start "injectvars" "Injecting variables"
335
+ - export APP_PATH="."
336
+ - collapseable_section_end "injectvars"
337
+ - collapseable_section_start "nodeinstall" "Ensure node version"
338
+ - if [ -f ~/.nvm/nvm.sh ]; then source ~/.nvm/nvm.sh; fi
339
+ - if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi
340
+ - collapseable_section_end "nodeinstall"
341
+ - cd .
342
+ - collapseable_section_start "nodeinstall" "Ensure node version"
343
+ - if [ -f ~/.nvm/nvm.sh ]; then source ~/.nvm/nvm.sh; fi
344
+ - if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi
345
+ - collapseable_section_end "nodeinstall"
346
+ - collapseable_section_start "yarninstall" "Yarn install"
347
+ - yarn install --immutable
348
+ - collapseable_section_end "yarninstall"
349
+ - yarn lint
350
+ cache:
351
+ - key: .-yarn-mr$CI_MERGE_REQUEST_IID
352
+ policy: pull-push
353
+ paths:
354
+ - .yarn
355
+ fallback_keys:
356
+ - .-yarn
357
+ - key: .-node-modules-mr$CI_MERGE_REQUEST_IID
358
+ policy: pull-push
359
+ paths:
360
+ - node_modules
361
+ fallback_keys:
362
+ - .-node-modules
363
+ rules:
364
+ - when: never
365
+ if: $CI_PIPELINE_SOURCE == "trigger"
366
+ - if: $CI_MERGE_REQUEST_ID
367
+ needs: []
368
+ retry: *a1
369
+ interruptible: true
370
+ '๐Ÿ”ธ myWorkspace ๐Ÿงช test | review ':
371
+ stage: test
372
+ image: path/to/docker/jobs-testing-chrome:the-version
373
+ variables:
374
+ KUBERNETES_CPU_REQUEST: '0.45'
375
+ KUBERNETES_MEMORY_REQUEST: 1Gi
376
+ KUBERNETES_MEMORY_LIMIT: 4Gi
377
+ script:
378
+ - collapseable_section_start "injectvars" "Injecting variables"
379
+ - export APP_PATH="."
380
+ - collapseable_section_end "injectvars"
381
+ - collapseable_section_start "nodeinstall" "Ensure node version"
382
+ - if [ -f ~/.nvm/nvm.sh ]; then source ~/.nvm/nvm.sh; fi
383
+ - if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi
384
+ - collapseable_section_end "nodeinstall"
385
+ - cd .
386
+ - collapseable_section_start "nodeinstall" "Ensure node version"
387
+ - if [ -f ~/.nvm/nvm.sh ]; then source ~/.nvm/nvm.sh; fi
388
+ - if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi
389
+ - collapseable_section_end "nodeinstall"
390
+ - collapseable_section_start "yarninstall" "Yarn install"
391
+ - yarn install --immutable
392
+ - collapseable_section_end "yarninstall"
393
+ - yarn test
394
+ cache:
395
+ - key: .-yarn-mr$CI_MERGE_REQUEST_IID
396
+ policy: pull-push
397
+ paths:
398
+ - .yarn
399
+ fallback_keys:
400
+ - .-yarn
401
+ - key: .-node-modules-mr$CI_MERGE_REQUEST_IID
402
+ policy: pull-push
403
+ paths:
404
+ - node_modules
405
+ fallback_keys:
406
+ - .-node-modules
407
+ rules:
408
+ - when: never
409
+ if: $CI_PIPELINE_SOURCE == "trigger"
410
+ - if: $CI_MERGE_REQUEST_ID
411
+ needs: []
412
+ retry: *a1
413
+ interruptible: true
312
414
  '๐Ÿ”ธ myWorkspace ๐Ÿ”จ app | review ':
313
415
  stage: build
314
416
  image: path/to/docker/jobs-default:the-version
@@ -368,20 +470,26 @@ before_script:
368
470
  - collapseable_section_end "yarninstall"
369
471
  - yarn build
370
472
  cache:
371
- - key: .-yarn
473
+ - key: .-yarn-mr$CI_MERGE_REQUEST_IID
372
474
  policy: pull-push
373
475
  paths:
374
476
  - .yarn
375
- - key: .-node-modules
477
+ fallback_keys:
478
+ - .-yarn
479
+ - key: .-node-modules-mr$CI_MERGE_REQUEST_IID
376
480
  policy: pull-push
377
481
  paths:
378
482
  - node_modules
379
- - key: myWorkspace-default
483
+ fallback_keys:
484
+ - .-node-modules
485
+ - key: myWorkspace-default-mr$CI_MERGE_REQUEST_IID
380
486
  policy: pull-push
381
487
  paths:
382
488
  - .turbo
383
489
  - api/.component-custom-cache
384
490
  - www/.next/cache
491
+ fallback_keys:
492
+ - myWorkspace-default
385
493
  artifacts:
386
494
  paths:
387
495
  - api/.next
@@ -390,7 +498,9 @@ before_script:
390
498
  - www/dist
391
499
  exclude:
392
500
  - api/.env
501
+ - api/.next/cache/**/*
393
502
  - www/.env
503
+ - www/.next/cache/**/*
394
504
  expire_in: 1 day
395
505
  when: always
396
506
  reports: {}
@@ -482,7 +592,9 @@ before_script:
482
592
  - www/dist
483
593
  exclude:
484
594
  - api/.env
595
+ - api/.next/cache/**/*
485
596
  - www/.env
597
+ - www/.next/cache/**/*
486
598
  expire_in: 1 day
487
599
  when: always
488
600
  reports: {}
@@ -574,7 +686,9 @@ before_script:
574
686
  - www/dist
575
687
  exclude:
576
688
  - api/.env
689
+ - api/.next/cache/**/*
577
690
  - www/.env
691
+ - www/.next/cache/**/*
578
692
  expire_in: 1 day
579
693
  when: always
580
694
  reports: {}
@@ -764,11 +878,11 @@ before_script:
764
878
  - when: on_success
765
879
  if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && $CI_COMMIT_MESSAGE !~ /^chore\\(release\\).*/
766
880
  needs:
767
- - job: ๐Ÿ”ธ myWorkspace ๐Ÿ‘ฎ lint
881
+ - job: '๐Ÿ”ธ myWorkspace ๐Ÿ‘ฎ lint | dev '
768
882
  artifacts: false
769
- - job: ๐Ÿ”ธ myWorkspace ๐Ÿงช test
883
+ - job: '๐Ÿ”ธ myWorkspace ๐Ÿงช test | dev '
770
884
  artifacts: false
771
- - job: ๐Ÿ”ธ myWorkspace ๐Ÿ›ก audit
885
+ - job: '๐Ÿ”ธ myWorkspace ๐Ÿ›ก audit | dev '
772
886
  artifacts: false
773
887
  - job: '๐Ÿ”น api ๐Ÿ”จ docker | dev '
774
888
  artifacts: false
@@ -859,10 +973,12 @@ before_script:
859
973
  - docker push $DOCKER_CACHE_IMAGE
860
974
  - collapseable_section_end "docker-push"
861
975
  cache:
862
- - key: api-yarn
976
+ - key: api-yarn-mr$CI_MERGE_REQUEST_IID
863
977
  policy: pull
864
978
  paths:
865
979
  - api/.yarn
980
+ fallback_keys:
981
+ - api-yarn
866
982
  rules:
867
983
  - when: never
868
984
  if: $CI_PIPELINE_SOURCE == "trigger"
@@ -993,11 +1109,11 @@ before_script:
993
1109
  - when: on_success
994
1110
  if: $CI_MERGE_REQUEST_ID
995
1111
  needs:
996
- - job: ๐Ÿ”ธ myWorkspace ๐Ÿ‘ฎ lint
1112
+ - job: '๐Ÿ”ธ myWorkspace ๐Ÿ‘ฎ lint | review '
997
1113
  artifacts: false
998
- - job: ๐Ÿ”ธ myWorkspace ๐Ÿงช test
1114
+ - job: '๐Ÿ”ธ myWorkspace ๐Ÿงช test | review '
999
1115
  artifacts: false
1000
- - job: ๐Ÿ”ธ myWorkspace ๐Ÿ›ก audit
1116
+ - job: '๐Ÿ”ธ myWorkspace ๐Ÿ›ก audit | review '
1001
1117
  artifacts: false
1002
1118
  - job: '๐Ÿ”น api ๐Ÿ”จ docker | review '
1003
1119
  artifacts: false
@@ -1663,11 +1779,11 @@ before_script:
1663
1779
  - when: on_success
1664
1780
  if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && $CI_COMMIT_MESSAGE !~ /^chore\\(release\\).*/
1665
1781
  needs:
1666
- - job: ๐Ÿ”ธ myWorkspace ๐Ÿ‘ฎ lint
1782
+ - job: '๐Ÿ”ธ myWorkspace ๐Ÿ‘ฎ lint | dev '
1667
1783
  artifacts: false
1668
- - job: ๐Ÿ”ธ myWorkspace ๐Ÿงช test
1784
+ - job: '๐Ÿ”ธ myWorkspace ๐Ÿงช test | dev '
1669
1785
  artifacts: false
1670
- - job: ๐Ÿ”ธ myWorkspace ๐Ÿ›ก audit
1786
+ - job: '๐Ÿ”ธ myWorkspace ๐Ÿ›ก audit | dev '
1671
1787
  artifacts: false
1672
1788
  - job: '๐Ÿ”น www ๐Ÿ”จ docker | dev '
1673
1789
  artifacts: false
@@ -1758,10 +1874,12 @@ before_script:
1758
1874
  - docker push $DOCKER_CACHE_IMAGE
1759
1875
  - collapseable_section_end "docker-push"
1760
1876
  cache:
1761
- - key: www-yarn
1877
+ - key: www-yarn-mr$CI_MERGE_REQUEST_IID
1762
1878
  policy: pull
1763
1879
  paths:
1764
1880
  - www/.yarn
1881
+ fallback_keys:
1882
+ - www-yarn
1765
1883
  rules:
1766
1884
  - when: never
1767
1885
  if: $CI_PIPELINE_SOURCE == "trigger"
@@ -1895,11 +2013,11 @@ before_script:
1895
2013
  - when: on_success
1896
2014
  if: $CI_MERGE_REQUEST_ID
1897
2015
  needs:
1898
- - job: ๐Ÿ”ธ myWorkspace ๐Ÿ‘ฎ lint
2016
+ - job: '๐Ÿ”ธ myWorkspace ๐Ÿ‘ฎ lint | review '
1899
2017
  artifacts: false
1900
- - job: ๐Ÿ”ธ myWorkspace ๐Ÿงช test
2018
+ - job: '๐Ÿ”ธ myWorkspace ๐Ÿงช test | review '
1901
2019
  artifacts: false
1902
- - job: ๐Ÿ”ธ myWorkspace ๐Ÿ›ก audit
2020
+ - job: '๐Ÿ”ธ myWorkspace ๐Ÿ›ก audit | review '
1903
2021
  artifacts: false
1904
2022
  - job: '๐Ÿ”น www ๐Ÿ”จ docker | review '
1905
2023
  artifacts: false
@@ -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
- ๐Ÿ”ธ myWorkspace ๐Ÿ›ก audit:
106
+ '๐Ÿ”ธ myWorkspace ๐Ÿ›ก audit | dev ':
107
107
  stage: test
108
108
  image: path/to/docker/jobs-default:the-version
109
109
  variables:
@@ -120,9 +120,6 @@ before_script:
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 @@ before_script:
131
128
  - stuck_or_timeout_failure
132
129
  interruptible: true
133
130
  allow_failure: true
134
- ๐Ÿ”ธ myWorkspace ๐Ÿ‘ฎ lint:
131
+ '๐Ÿ”ธ myWorkspace ๐Ÿ‘ฎ lint | dev ':
135
132
  stage: test
136
133
  image: path/to/docker/jobs-default:the-version
137
134
  variables:
@@ -168,13 +165,10 @@ before_script:
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
- ๐Ÿ”ธ myWorkspace ๐Ÿงช test:
171
+ '๐Ÿ”ธ myWorkspace ๐Ÿงช test | dev ':
178
172
  stage: test
179
173
  image: path/to/docker/jobs-testing-chrome:the-version
180
174
  variables:
@@ -211,9 +205,6 @@ before_script:
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
@@ -296,7 +287,9 @@ before_script:
296
287
  - www/dist
297
288
  exclude:
298
289
  - api/.env
290
+ - api/.next/cache/**/*
299
291
  - www/.env
292
+ - www/.next/cache/**/*
300
293
  expire_in: 1 day
301
294
  when: always
302
295
  reports: {}
@@ -307,6 +300,115 @@ before_script:
307
300
  needs: []
308
301
  retry: *a1
309
302
  interruptible: true
303
+ '๐Ÿ”ธ myWorkspace ๐Ÿ›ก audit | review ':
304
+ stage: test
305
+ image: path/to/docker/jobs-default:the-version
306
+ variables:
307
+ KUBERNETES_CPU_REQUEST: '0.45'
308
+ KUBERNETES_MEMORY_REQUEST: 1Gi
309
+ KUBERNETES_MEMORY_LIMIT: 4Gi
310
+ script:
311
+ - collapseable_section_start "injectvars" "Injecting variables"
312
+ - export APP_PATH="."
313
+ - collapseable_section_end "injectvars"
314
+ - cd .
315
+ - yarn npm audit --environment production
316
+ rules:
317
+ - when: never
318
+ if: $CI_PIPELINE_SOURCE == "trigger"
319
+ - if: $CI_MERGE_REQUEST_ID
320
+ needs: []
321
+ retry: *a1
322
+ interruptible: true
323
+ allow_failure: true
324
+ '๐Ÿ”ธ myWorkspace ๐Ÿ‘ฎ lint | review ':
325
+ stage: test
326
+ image: path/to/docker/jobs-default:the-version
327
+ variables:
328
+ KUBERNETES_CPU_REQUEST: '0.45'
329
+ KUBERNETES_MEMORY_REQUEST: 1Gi
330
+ KUBERNETES_MEMORY_LIMIT: 4Gi
331
+ script:
332
+ - collapseable_section_start "injectvars" "Injecting variables"
333
+ - export APP_PATH="."
334
+ - collapseable_section_end "injectvars"
335
+ - collapseable_section_start "nodeinstall" "Ensure node version"
336
+ - if [ -f ~/.nvm/nvm.sh ]; then source ~/.nvm/nvm.sh; fi
337
+ - if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi
338
+ - collapseable_section_end "nodeinstall"
339
+ - cd .
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
+ - collapseable_section_start "yarninstall" "Yarn install"
345
+ - yarn install --immutable
346
+ - collapseable_section_end "yarninstall"
347
+ - yarn lint
348
+ cache:
349
+ - key: .-yarn-mr$CI_MERGE_REQUEST_IID
350
+ policy: pull-push
351
+ paths:
352
+ - .yarn
353
+ fallback_keys:
354
+ - .-yarn
355
+ - key: .-node-modules-mr$CI_MERGE_REQUEST_IID
356
+ policy: pull-push
357
+ paths:
358
+ - node_modules
359
+ fallback_keys:
360
+ - .-node-modules
361
+ rules:
362
+ - when: never
363
+ if: $CI_PIPELINE_SOURCE == "trigger"
364
+ - if: $CI_MERGE_REQUEST_ID
365
+ needs: []
366
+ retry: *a1
367
+ interruptible: true
368
+ '๐Ÿ”ธ myWorkspace ๐Ÿงช test | review ':
369
+ stage: test
370
+ image: path/to/docker/jobs-testing-chrome:the-version
371
+ variables:
372
+ KUBERNETES_CPU_REQUEST: '0.45'
373
+ KUBERNETES_MEMORY_REQUEST: 1Gi
374
+ KUBERNETES_MEMORY_LIMIT: 4Gi
375
+ script:
376
+ - collapseable_section_start "injectvars" "Injecting variables"
377
+ - export APP_PATH="."
378
+ - collapseable_section_end "injectvars"
379
+ - collapseable_section_start "nodeinstall" "Ensure node version"
380
+ - if [ -f ~/.nvm/nvm.sh ]; then source ~/.nvm/nvm.sh; fi
381
+ - if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi
382
+ - collapseable_section_end "nodeinstall"
383
+ - cd .
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
+ - collapseable_section_start "yarninstall" "Yarn install"
389
+ - yarn install --immutable
390
+ - collapseable_section_end "yarninstall"
391
+ - yarn test
392
+ cache:
393
+ - key: .-yarn-mr$CI_MERGE_REQUEST_IID
394
+ policy: pull-push
395
+ paths:
396
+ - .yarn
397
+ fallback_keys:
398
+ - .-yarn
399
+ - key: .-node-modules-mr$CI_MERGE_REQUEST_IID
400
+ policy: pull-push
401
+ paths:
402
+ - node_modules
403
+ fallback_keys:
404
+ - .-node-modules
405
+ rules:
406
+ - when: never
407
+ if: $CI_PIPELINE_SOURCE == "trigger"
408
+ - if: $CI_MERGE_REQUEST_ID
409
+ needs: []
410
+ retry: *a1
411
+ interruptible: true
310
412
  '๐Ÿ”ธ myWorkspace ๐Ÿ”จ app | review ':
311
413
  stage: build
312
414
  image: path/to/docker/jobs-default:the-version
@@ -366,18 +468,24 @@ before_script:
366
468
  - collapseable_section_end "yarninstall"
367
469
  - yarn build
368
470
  cache:
369
- - key: .-yarn
471
+ - key: .-yarn-mr$CI_MERGE_REQUEST_IID
370
472
  policy: pull-push
371
473
  paths:
372
474
  - .yarn
373
- - key: .-node-modules
475
+ fallback_keys:
476
+ - .-yarn
477
+ - key: .-node-modules-mr$CI_MERGE_REQUEST_IID
374
478
  policy: pull-push
375
479
  paths:
376
480
  - node_modules
377
- - key: myWorkspace-default
481
+ fallback_keys:
482
+ - .-node-modules
483
+ - key: myWorkspace-default-mr$CI_MERGE_REQUEST_IID
378
484
  policy: pull-push
379
485
  paths:
380
486
  - www/.next/cache
487
+ fallback_keys:
488
+ - myWorkspace-default
381
489
  artifacts:
382
490
  paths:
383
491
  - api/.next
@@ -386,7 +494,9 @@ before_script:
386
494
  - www/dist
387
495
  exclude:
388
496
  - api/.env
497
+ - api/.next/cache/**/*
389
498
  - www/.env
499
+ - www/.next/cache/**/*
390
500
  expire_in: 1 day
391
501
  when: always
392
502
  reports: {}
@@ -476,7 +586,9 @@ before_script:
476
586
  - www/dist
477
587
  exclude:
478
588
  - api/.env
589
+ - api/.next/cache/**/*
479
590
  - www/.env
591
+ - www/.next/cache/**/*
480
592
  expire_in: 1 day
481
593
  when: always
482
594
  reports: {}
@@ -566,7 +678,9 @@ before_script:
566
678
  - www/dist
567
679
  exclude:
568
680
  - api/.env
681
+ - api/.next/cache/**/*
569
682
  - www/.env
683
+ - www/.next/cache/**/*
570
684
  expire_in: 1 day
571
685
  when: always
572
686
  reports: {}
@@ -756,11 +870,11 @@ before_script:
756
870
  - when: on_success
757
871
  if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && $CI_COMMIT_MESSAGE !~ /^chore\\(release\\).*/
758
872
  needs:
759
- - job: ๐Ÿ”ธ myWorkspace ๐Ÿ‘ฎ lint
873
+ - job: '๐Ÿ”ธ myWorkspace ๐Ÿ‘ฎ lint | dev '
760
874
  artifacts: false
761
- - job: ๐Ÿ”ธ myWorkspace ๐Ÿงช test
875
+ - job: '๐Ÿ”ธ myWorkspace ๐Ÿงช test | dev '
762
876
  artifacts: false
763
- - job: ๐Ÿ”ธ myWorkspace ๐Ÿ›ก audit
877
+ - job: '๐Ÿ”ธ myWorkspace ๐Ÿ›ก audit | dev '
764
878
  artifacts: false
765
879
  - job: '๐Ÿ”น api ๐Ÿ”จ docker | dev '
766
880
  artifacts: false
@@ -851,10 +965,12 @@ before_script:
851
965
  - docker push $DOCKER_CACHE_IMAGE
852
966
  - collapseable_section_end "docker-push"
853
967
  cache:
854
- - key: api-yarn
968
+ - key: api-yarn-mr$CI_MERGE_REQUEST_IID
855
969
  policy: pull
856
970
  paths:
857
971
  - api/.yarn
972
+ fallback_keys:
973
+ - api-yarn
858
974
  rules:
859
975
  - when: never
860
976
  if: $CI_PIPELINE_SOURCE == "trigger"
@@ -985,11 +1101,11 @@ before_script:
985
1101
  - when: on_success
986
1102
  if: $CI_MERGE_REQUEST_ID
987
1103
  needs:
988
- - job: ๐Ÿ”ธ myWorkspace ๐Ÿ‘ฎ lint
1104
+ - job: '๐Ÿ”ธ myWorkspace ๐Ÿ‘ฎ lint | review '
989
1105
  artifacts: false
990
- - job: ๐Ÿ”ธ myWorkspace ๐Ÿงช test
1106
+ - job: '๐Ÿ”ธ myWorkspace ๐Ÿงช test | review '
991
1107
  artifacts: false
992
- - job: ๐Ÿ”ธ myWorkspace ๐Ÿ›ก audit
1108
+ - job: '๐Ÿ”ธ myWorkspace ๐Ÿ›ก audit | review '
993
1109
  artifacts: false
994
1110
  - job: '๐Ÿ”น api ๐Ÿ”จ docker | review '
995
1111
  artifacts: false
@@ -1655,11 +1771,11 @@ before_script:
1655
1771
  - when: on_success
1656
1772
  if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && $CI_COMMIT_MESSAGE !~ /^chore\\(release\\).*/
1657
1773
  needs:
1658
- - job: ๐Ÿ”ธ myWorkspace ๐Ÿ‘ฎ lint
1774
+ - job: '๐Ÿ”ธ myWorkspace ๐Ÿ‘ฎ lint | dev '
1659
1775
  artifacts: false
1660
- - job: ๐Ÿ”ธ myWorkspace ๐Ÿงช test
1776
+ - job: '๐Ÿ”ธ myWorkspace ๐Ÿงช test | dev '
1661
1777
  artifacts: false
1662
- - job: ๐Ÿ”ธ myWorkspace ๐Ÿ›ก audit
1778
+ - job: '๐Ÿ”ธ myWorkspace ๐Ÿ›ก audit | dev '
1663
1779
  artifacts: false
1664
1780
  - job: '๐Ÿ”น www ๐Ÿ”จ docker | dev '
1665
1781
  artifacts: false
@@ -1750,10 +1866,12 @@ before_script:
1750
1866
  - docker push $DOCKER_CACHE_IMAGE
1751
1867
  - collapseable_section_end "docker-push"
1752
1868
  cache:
1753
- - key: www-yarn
1869
+ - key: www-yarn-mr$CI_MERGE_REQUEST_IID
1754
1870
  policy: pull
1755
1871
  paths:
1756
1872
  - www/.yarn
1873
+ fallback_keys:
1874
+ - www-yarn
1757
1875
  rules:
1758
1876
  - when: never
1759
1877
  if: $CI_PIPELINE_SOURCE == "trigger"
@@ -1887,11 +2005,11 @@ before_script:
1887
2005
  - when: on_success
1888
2006
  if: $CI_MERGE_REQUEST_ID
1889
2007
  needs:
1890
- - job: ๐Ÿ”ธ myWorkspace ๐Ÿ‘ฎ lint
2008
+ - job: '๐Ÿ”ธ myWorkspace ๐Ÿ‘ฎ lint | review '
1891
2009
  artifacts: false
1892
- - job: ๐Ÿ”ธ myWorkspace ๐Ÿงช test
2010
+ - job: '๐Ÿ”ธ myWorkspace ๐Ÿงช test | review '
1893
2011
  artifacts: false
1894
- - job: ๐Ÿ”ธ myWorkspace ๐Ÿ›ก audit
2012
+ - job: '๐Ÿ”ธ myWorkspace ๐Ÿ›ก audit | review '
1895
2013
  artifacts: false
1896
2014
  - job: '๐Ÿ”น www ๐Ÿ”จ docker | review '
1897
2015
  artifacts: false
package/package.json CHANGED
@@ -53,7 +53,7 @@
53
53
  }
54
54
  ],
55
55
  "license": "MIT",
56
- "version": "3.24.0",
56
+ "version": "3.26.0",
57
57
  "scripts": {
58
58
  "build:tsc": "yarn tsc",
59
59
  "build": "yarn build:compile && yarn build:inline-variables",
@@ -37,7 +37,6 @@ export const createCustomTestJobs = (
37
37
  cache: createJobCacheFromConfig(context, buildConfig),
38
38
  stage: "test",
39
39
  needs: [],
40
- envMode: "none",
41
40
  };
42
41
  const auditJob: CatladderJob | null = buildConfig.audit
43
42
  ? {
@@ -33,6 +33,7 @@ export const BUILD_TYPES: BuildTypes = {
33
33
  buildCommand: "yarn build",
34
34
  startCommand: "yarn start",
35
35
  artifactsPaths: ["dist", ".next"],
36
+ artifactsExcludePaths: [".next/cache/**/*"],
36
37
  }),
37
38
  },
38
39
  "node-static": {
@@ -42,7 +42,6 @@ export const createNodeTestJobs = (
42
42
  runnerVariables: NODE_RUNNER_BUILD_VARIABLES,
43
43
  stage: "test",
44
44
  needs: [],
45
- envMode: "none",
46
45
  };
47
46
  const buildConfig = context.build.config;
48
47
  const yarnInstall = getYarnInstall(context);
@@ -27,7 +27,6 @@ export const createRailsTestJobs = (
27
27
  },
28
28
  stage: "test",
29
29
  needs: [],
30
- envMode: "none",
31
30
  };
32
31
  const defaultImage = "docker.io/ruby";
33
32
  const bundlerCacheDir = "tmp/cache";
@@ -27,6 +27,7 @@ export const createAgentReviewJob = (context: AgentContext): CatladderJob => {
27
27
 
28
28
  return {
29
29
  ...baseJob,
30
+ envMode: "jobPerEnv",
30
31
  name: context.name + "-agent-review",
31
32
  allow_failure: true, // make it optional
32
33
  rules: [