@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
|
-
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
|
|
@@ -493,17 +484,17 @@ api ๐งช test:
|
|
|
493
484
|
- when: on_success
|
|
494
485
|
if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && $CI_COMMIT_MESSAGE !~ /^chore\\(release\\).*/
|
|
495
486
|
needs:
|
|
496
|
-
- job: api ๐ฎ lint
|
|
487
|
+
- job: 'api ๐ฎ lint | dev '
|
|
497
488
|
artifacts: false
|
|
498
489
|
- job: 'api ๐จ app | dev '
|
|
499
490
|
artifacts: false
|
|
500
491
|
- job: 'api ๐จ docker | dev '
|
|
501
492
|
artifacts: false
|
|
502
|
-
- job: api ๐งช test
|
|
493
|
+
- job: 'api ๐งช test | dev '
|
|
503
494
|
artifacts: false
|
|
504
495
|
- job: 'api ๐งพ sbom | dev '
|
|
505
496
|
artifacts: true
|
|
506
|
-
- job: api ๐ก audit
|
|
497
|
+
- job: 'api ๐ก audit | dev '
|
|
507
498
|
artifacts: false
|
|
508
499
|
retry: *a1
|
|
509
500
|
interruptible: true
|
|
@@ -544,6 +535,115 @@ api ๐งช test:
|
|
|
544
535
|
retry: *a1
|
|
545
536
|
interruptible: true
|
|
546
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
|
|
547
647
|
'api ๐จ app | review ':
|
|
548
648
|
stage: build
|
|
549
649
|
image: path/to/docker/jobs-default:the-version
|
|
@@ -603,14 +703,18 @@ api ๐งช test:
|
|
|
603
703
|
- collapseable_section_end "yarninstall"
|
|
604
704
|
- yarn build
|
|
605
705
|
cache:
|
|
606
|
-
- key: api-yarn
|
|
706
|
+
- key: api-yarn-mr$CI_MERGE_REQUEST_IID
|
|
607
707
|
policy: pull-push
|
|
608
708
|
paths:
|
|
609
709
|
- api/.yarn
|
|
610
|
-
|
|
710
|
+
fallback_keys:
|
|
711
|
+
- api-yarn
|
|
712
|
+
- key: api-node-modules-mr$CI_MERGE_REQUEST_IID
|
|
611
713
|
policy: pull-push
|
|
612
714
|
paths:
|
|
613
715
|
- api/node_modules
|
|
716
|
+
fallback_keys:
|
|
717
|
+
- api-node-modules
|
|
614
718
|
artifacts:
|
|
615
719
|
paths:
|
|
616
720
|
- api/__build_info.json
|
|
@@ -677,10 +781,12 @@ api ๐งช test:
|
|
|
677
781
|
- docker push $DOCKER_CACHE_IMAGE
|
|
678
782
|
- collapseable_section_end "docker-push"
|
|
679
783
|
cache:
|
|
680
|
-
- key: api-yarn
|
|
784
|
+
- key: api-yarn-mr$CI_MERGE_REQUEST_IID
|
|
681
785
|
policy: pull
|
|
682
786
|
paths:
|
|
683
787
|
- api/.yarn
|
|
788
|
+
fallback_keys:
|
|
789
|
+
- api-yarn
|
|
684
790
|
rules:
|
|
685
791
|
- when: never
|
|
686
792
|
if: $CI_PIPELINE_SOURCE == "trigger"
|
|
@@ -823,17 +929,17 @@ api ๐งช test:
|
|
|
823
929
|
- when: on_success
|
|
824
930
|
if: $CI_MERGE_REQUEST_ID
|
|
825
931
|
needs:
|
|
826
|
-
- job: api ๐ฎ lint
|
|
932
|
+
- job: 'api ๐ฎ lint | review '
|
|
827
933
|
artifacts: false
|
|
828
934
|
- job: 'api ๐จ app | review '
|
|
829
935
|
artifacts: false
|
|
830
936
|
- job: 'api ๐จ docker | review '
|
|
831
937
|
artifacts: false
|
|
832
|
-
- job: api ๐งช test
|
|
938
|
+
- job: 'api ๐งช test | review '
|
|
833
939
|
artifacts: false
|
|
834
940
|
- job: 'api ๐งพ sbom | review '
|
|
835
941
|
artifacts: true
|
|
836
|
-
- job: api ๐ก audit
|
|
942
|
+
- job: 'api ๐ก audit | review '
|
|
837
943
|
artifacts: false
|
|
838
944
|
retry: *a1
|
|
839
945
|
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
|
|
@@ -493,17 +484,17 @@ api ๐งช test:
|
|
|
493
484
|
- when: on_success
|
|
494
485
|
if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && $CI_COMMIT_MESSAGE !~ /^chore\\(release\\).*/
|
|
495
486
|
needs:
|
|
496
|
-
- job: api ๐ฎ lint
|
|
487
|
+
- job: 'api ๐ฎ lint | dev '
|
|
497
488
|
artifacts: false
|
|
498
489
|
- job: 'api ๐จ app | dev '
|
|
499
490
|
artifacts: false
|
|
500
491
|
- job: 'api ๐จ docker | dev '
|
|
501
492
|
artifacts: false
|
|
502
|
-
- job: api ๐งช test
|
|
493
|
+
- job: 'api ๐งช test | dev '
|
|
503
494
|
artifacts: false
|
|
504
495
|
- job: 'api ๐งพ sbom | dev '
|
|
505
496
|
artifacts: true
|
|
506
|
-
- job: api ๐ก audit
|
|
497
|
+
- job: 'api ๐ก audit | dev '
|
|
507
498
|
artifacts: false
|
|
508
499
|
retry: *a1
|
|
509
500
|
interruptible: true
|
|
@@ -544,6 +535,115 @@ api ๐งช test:
|
|
|
544
535
|
retry: *a1
|
|
545
536
|
interruptible: true
|
|
546
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
|
|
547
647
|
'api ๐จ app | review ':
|
|
548
648
|
stage: build
|
|
549
649
|
image: path/to/docker/jobs-default:the-version
|
|
@@ -603,14 +703,18 @@ api ๐งช test:
|
|
|
603
703
|
- collapseable_section_end "yarninstall"
|
|
604
704
|
- yarn build
|
|
605
705
|
cache:
|
|
606
|
-
- key: api-yarn
|
|
706
|
+
- key: api-yarn-mr$CI_MERGE_REQUEST_IID
|
|
607
707
|
policy: pull-push
|
|
608
708
|
paths:
|
|
609
709
|
- api/.yarn
|
|
610
|
-
|
|
710
|
+
fallback_keys:
|
|
711
|
+
- api-yarn
|
|
712
|
+
- key: api-node-modules-mr$CI_MERGE_REQUEST_IID
|
|
611
713
|
policy: pull-push
|
|
612
714
|
paths:
|
|
613
715
|
- api/node_modules
|
|
716
|
+
fallback_keys:
|
|
717
|
+
- api-node-modules
|
|
614
718
|
artifacts:
|
|
615
719
|
paths:
|
|
616
720
|
- api/__build_info.json
|
|
@@ -677,10 +781,12 @@ api ๐งช test:
|
|
|
677
781
|
- docker push $DOCKER_CACHE_IMAGE
|
|
678
782
|
- collapseable_section_end "docker-push"
|
|
679
783
|
cache:
|
|
680
|
-
- key: api-yarn
|
|
784
|
+
- key: api-yarn-mr$CI_MERGE_REQUEST_IID
|
|
681
785
|
policy: pull
|
|
682
786
|
paths:
|
|
683
787
|
- api/.yarn
|
|
788
|
+
fallback_keys:
|
|
789
|
+
- api-yarn
|
|
684
790
|
rules:
|
|
685
791
|
- when: never
|
|
686
792
|
if: $CI_PIPELINE_SOURCE == "trigger"
|
|
@@ -823,17 +929,17 @@ api ๐งช test:
|
|
|
823
929
|
- when: on_success
|
|
824
930
|
if: $CI_MERGE_REQUEST_ID
|
|
825
931
|
needs:
|
|
826
|
-
- job: api ๐ฎ lint
|
|
932
|
+
- job: 'api ๐ฎ lint | review '
|
|
827
933
|
artifacts: false
|
|
828
934
|
- job: 'api ๐จ app | review '
|
|
829
935
|
artifacts: false
|
|
830
936
|
- job: 'api ๐จ docker | review '
|
|
831
937
|
artifacts: false
|
|
832
|
-
- job: api ๐งช test
|
|
938
|
+
- job: 'api ๐งช test | review '
|
|
833
939
|
artifacts: false
|
|
834
940
|
- job: 'api ๐งพ sbom | review '
|
|
835
941
|
artifacts: true
|
|
836
|
-
- job: api ๐ก audit
|
|
942
|
+
- job: 'api ๐ก audit | review '
|
|
837
943
|
artifacts: false
|
|
838
944
|
retry: *a1
|
|
839
945
|
interruptible: true
|