@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.
- package/dist/build/custom/testJob.js +1 -2
- package/dist/build/index.js +2 -1
- 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 +131 -21
- package/examples/__snapshots__/cloud-run-health-check-defaults.test.ts.snap +131 -21
- package/examples/__snapshots__/cloud-run-health-check-only-startup.test.ts.snap +131 -21
- package/examples/__snapshots__/cloud-run-health-check.test.ts.snap +131 -21
- package/examples/__snapshots__/cloud-run-http2.test.ts.snap +131 -21
- package/examples/__snapshots__/cloud-run-memory-limit.test.ts.snap +131 -21
- package/examples/__snapshots__/cloud-run-meteor-with-worker.test.ts.snap +127 -21
- package/examples/__snapshots__/cloud-run-nextjs.test.ts.snap +134 -22
- package/examples/__snapshots__/cloud-run-no-cpu-throttling.test.ts.snap +131 -21
- package/examples/__snapshots__/cloud-run-no-service.test.ts.snap +131 -21
- package/examples/__snapshots__/cloud-run-non-public.test.ts.snap +131 -21
- package/examples/__snapshots__/cloud-run-post-stop-job.test.ts.snap +131 -21
- package/examples/__snapshots__/cloud-run-service-custom-vpc-connector.test.ts.snap +131 -21
- package/examples/__snapshots__/cloud-run-service-custom-vpc.test.ts.snap +131 -21
- package/examples/__snapshots__/cloud-run-service-gen2.test.ts.snap +131 -21
- package/examples/__snapshots__/cloud-run-service-increase-timout.test.ts.snap +131 -21
- package/examples/__snapshots__/cloud-run-service-with-volumes.test.ts.snap +131 -21
- package/examples/__snapshots__/cloud-run-storybook.test.ts.snap +13 -3
- package/examples/__snapshots__/cloud-run-with-agents.test.ts.snap +134 -22
- package/examples/__snapshots__/cloud-run-with-gpu.test.ts.snap +131 -21
- package/examples/__snapshots__/cloud-run-with-ngnix.test.ts.snap +131 -21
- package/examples/__snapshots__/cloud-run-with-sql-legacy-jobs.test.ts.snap +131 -21
- package/examples/__snapshots__/cloud-run-with-sql-multiple-dbs.test.ts.snap +393 -63
- package/examples/__snapshots__/cloud-run-with-sql-reuse-db.test.ts.snap +262 -42
- package/examples/__snapshots__/cloud-run-with-sql.test.ts.snap +131 -21
- package/examples/__snapshots__/cloud-run-with-worker.test.ts.snap +131 -21
- package/examples/__snapshots__/custom-build-job-with-tests.test.ts.snap +93 -22
- package/examples/__snapshots__/custom-deploy.test.ts.snap +131 -21
- package/examples/__snapshots__/custom-envs.test.ts.snap +326 -32
- package/examples/__snapshots__/custom-verify-job.test.ts.snap +134 -22
- package/examples/__snapshots__/git-submodule.test.ts.snap +131 -21
- package/examples/__snapshots__/kubernetes-application-customization.test.ts.snap +135 -21
- package/examples/__snapshots__/kubernetes-with-cloud-sql.test.ts.snap +135 -21
- package/examples/__snapshots__/kubernetes-with-jobs.test.ts.snap +266 -42
- package/examples/__snapshots__/kubernetes-with-mongodb.test.ts.snap +135 -21
- package/examples/__snapshots__/local-dot-env.test.ts.snap +135 -21
- package/examples/__snapshots__/meteor-kubernetes.test.ts.snap +127 -21
- package/examples/__snapshots__/modify-generated-files.test.ts.snap +122 -14
- package/examples/__snapshots__/modify-generated-yaml.test.ts.snap +122 -14
- package/examples/__snapshots__/multiline-var.test.ts.snap +393 -63
- package/examples/__snapshots__/native-app.test.ts.snap +265 -41
- package/examples/__snapshots__/node-build-with-custom-image.test.ts.snap +131 -21
- package/examples/__snapshots__/node-build-with-docker-additions.test.ts.snap +131 -21
- package/examples/__snapshots__/override-secrets.test.ts.snap +131 -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 +393 -63
- package/examples/__snapshots__/wait-for-other-deploy.test.ts.snap +256 -40
- package/examples/__snapshots__/workspace-api-www-turbo-cache.test.ts.snap +147 -29
- package/examples/__snapshots__/workspace-api-www.test.ts.snap +147 -29
- package/package.json +1 -1
- package/src/build/custom/testJob.ts +0 -1
- package/src/build/index.ts +1 -0
- 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
|
-
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
|
|
@@ -291,6 +282,7 @@ api 🧪 test:
|
|
|
291
282
|
- api/dist
|
|
292
283
|
exclude:
|
|
293
284
|
- api/.env
|
|
285
|
+
- api/.next/cache/**/*
|
|
294
286
|
expire_in: 1 day
|
|
295
287
|
when: always
|
|
296
288
|
reports: {}
|
|
@@ -492,17 +484,17 @@ api 🧪 test:
|
|
|
492
484
|
- when: on_success
|
|
493
485
|
if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && $CI_COMMIT_MESSAGE !~ /^chore\\(release\\).*/
|
|
494
486
|
needs:
|
|
495
|
-
- job: api 👮 lint
|
|
487
|
+
- job: 'api 👮 lint | dev '
|
|
496
488
|
artifacts: false
|
|
497
489
|
- job: 'api 🔨 app | dev '
|
|
498
490
|
artifacts: false
|
|
499
491
|
- job: 'api 🔨 docker | dev '
|
|
500
492
|
artifacts: false
|
|
501
|
-
- job: api 🧪 test
|
|
493
|
+
- job: 'api 🧪 test | dev '
|
|
502
494
|
artifacts: false
|
|
503
495
|
- job: 'api 🧾 sbom | dev '
|
|
504
496
|
artifacts: true
|
|
505
|
-
- job: api 🛡 audit
|
|
497
|
+
- job: 'api 🛡 audit | dev '
|
|
506
498
|
artifacts: false
|
|
507
499
|
retry: *a1
|
|
508
500
|
interruptible: true
|
|
@@ -543,6 +535,115 @@ api 🧪 test:
|
|
|
543
535
|
retry: *a1
|
|
544
536
|
interruptible: true
|
|
545
537
|
allow_failure: true
|
|
538
|
+
'api 🛡 audit | review ':
|
|
539
|
+
stage: test
|
|
540
|
+
image: path/to/docker/jobs-default:the-version
|
|
541
|
+
variables:
|
|
542
|
+
KUBERNETES_CPU_REQUEST: '0.45'
|
|
543
|
+
KUBERNETES_MEMORY_REQUEST: 1Gi
|
|
544
|
+
KUBERNETES_MEMORY_LIMIT: 4Gi
|
|
545
|
+
script:
|
|
546
|
+
- collapseable_section_start "injectvars" "Injecting variables"
|
|
547
|
+
- export APP_PATH="api"
|
|
548
|
+
- collapseable_section_end "injectvars"
|
|
549
|
+
- cd api
|
|
550
|
+
- yarn npm audit --environment production
|
|
551
|
+
rules:
|
|
552
|
+
- when: never
|
|
553
|
+
if: $CI_PIPELINE_SOURCE == "trigger"
|
|
554
|
+
- if: $CI_MERGE_REQUEST_ID
|
|
555
|
+
needs: []
|
|
556
|
+
retry: *a1
|
|
557
|
+
interruptible: true
|
|
558
|
+
allow_failure: true
|
|
559
|
+
'api 👮 lint | review ':
|
|
560
|
+
stage: test
|
|
561
|
+
image: path/to/docker/jobs-default:the-version
|
|
562
|
+
variables:
|
|
563
|
+
KUBERNETES_CPU_REQUEST: '0.45'
|
|
564
|
+
KUBERNETES_MEMORY_REQUEST: 1Gi
|
|
565
|
+
KUBERNETES_MEMORY_LIMIT: 4Gi
|
|
566
|
+
script:
|
|
567
|
+
- collapseable_section_start "injectvars" "Injecting variables"
|
|
568
|
+
- export APP_PATH="api"
|
|
569
|
+
- collapseable_section_end "injectvars"
|
|
570
|
+
- collapseable_section_start "nodeinstall" "Ensure node version"
|
|
571
|
+
- if [ -f ~/.nvm/nvm.sh ]; then source ~/.nvm/nvm.sh; fi
|
|
572
|
+
- if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi
|
|
573
|
+
- collapseable_section_end "nodeinstall"
|
|
574
|
+
- cd api
|
|
575
|
+
- collapseable_section_start "nodeinstall" "Ensure node version"
|
|
576
|
+
- if [ -f ~/.nvm/nvm.sh ]; then source ~/.nvm/nvm.sh; fi
|
|
577
|
+
- if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi
|
|
578
|
+
- collapseable_section_end "nodeinstall"
|
|
579
|
+
- collapseable_section_start "yarninstall" "Yarn install"
|
|
580
|
+
- yarn install --immutable
|
|
581
|
+
- collapseable_section_end "yarninstall"
|
|
582
|
+
- yarn lint
|
|
583
|
+
cache:
|
|
584
|
+
- key: api-yarn-mr$CI_MERGE_REQUEST_IID
|
|
585
|
+
policy: pull-push
|
|
586
|
+
paths:
|
|
587
|
+
- api/.yarn
|
|
588
|
+
fallback_keys:
|
|
589
|
+
- api-yarn
|
|
590
|
+
- key: api-node-modules-mr$CI_MERGE_REQUEST_IID
|
|
591
|
+
policy: pull-push
|
|
592
|
+
paths:
|
|
593
|
+
- api/node_modules
|
|
594
|
+
fallback_keys:
|
|
595
|
+
- api-node-modules
|
|
596
|
+
rules:
|
|
597
|
+
- when: never
|
|
598
|
+
if: $CI_PIPELINE_SOURCE == "trigger"
|
|
599
|
+
- if: $CI_MERGE_REQUEST_ID
|
|
600
|
+
needs: []
|
|
601
|
+
retry: *a1
|
|
602
|
+
interruptible: true
|
|
603
|
+
'api 🧪 test | review ':
|
|
604
|
+
stage: test
|
|
605
|
+
image: path/to/docker/jobs-testing-chrome:the-version
|
|
606
|
+
variables:
|
|
607
|
+
KUBERNETES_CPU_REQUEST: '0.45'
|
|
608
|
+
KUBERNETES_MEMORY_REQUEST: 1Gi
|
|
609
|
+
KUBERNETES_MEMORY_LIMIT: 4Gi
|
|
610
|
+
script:
|
|
611
|
+
- collapseable_section_start "injectvars" "Injecting variables"
|
|
612
|
+
- export APP_PATH="api"
|
|
613
|
+
- collapseable_section_end "injectvars"
|
|
614
|
+
- collapseable_section_start "nodeinstall" "Ensure node version"
|
|
615
|
+
- if [ -f ~/.nvm/nvm.sh ]; then source ~/.nvm/nvm.sh; fi
|
|
616
|
+
- if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi
|
|
617
|
+
- collapseable_section_end "nodeinstall"
|
|
618
|
+
- cd api
|
|
619
|
+
- collapseable_section_start "nodeinstall" "Ensure node version"
|
|
620
|
+
- if [ -f ~/.nvm/nvm.sh ]; then source ~/.nvm/nvm.sh; fi
|
|
621
|
+
- if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi
|
|
622
|
+
- collapseable_section_end "nodeinstall"
|
|
623
|
+
- collapseable_section_start "yarninstall" "Yarn install"
|
|
624
|
+
- yarn install --immutable
|
|
625
|
+
- collapseable_section_end "yarninstall"
|
|
626
|
+
- yarn test
|
|
627
|
+
cache:
|
|
628
|
+
- key: api-yarn-mr$CI_MERGE_REQUEST_IID
|
|
629
|
+
policy: pull-push
|
|
630
|
+
paths:
|
|
631
|
+
- api/.yarn
|
|
632
|
+
fallback_keys:
|
|
633
|
+
- api-yarn
|
|
634
|
+
- key: api-node-modules-mr$CI_MERGE_REQUEST_IID
|
|
635
|
+
policy: pull-push
|
|
636
|
+
paths:
|
|
637
|
+
- api/node_modules
|
|
638
|
+
fallback_keys:
|
|
639
|
+
- api-node-modules
|
|
640
|
+
rules:
|
|
641
|
+
- when: never
|
|
642
|
+
if: $CI_PIPELINE_SOURCE == "trigger"
|
|
643
|
+
- if: $CI_MERGE_REQUEST_ID
|
|
644
|
+
needs: []
|
|
645
|
+
retry: *a1
|
|
646
|
+
interruptible: true
|
|
546
647
|
'api 🔨 app | review ':
|
|
547
648
|
stage: build
|
|
548
649
|
image: path/to/docker/jobs-default:the-version
|
|
@@ -602,14 +703,18 @@ api 🧪 test:
|
|
|
602
703
|
- collapseable_section_end "yarninstall"
|
|
603
704
|
- yarn build
|
|
604
705
|
cache:
|
|
605
|
-
- key: api-yarn
|
|
706
|
+
- key: api-yarn-mr$CI_MERGE_REQUEST_IID
|
|
606
707
|
policy: pull-push
|
|
607
708
|
paths:
|
|
608
709
|
- api/.yarn
|
|
609
|
-
|
|
710
|
+
fallback_keys:
|
|
711
|
+
- api-yarn
|
|
712
|
+
- key: api-node-modules-mr$CI_MERGE_REQUEST_IID
|
|
610
713
|
policy: pull-push
|
|
611
714
|
paths:
|
|
612
715
|
- api/node_modules
|
|
716
|
+
fallback_keys:
|
|
717
|
+
- api-node-modules
|
|
613
718
|
artifacts:
|
|
614
719
|
paths:
|
|
615
720
|
- api/__build_info.json
|
|
@@ -617,6 +722,7 @@ api 🧪 test:
|
|
|
617
722
|
- api/dist
|
|
618
723
|
exclude:
|
|
619
724
|
- api/.env
|
|
725
|
+
- api/.next/cache/**/*
|
|
620
726
|
expire_in: 1 day
|
|
621
727
|
when: always
|
|
622
728
|
reports: {}
|
|
@@ -675,10 +781,12 @@ api 🧪 test:
|
|
|
675
781
|
- docker push $DOCKER_CACHE_IMAGE
|
|
676
782
|
- collapseable_section_end "docker-push"
|
|
677
783
|
cache:
|
|
678
|
-
- key: api-yarn
|
|
784
|
+
- key: api-yarn-mr$CI_MERGE_REQUEST_IID
|
|
679
785
|
policy: pull
|
|
680
786
|
paths:
|
|
681
787
|
- api/.yarn
|
|
788
|
+
fallback_keys:
|
|
789
|
+
- api-yarn
|
|
682
790
|
rules:
|
|
683
791
|
- when: never
|
|
684
792
|
if: $CI_PIPELINE_SOURCE == "trigger"
|
|
@@ -821,17 +929,17 @@ api 🧪 test:
|
|
|
821
929
|
- when: on_success
|
|
822
930
|
if: $CI_MERGE_REQUEST_ID
|
|
823
931
|
needs:
|
|
824
|
-
- job: api 👮 lint
|
|
932
|
+
- job: 'api 👮 lint | review '
|
|
825
933
|
artifacts: false
|
|
826
934
|
- job: 'api 🔨 app | review '
|
|
827
935
|
artifacts: false
|
|
828
936
|
- job: 'api 🔨 docker | review '
|
|
829
937
|
artifacts: false
|
|
830
|
-
- job: api 🧪 test
|
|
938
|
+
- job: 'api 🧪 test | review '
|
|
831
939
|
artifacts: false
|
|
832
940
|
- job: 'api 🧾 sbom | review '
|
|
833
941
|
artifacts: true
|
|
834
|
-
- job: api 🛡 audit
|
|
942
|
+
- job: 'api 🛡 audit | review '
|
|
835
943
|
artifacts: false
|
|
836
944
|
retry: *a1
|
|
837
945
|
interruptible: true
|
|
@@ -949,6 +1057,7 @@ api 🧪 test:
|
|
|
949
1057
|
- api/dist
|
|
950
1058
|
exclude:
|
|
951
1059
|
- api/.env
|
|
1060
|
+
- api/.next/cache/**/*
|
|
952
1061
|
expire_in: 1 day
|
|
953
1062
|
when: always
|
|
954
1063
|
reports: {}
|
|
@@ -1268,6 +1377,7 @@ api 🧪 test:
|
|
|
1268
1377
|
- api/dist
|
|
1269
1378
|
exclude:
|
|
1270
1379
|
- api/.env
|
|
1380
|
+
- api/.next/cache/**/*
|
|
1271
1381
|
expire_in: 1 day
|
|
1272
1382
|
when: always
|
|
1273
1383
|
reports: {}
|
|
@@ -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
|
|
@@ -291,6 +282,7 @@ api 🧪 test:
|
|
|
291
282
|
- api/dist
|
|
292
283
|
exclude:
|
|
293
284
|
- api/.env
|
|
285
|
+
- api/.next/cache/**/*
|
|
294
286
|
expire_in: 1 day
|
|
295
287
|
when: always
|
|
296
288
|
reports: {}
|
|
@@ -492,17 +484,17 @@ api 🧪 test:
|
|
|
492
484
|
- when: on_success
|
|
493
485
|
if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && $CI_COMMIT_MESSAGE !~ /^chore\\(release\\).*/
|
|
494
486
|
needs:
|
|
495
|
-
- job: api 👮 lint
|
|
487
|
+
- job: 'api 👮 lint | dev '
|
|
496
488
|
artifacts: false
|
|
497
489
|
- job: 'api 🔨 app | dev '
|
|
498
490
|
artifacts: false
|
|
499
491
|
- job: 'api 🔨 docker | dev '
|
|
500
492
|
artifacts: false
|
|
501
|
-
- job: api 🧪 test
|
|
493
|
+
- job: 'api 🧪 test | dev '
|
|
502
494
|
artifacts: false
|
|
503
495
|
- job: 'api 🧾 sbom | dev '
|
|
504
496
|
artifacts: true
|
|
505
|
-
- job: api 🛡 audit
|
|
497
|
+
- job: 'api 🛡 audit | dev '
|
|
506
498
|
artifacts: false
|
|
507
499
|
retry: *a1
|
|
508
500
|
interruptible: true
|
|
@@ -543,6 +535,115 @@ api 🧪 test:
|
|
|
543
535
|
retry: *a1
|
|
544
536
|
interruptible: true
|
|
545
537
|
allow_failure: true
|
|
538
|
+
'api 🛡 audit | review ':
|
|
539
|
+
stage: test
|
|
540
|
+
image: path/to/docker/jobs-default:the-version
|
|
541
|
+
variables:
|
|
542
|
+
KUBERNETES_CPU_REQUEST: '0.45'
|
|
543
|
+
KUBERNETES_MEMORY_REQUEST: 1Gi
|
|
544
|
+
KUBERNETES_MEMORY_LIMIT: 4Gi
|
|
545
|
+
script:
|
|
546
|
+
- collapseable_section_start "injectvars" "Injecting variables"
|
|
547
|
+
- export APP_PATH="api"
|
|
548
|
+
- collapseable_section_end "injectvars"
|
|
549
|
+
- cd api
|
|
550
|
+
- yarn npm audit --environment production
|
|
551
|
+
rules:
|
|
552
|
+
- when: never
|
|
553
|
+
if: $CI_PIPELINE_SOURCE == "trigger"
|
|
554
|
+
- if: $CI_MERGE_REQUEST_ID
|
|
555
|
+
needs: []
|
|
556
|
+
retry: *a1
|
|
557
|
+
interruptible: true
|
|
558
|
+
allow_failure: true
|
|
559
|
+
'api 👮 lint | review ':
|
|
560
|
+
stage: test
|
|
561
|
+
image: path/to/docker/jobs-default:the-version
|
|
562
|
+
variables:
|
|
563
|
+
KUBERNETES_CPU_REQUEST: '0.45'
|
|
564
|
+
KUBERNETES_MEMORY_REQUEST: 1Gi
|
|
565
|
+
KUBERNETES_MEMORY_LIMIT: 4Gi
|
|
566
|
+
script:
|
|
567
|
+
- collapseable_section_start "injectvars" "Injecting variables"
|
|
568
|
+
- export APP_PATH="api"
|
|
569
|
+
- collapseable_section_end "injectvars"
|
|
570
|
+
- collapseable_section_start "nodeinstall" "Ensure node version"
|
|
571
|
+
- if [ -f ~/.nvm/nvm.sh ]; then source ~/.nvm/nvm.sh; fi
|
|
572
|
+
- if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi
|
|
573
|
+
- collapseable_section_end "nodeinstall"
|
|
574
|
+
- cd api
|
|
575
|
+
- collapseable_section_start "nodeinstall" "Ensure node version"
|
|
576
|
+
- if [ -f ~/.nvm/nvm.sh ]; then source ~/.nvm/nvm.sh; fi
|
|
577
|
+
- if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi
|
|
578
|
+
- collapseable_section_end "nodeinstall"
|
|
579
|
+
- collapseable_section_start "yarninstall" "Yarn install"
|
|
580
|
+
- yarn install --immutable
|
|
581
|
+
- collapseable_section_end "yarninstall"
|
|
582
|
+
- yarn lint
|
|
583
|
+
cache:
|
|
584
|
+
- key: api-yarn-mr$CI_MERGE_REQUEST_IID
|
|
585
|
+
policy: pull-push
|
|
586
|
+
paths:
|
|
587
|
+
- api/.yarn
|
|
588
|
+
fallback_keys:
|
|
589
|
+
- api-yarn
|
|
590
|
+
- key: api-node-modules-mr$CI_MERGE_REQUEST_IID
|
|
591
|
+
policy: pull-push
|
|
592
|
+
paths:
|
|
593
|
+
- api/node_modules
|
|
594
|
+
fallback_keys:
|
|
595
|
+
- api-node-modules
|
|
596
|
+
rules:
|
|
597
|
+
- when: never
|
|
598
|
+
if: $CI_PIPELINE_SOURCE == "trigger"
|
|
599
|
+
- if: $CI_MERGE_REQUEST_ID
|
|
600
|
+
needs: []
|
|
601
|
+
retry: *a1
|
|
602
|
+
interruptible: true
|
|
603
|
+
'api 🧪 test | review ':
|
|
604
|
+
stage: test
|
|
605
|
+
image: path/to/docker/jobs-testing-chrome:the-version
|
|
606
|
+
variables:
|
|
607
|
+
KUBERNETES_CPU_REQUEST: '0.45'
|
|
608
|
+
KUBERNETES_MEMORY_REQUEST: 1Gi
|
|
609
|
+
KUBERNETES_MEMORY_LIMIT: 4Gi
|
|
610
|
+
script:
|
|
611
|
+
- collapseable_section_start "injectvars" "Injecting variables"
|
|
612
|
+
- export APP_PATH="api"
|
|
613
|
+
- collapseable_section_end "injectvars"
|
|
614
|
+
- collapseable_section_start "nodeinstall" "Ensure node version"
|
|
615
|
+
- if [ -f ~/.nvm/nvm.sh ]; then source ~/.nvm/nvm.sh; fi
|
|
616
|
+
- if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi
|
|
617
|
+
- collapseable_section_end "nodeinstall"
|
|
618
|
+
- cd api
|
|
619
|
+
- collapseable_section_start "nodeinstall" "Ensure node version"
|
|
620
|
+
- if [ -f ~/.nvm/nvm.sh ]; then source ~/.nvm/nvm.sh; fi
|
|
621
|
+
- if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi
|
|
622
|
+
- collapseable_section_end "nodeinstall"
|
|
623
|
+
- collapseable_section_start "yarninstall" "Yarn install"
|
|
624
|
+
- yarn install --immutable
|
|
625
|
+
- collapseable_section_end "yarninstall"
|
|
626
|
+
- yarn test
|
|
627
|
+
cache:
|
|
628
|
+
- key: api-yarn-mr$CI_MERGE_REQUEST_IID
|
|
629
|
+
policy: pull-push
|
|
630
|
+
paths:
|
|
631
|
+
- api/.yarn
|
|
632
|
+
fallback_keys:
|
|
633
|
+
- api-yarn
|
|
634
|
+
- key: api-node-modules-mr$CI_MERGE_REQUEST_IID
|
|
635
|
+
policy: pull-push
|
|
636
|
+
paths:
|
|
637
|
+
- api/node_modules
|
|
638
|
+
fallback_keys:
|
|
639
|
+
- api-node-modules
|
|
640
|
+
rules:
|
|
641
|
+
- when: never
|
|
642
|
+
if: $CI_PIPELINE_SOURCE == "trigger"
|
|
643
|
+
- if: $CI_MERGE_REQUEST_ID
|
|
644
|
+
needs: []
|
|
645
|
+
retry: *a1
|
|
646
|
+
interruptible: true
|
|
546
647
|
'api 🔨 app | review ':
|
|
547
648
|
stage: build
|
|
548
649
|
image: path/to/docker/jobs-default:the-version
|
|
@@ -602,14 +703,18 @@ api 🧪 test:
|
|
|
602
703
|
- collapseable_section_end "yarninstall"
|
|
603
704
|
- yarn build
|
|
604
705
|
cache:
|
|
605
|
-
- key: api-yarn
|
|
706
|
+
- key: api-yarn-mr$CI_MERGE_REQUEST_IID
|
|
606
707
|
policy: pull-push
|
|
607
708
|
paths:
|
|
608
709
|
- api/.yarn
|
|
609
|
-
|
|
710
|
+
fallback_keys:
|
|
711
|
+
- api-yarn
|
|
712
|
+
- key: api-node-modules-mr$CI_MERGE_REQUEST_IID
|
|
610
713
|
policy: pull-push
|
|
611
714
|
paths:
|
|
612
715
|
- api/node_modules
|
|
716
|
+
fallback_keys:
|
|
717
|
+
- api-node-modules
|
|
613
718
|
artifacts:
|
|
614
719
|
paths:
|
|
615
720
|
- api/__build_info.json
|
|
@@ -617,6 +722,7 @@ api 🧪 test:
|
|
|
617
722
|
- api/dist
|
|
618
723
|
exclude:
|
|
619
724
|
- api/.env
|
|
725
|
+
- api/.next/cache/**/*
|
|
620
726
|
expire_in: 1 day
|
|
621
727
|
when: always
|
|
622
728
|
reports: {}
|
|
@@ -675,10 +781,12 @@ api 🧪 test:
|
|
|
675
781
|
- docker push $DOCKER_CACHE_IMAGE
|
|
676
782
|
- collapseable_section_end "docker-push"
|
|
677
783
|
cache:
|
|
678
|
-
- key: api-yarn
|
|
784
|
+
- key: api-yarn-mr$CI_MERGE_REQUEST_IID
|
|
679
785
|
policy: pull
|
|
680
786
|
paths:
|
|
681
787
|
- api/.yarn
|
|
788
|
+
fallback_keys:
|
|
789
|
+
- api-yarn
|
|
682
790
|
rules:
|
|
683
791
|
- when: never
|
|
684
792
|
if: $CI_PIPELINE_SOURCE == "trigger"
|
|
@@ -821,17 +929,17 @@ api 🧪 test:
|
|
|
821
929
|
- when: on_success
|
|
822
930
|
if: $CI_MERGE_REQUEST_ID
|
|
823
931
|
needs:
|
|
824
|
-
- job: api 👮 lint
|
|
932
|
+
- job: 'api 👮 lint | review '
|
|
825
933
|
artifacts: false
|
|
826
934
|
- job: 'api 🔨 app | review '
|
|
827
935
|
artifacts: false
|
|
828
936
|
- job: 'api 🔨 docker | review '
|
|
829
937
|
artifacts: false
|
|
830
|
-
- job: api 🧪 test
|
|
938
|
+
- job: 'api 🧪 test | review '
|
|
831
939
|
artifacts: false
|
|
832
940
|
- job: 'api 🧾 sbom | review '
|
|
833
941
|
artifacts: true
|
|
834
|
-
- job: api 🛡 audit
|
|
942
|
+
- job: 'api 🛡 audit | review '
|
|
835
943
|
artifacts: false
|
|
836
944
|
retry: *a1
|
|
837
945
|
interruptible: true
|
|
@@ -949,6 +1057,7 @@ api 🧪 test:
|
|
|
949
1057
|
- api/dist
|
|
950
1058
|
exclude:
|
|
951
1059
|
- api/.env
|
|
1060
|
+
- api/.next/cache/**/*
|
|
952
1061
|
expire_in: 1 day
|
|
953
1062
|
when: always
|
|
954
1063
|
reports: {}
|
|
@@ -1268,6 +1377,7 @@ api 🧪 test:
|
|
|
1268
1377
|
- api/dist
|
|
1269
1378
|
exclude:
|
|
1270
1379
|
- api/.env
|
|
1380
|
+
- api/.next/cache/**/*
|
|
1271
1381
|
expire_in: 1 day
|
|
1272
1382
|
when: always
|
|
1273
1383
|
reports: {}
|