@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.
- package/dist/build/custom/testJob.js +1 -2
- package/dist/build/node/testJob.js +1 -2
- package/dist/build/rails/test.js +1 -2
- package/dist/constants.js +1 -1
- package/dist/pipeline/agent/createAgentReviewJob.js +1 -0
- package/dist/pipeline/agent/shared.d.ts +1 -1
- package/dist/pipeline/agent/shared.js +0 -1
- package/dist/pipeline/createMainPipeline.js +1 -0
- package/dist/pipeline/gitlab/cache.d.ts +9 -0
- package/dist/pipeline/gitlab/cache.js +47 -0
- package/dist/pipeline/gitlab/createGitlabJobs.js +7 -7
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/types/jobs.d.ts +2 -3
- package/examples/__snapshots__/automatic-releases.test.ts.snap +127 -21
- package/examples/__snapshots__/cloud-run-health-check-defaults.test.ts.snap +127 -21
- package/examples/__snapshots__/cloud-run-health-check-only-startup.test.ts.snap +127 -21
- package/examples/__snapshots__/cloud-run-health-check.test.ts.snap +127 -21
- package/examples/__snapshots__/cloud-run-http2.test.ts.snap +127 -21
- package/examples/__snapshots__/cloud-run-memory-limit.test.ts.snap +127 -21
- package/examples/__snapshots__/cloud-run-meteor-with-worker.test.ts.snap +127 -21
- package/examples/__snapshots__/cloud-run-nextjs.test.ts.snap +130 -22
- package/examples/__snapshots__/cloud-run-no-cpu-throttling.test.ts.snap +127 -21
- package/examples/__snapshots__/cloud-run-no-service.test.ts.snap +127 -21
- package/examples/__snapshots__/cloud-run-non-public.test.ts.snap +127 -21
- package/examples/__snapshots__/cloud-run-post-stop-job.test.ts.snap +127 -21
- package/examples/__snapshots__/cloud-run-service-custom-vpc-connector.test.ts.snap +127 -21
- package/examples/__snapshots__/cloud-run-service-custom-vpc.test.ts.snap +127 -21
- package/examples/__snapshots__/cloud-run-service-gen2.test.ts.snap +127 -21
- package/examples/__snapshots__/cloud-run-service-increase-timout.test.ts.snap +127 -21
- package/examples/__snapshots__/cloud-run-service-with-volumes.test.ts.snap +127 -21
- package/examples/__snapshots__/cloud-run-storybook.test.ts.snap +9 -3
- package/examples/__snapshots__/cloud-run-with-agents.test.ts.snap +130 -22
- package/examples/__snapshots__/cloud-run-with-gpu.test.ts.snap +127 -21
- package/examples/__snapshots__/cloud-run-with-ngnix.test.ts.snap +127 -21
- package/examples/__snapshots__/cloud-run-with-sql-legacy-jobs.test.ts.snap +127 -21
- package/examples/__snapshots__/cloud-run-with-sql-multiple-dbs.test.ts.snap +381 -63
- package/examples/__snapshots__/cloud-run-with-sql-reuse-db.test.ts.snap +254 -42
- package/examples/__snapshots__/cloud-run-with-sql.test.ts.snap +127 -21
- package/examples/__snapshots__/cloud-run-with-worker.test.ts.snap +127 -21
- package/examples/__snapshots__/custom-build-job-with-tests.test.ts.snap +93 -22
- package/examples/__snapshots__/custom-deploy.test.ts.snap +127 -21
- package/examples/__snapshots__/custom-envs.test.ts.snap +320 -32
- package/examples/__snapshots__/custom-verify-job.test.ts.snap +130 -22
- package/examples/__snapshots__/git-submodule.test.ts.snap +127 -21
- package/examples/__snapshots__/kubernetes-application-customization.test.ts.snap +127 -21
- package/examples/__snapshots__/kubernetes-with-cloud-sql.test.ts.snap +127 -21
- package/examples/__snapshots__/kubernetes-with-jobs.test.ts.snap +254 -42
- package/examples/__snapshots__/kubernetes-with-mongodb.test.ts.snap +127 -21
- package/examples/__snapshots__/local-dot-env.test.ts.snap +127 -21
- package/examples/__snapshots__/meteor-kubernetes.test.ts.snap +127 -21
- package/examples/__snapshots__/modify-generated-files.test.ts.snap +118 -14
- package/examples/__snapshots__/modify-generated-yaml.test.ts.snap +118 -14
- package/examples/__snapshots__/multiline-var.test.ts.snap +381 -63
- package/examples/__snapshots__/native-app.test.ts.snap +257 -41
- package/examples/__snapshots__/node-build-with-custom-image.test.ts.snap +127 -21
- package/examples/__snapshots__/node-build-with-docker-additions.test.ts.snap +127 -21
- package/examples/__snapshots__/override-secrets.test.ts.snap +127 -21
- package/examples/__snapshots__/rails-k8s-with-worker-dockerfile.test.ts.snap +84 -22
- package/examples/__snapshots__/rails-k8s-with-worker.test.ts.snap +84 -22
- package/examples/__snapshots__/referencing-other-vars.test.ts.snap +381 -63
- package/examples/__snapshots__/wait-for-other-deploy.test.ts.snap +248 -40
- package/examples/__snapshots__/workspace-api-www-turbo-cache.test.ts.snap +139 -29
- package/examples/__snapshots__/workspace-api-www.test.ts.snap +139 -29
- package/package.json +1 -1
- package/src/build/custom/testJob.ts +0 -1
- package/src/build/node/testJob.ts +0 -1
- package/src/build/rails/test.ts +0 -1
- package/src/pipeline/agent/createAgentReviewJob.ts +1 -0
- package/src/pipeline/agent/shared.ts +2 -2
- package/src/pipeline/createMainPipeline.ts +1 -0
- package/src/pipeline/gitlab/cache.ts +49 -0
- package/src/pipeline/gitlab/createGitlabJobs.ts +7 -9
- 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
|
|
@@ -311,6 +302,115 @@ before_script:
|
|
|
311
302
|
needs: []
|
|
312
303
|
retry: *a1
|
|
313
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
|
|
314
414
|
'๐ธ myWorkspace ๐จ app | review ':
|
|
315
415
|
stage: build
|
|
316
416
|
image: path/to/docker/jobs-default:the-version
|
|
@@ -370,20 +470,26 @@ before_script:
|
|
|
370
470
|
- collapseable_section_end "yarninstall"
|
|
371
471
|
- yarn build
|
|
372
472
|
cache:
|
|
373
|
-
- key: .-yarn
|
|
473
|
+
- key: .-yarn-mr$CI_MERGE_REQUEST_IID
|
|
374
474
|
policy: pull-push
|
|
375
475
|
paths:
|
|
376
476
|
- .yarn
|
|
377
|
-
|
|
477
|
+
fallback_keys:
|
|
478
|
+
- .-yarn
|
|
479
|
+
- key: .-node-modules-mr$CI_MERGE_REQUEST_IID
|
|
378
480
|
policy: pull-push
|
|
379
481
|
paths:
|
|
380
482
|
- node_modules
|
|
381
|
-
|
|
483
|
+
fallback_keys:
|
|
484
|
+
- .-node-modules
|
|
485
|
+
- key: myWorkspace-default-mr$CI_MERGE_REQUEST_IID
|
|
382
486
|
policy: pull-push
|
|
383
487
|
paths:
|
|
384
488
|
- .turbo
|
|
385
489
|
- api/.component-custom-cache
|
|
386
490
|
- www/.next/cache
|
|
491
|
+
fallback_keys:
|
|
492
|
+
- myWorkspace-default
|
|
387
493
|
artifacts:
|
|
388
494
|
paths:
|
|
389
495
|
- api/.next
|
|
@@ -772,11 +878,11 @@ before_script:
|
|
|
772
878
|
- when: on_success
|
|
773
879
|
if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && $CI_COMMIT_MESSAGE !~ /^chore\\(release\\).*/
|
|
774
880
|
needs:
|
|
775
|
-
- job: ๐ธ myWorkspace ๐ฎ lint
|
|
881
|
+
- job: '๐ธ myWorkspace ๐ฎ lint | dev '
|
|
776
882
|
artifacts: false
|
|
777
|
-
- job: ๐ธ myWorkspace ๐งช test
|
|
883
|
+
- job: '๐ธ myWorkspace ๐งช test | dev '
|
|
778
884
|
artifacts: false
|
|
779
|
-
- job: ๐ธ myWorkspace ๐ก audit
|
|
885
|
+
- job: '๐ธ myWorkspace ๐ก audit | dev '
|
|
780
886
|
artifacts: false
|
|
781
887
|
- job: '๐น api ๐จ docker | dev '
|
|
782
888
|
artifacts: false
|
|
@@ -867,10 +973,12 @@ before_script:
|
|
|
867
973
|
- docker push $DOCKER_CACHE_IMAGE
|
|
868
974
|
- collapseable_section_end "docker-push"
|
|
869
975
|
cache:
|
|
870
|
-
- key: api-yarn
|
|
976
|
+
- key: api-yarn-mr$CI_MERGE_REQUEST_IID
|
|
871
977
|
policy: pull
|
|
872
978
|
paths:
|
|
873
979
|
- api/.yarn
|
|
980
|
+
fallback_keys:
|
|
981
|
+
- api-yarn
|
|
874
982
|
rules:
|
|
875
983
|
- when: never
|
|
876
984
|
if: $CI_PIPELINE_SOURCE == "trigger"
|
|
@@ -1001,11 +1109,11 @@ before_script:
|
|
|
1001
1109
|
- when: on_success
|
|
1002
1110
|
if: $CI_MERGE_REQUEST_ID
|
|
1003
1111
|
needs:
|
|
1004
|
-
- job: ๐ธ myWorkspace ๐ฎ lint
|
|
1112
|
+
- job: '๐ธ myWorkspace ๐ฎ lint | review '
|
|
1005
1113
|
artifacts: false
|
|
1006
|
-
- job: ๐ธ myWorkspace ๐งช test
|
|
1114
|
+
- job: '๐ธ myWorkspace ๐งช test | review '
|
|
1007
1115
|
artifacts: false
|
|
1008
|
-
- job: ๐ธ myWorkspace ๐ก audit
|
|
1116
|
+
- job: '๐ธ myWorkspace ๐ก audit | review '
|
|
1009
1117
|
artifacts: false
|
|
1010
1118
|
- job: '๐น api ๐จ docker | review '
|
|
1011
1119
|
artifacts: false
|
|
@@ -1671,11 +1779,11 @@ before_script:
|
|
|
1671
1779
|
- when: on_success
|
|
1672
1780
|
if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && $CI_COMMIT_MESSAGE !~ /^chore\\(release\\).*/
|
|
1673
1781
|
needs:
|
|
1674
|
-
- job: ๐ธ myWorkspace ๐ฎ lint
|
|
1782
|
+
- job: '๐ธ myWorkspace ๐ฎ lint | dev '
|
|
1675
1783
|
artifacts: false
|
|
1676
|
-
- job: ๐ธ myWorkspace ๐งช test
|
|
1784
|
+
- job: '๐ธ myWorkspace ๐งช test | dev '
|
|
1677
1785
|
artifacts: false
|
|
1678
|
-
- job: ๐ธ myWorkspace ๐ก audit
|
|
1786
|
+
- job: '๐ธ myWorkspace ๐ก audit | dev '
|
|
1679
1787
|
artifacts: false
|
|
1680
1788
|
- job: '๐น www ๐จ docker | dev '
|
|
1681
1789
|
artifacts: false
|
|
@@ -1766,10 +1874,12 @@ before_script:
|
|
|
1766
1874
|
- docker push $DOCKER_CACHE_IMAGE
|
|
1767
1875
|
- collapseable_section_end "docker-push"
|
|
1768
1876
|
cache:
|
|
1769
|
-
- key: www-yarn
|
|
1877
|
+
- key: www-yarn-mr$CI_MERGE_REQUEST_IID
|
|
1770
1878
|
policy: pull
|
|
1771
1879
|
paths:
|
|
1772
1880
|
- www/.yarn
|
|
1881
|
+
fallback_keys:
|
|
1882
|
+
- www-yarn
|
|
1773
1883
|
rules:
|
|
1774
1884
|
- when: never
|
|
1775
1885
|
if: $CI_PIPELINE_SOURCE == "trigger"
|
|
@@ -1903,11 +2013,11 @@ before_script:
|
|
|
1903
2013
|
- when: on_success
|
|
1904
2014
|
if: $CI_MERGE_REQUEST_ID
|
|
1905
2015
|
needs:
|
|
1906
|
-
- job: ๐ธ myWorkspace ๐ฎ lint
|
|
2016
|
+
- job: '๐ธ myWorkspace ๐ฎ lint | review '
|
|
1907
2017
|
artifacts: false
|
|
1908
|
-
- job: ๐ธ myWorkspace ๐งช test
|
|
2018
|
+
- job: '๐ธ myWorkspace ๐งช test | review '
|
|
1909
2019
|
artifacts: false
|
|
1910
|
-
- job: ๐ธ myWorkspace ๐ก audit
|
|
2020
|
+
- job: '๐ธ myWorkspace ๐ก audit | review '
|
|
1911
2021
|
artifacts: false
|
|
1912
2022
|
- job: '๐น www ๐จ docker | review '
|
|
1913
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
|
|
@@ -309,6 +300,115 @@ before_script:
|
|
|
309
300
|
needs: []
|
|
310
301
|
retry: *a1
|
|
311
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
|
|
312
412
|
'๐ธ myWorkspace ๐จ app | review ':
|
|
313
413
|
stage: build
|
|
314
414
|
image: path/to/docker/jobs-default:the-version
|
|
@@ -368,18 +468,24 @@ before_script:
|
|
|
368
468
|
- collapseable_section_end "yarninstall"
|
|
369
469
|
- yarn build
|
|
370
470
|
cache:
|
|
371
|
-
- key: .-yarn
|
|
471
|
+
- key: .-yarn-mr$CI_MERGE_REQUEST_IID
|
|
372
472
|
policy: pull-push
|
|
373
473
|
paths:
|
|
374
474
|
- .yarn
|
|
375
|
-
|
|
475
|
+
fallback_keys:
|
|
476
|
+
- .-yarn
|
|
477
|
+
- key: .-node-modules-mr$CI_MERGE_REQUEST_IID
|
|
376
478
|
policy: pull-push
|
|
377
479
|
paths:
|
|
378
480
|
- node_modules
|
|
379
|
-
|
|
481
|
+
fallback_keys:
|
|
482
|
+
- .-node-modules
|
|
483
|
+
- key: myWorkspace-default-mr$CI_MERGE_REQUEST_IID
|
|
380
484
|
policy: pull-push
|
|
381
485
|
paths:
|
|
382
486
|
- www/.next/cache
|
|
487
|
+
fallback_keys:
|
|
488
|
+
- myWorkspace-default
|
|
383
489
|
artifacts:
|
|
384
490
|
paths:
|
|
385
491
|
- api/.next
|
|
@@ -764,11 +870,11 @@ before_script:
|
|
|
764
870
|
- when: on_success
|
|
765
871
|
if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && $CI_COMMIT_MESSAGE !~ /^chore\\(release\\).*/
|
|
766
872
|
needs:
|
|
767
|
-
- job: ๐ธ myWorkspace ๐ฎ lint
|
|
873
|
+
- job: '๐ธ myWorkspace ๐ฎ lint | dev '
|
|
768
874
|
artifacts: false
|
|
769
|
-
- job: ๐ธ myWorkspace ๐งช test
|
|
875
|
+
- job: '๐ธ myWorkspace ๐งช test | dev '
|
|
770
876
|
artifacts: false
|
|
771
|
-
- job: ๐ธ myWorkspace ๐ก audit
|
|
877
|
+
- job: '๐ธ myWorkspace ๐ก audit | dev '
|
|
772
878
|
artifacts: false
|
|
773
879
|
- job: '๐น api ๐จ docker | dev '
|
|
774
880
|
artifacts: false
|
|
@@ -859,10 +965,12 @@ before_script:
|
|
|
859
965
|
- docker push $DOCKER_CACHE_IMAGE
|
|
860
966
|
- collapseable_section_end "docker-push"
|
|
861
967
|
cache:
|
|
862
|
-
- key: api-yarn
|
|
968
|
+
- key: api-yarn-mr$CI_MERGE_REQUEST_IID
|
|
863
969
|
policy: pull
|
|
864
970
|
paths:
|
|
865
971
|
- api/.yarn
|
|
972
|
+
fallback_keys:
|
|
973
|
+
- api-yarn
|
|
866
974
|
rules:
|
|
867
975
|
- when: never
|
|
868
976
|
if: $CI_PIPELINE_SOURCE == "trigger"
|
|
@@ -993,11 +1101,11 @@ before_script:
|
|
|
993
1101
|
- when: on_success
|
|
994
1102
|
if: $CI_MERGE_REQUEST_ID
|
|
995
1103
|
needs:
|
|
996
|
-
- job: ๐ธ myWorkspace ๐ฎ lint
|
|
1104
|
+
- job: '๐ธ myWorkspace ๐ฎ lint | review '
|
|
997
1105
|
artifacts: false
|
|
998
|
-
- job: ๐ธ myWorkspace ๐งช test
|
|
1106
|
+
- job: '๐ธ myWorkspace ๐งช test | review '
|
|
999
1107
|
artifacts: false
|
|
1000
|
-
- job: ๐ธ myWorkspace ๐ก audit
|
|
1108
|
+
- job: '๐ธ myWorkspace ๐ก audit | review '
|
|
1001
1109
|
artifacts: false
|
|
1002
1110
|
- job: '๐น api ๐จ docker | review '
|
|
1003
1111
|
artifacts: false
|
|
@@ -1663,11 +1771,11 @@ before_script:
|
|
|
1663
1771
|
- when: on_success
|
|
1664
1772
|
if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && $CI_COMMIT_MESSAGE !~ /^chore\\(release\\).*/
|
|
1665
1773
|
needs:
|
|
1666
|
-
- job: ๐ธ myWorkspace ๐ฎ lint
|
|
1774
|
+
- job: '๐ธ myWorkspace ๐ฎ lint | dev '
|
|
1667
1775
|
artifacts: false
|
|
1668
|
-
- job: ๐ธ myWorkspace ๐งช test
|
|
1776
|
+
- job: '๐ธ myWorkspace ๐งช test | dev '
|
|
1669
1777
|
artifacts: false
|
|
1670
|
-
- job: ๐ธ myWorkspace ๐ก audit
|
|
1778
|
+
- job: '๐ธ myWorkspace ๐ก audit | dev '
|
|
1671
1779
|
artifacts: false
|
|
1672
1780
|
- job: '๐น www ๐จ docker | dev '
|
|
1673
1781
|
artifacts: false
|
|
@@ -1758,10 +1866,12 @@ before_script:
|
|
|
1758
1866
|
- docker push $DOCKER_CACHE_IMAGE
|
|
1759
1867
|
- collapseable_section_end "docker-push"
|
|
1760
1868
|
cache:
|
|
1761
|
-
- key: www-yarn
|
|
1869
|
+
- key: www-yarn-mr$CI_MERGE_REQUEST_IID
|
|
1762
1870
|
policy: pull
|
|
1763
1871
|
paths:
|
|
1764
1872
|
- www/.yarn
|
|
1873
|
+
fallback_keys:
|
|
1874
|
+
- www-yarn
|
|
1765
1875
|
rules:
|
|
1766
1876
|
- when: never
|
|
1767
1877
|
if: $CI_PIPELINE_SOURCE == "trigger"
|
|
@@ -1895,11 +2005,11 @@ before_script:
|
|
|
1895
2005
|
- when: on_success
|
|
1896
2006
|
if: $CI_MERGE_REQUEST_ID
|
|
1897
2007
|
needs:
|
|
1898
|
-
- job: ๐ธ myWorkspace ๐ฎ lint
|
|
2008
|
+
- job: '๐ธ myWorkspace ๐ฎ lint | review '
|
|
1899
2009
|
artifacts: false
|
|
1900
|
-
- job: ๐ธ myWorkspace ๐งช test
|
|
2010
|
+
- job: '๐ธ myWorkspace ๐งช test | review '
|
|
1901
2011
|
artifacts: false
|
|
1902
|
-
- job: ๐ธ myWorkspace ๐ก audit
|
|
2012
|
+
- job: '๐ธ myWorkspace ๐ก audit | review '
|
|
1903
2013
|
artifacts: false
|
|
1904
2014
|
- job: '๐น www ๐จ docker | review '
|
|
1905
2015
|
artifacts: false
|
package/package.json
CHANGED
package/src/build/rails/test.ts
CHANGED
|
@@ -8,9 +8,9 @@ import type { AgentContext, CatladderJob } from "../../types";
|
|
|
8
8
|
|
|
9
9
|
export const createBaseAgentJob = (
|
|
10
10
|
context: AgentContext,
|
|
11
|
-
): Omit<CatladderJob, "name" | "rules" | "script"> => ({
|
|
11
|
+
): Omit<CatladderJob, "name" | "rules" | "script" | "envMode"> => ({
|
|
12
12
|
stage: "agents",
|
|
13
|
-
|
|
13
|
+
|
|
14
14
|
// image: "node:24-alpine3.21",
|
|
15
15
|
image: getRunnerImage("agent-claude"),
|
|
16
16
|
variables: {
|
|
@@ -80,6 +80,7 @@ export const createMainPipeline = async <T extends PipelineType>(
|
|
|
80
80
|
(acc, { gitlabJob, name, context }) => {
|
|
81
81
|
// merge jobs, if a job is already there, merge the rules
|
|
82
82
|
// this is currently needed because of envMode: "none", which creates the same job for all triggers, so it can appear multiple times
|
|
83
|
+
// NOTICE: envNode none has been removed and this may no longer be needed
|
|
83
84
|
if (acc[name]) {
|
|
84
85
|
acc[name].gitlabJob.rules = [
|
|
85
86
|
...(acc[name].gitlabJob.rules ?? []),
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import type {
|
|
2
|
+
AgentContext,
|
|
3
|
+
CatladderJobCache,
|
|
4
|
+
Context,
|
|
5
|
+
GitlabJobCache,
|
|
6
|
+
} from "../../types";
|
|
7
|
+
|
|
8
|
+
export const getCacheKeyWithFallbackForMR = (
|
|
9
|
+
baseKey: string,
|
|
10
|
+
context: Context,
|
|
11
|
+
) => {
|
|
12
|
+
// if its a branch, create a key with the branch name with fallback to the base key
|
|
13
|
+
if (context.trigger === "mr") {
|
|
14
|
+
return {
|
|
15
|
+
key: baseKey + "-mr$CI_MERGE_REQUEST_IID",
|
|
16
|
+
fallback_keys: [baseKey],
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
return {
|
|
21
|
+
key: baseKey,
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
export const addCacheFallback = (
|
|
26
|
+
cache: GitlabJobCache | GitlabJobCache[],
|
|
27
|
+
context: Context | AgentContext,
|
|
28
|
+
) => {
|
|
29
|
+
if (context.type !== "agent" && context.trigger === "mr") {
|
|
30
|
+
if (Array.isArray(cache)) {
|
|
31
|
+
return cache.map((c) => addCacheFallbackToSingleCacheForMR(c, context));
|
|
32
|
+
}
|
|
33
|
+
return addCacheFallbackToSingleCacheForMR(cache, context);
|
|
34
|
+
}
|
|
35
|
+
return cache;
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
const addCacheFallbackToSingleCacheForMR = (
|
|
39
|
+
cache: CatladderJobCache,
|
|
40
|
+
context: Context,
|
|
41
|
+
) => {
|
|
42
|
+
if (typeof cache.key === "string") {
|
|
43
|
+
return {
|
|
44
|
+
...cache,
|
|
45
|
+
...getCacheKeyWithFallbackForMR(cache.key, context),
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
return cache; // as is
|
|
49
|
+
};
|