@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
|
|
@@ -269,6 +260,8 @@ api ๐งช test:
|
|
|
269
260
|
- api/__build_info.json
|
|
270
261
|
- api/.next
|
|
271
262
|
- api/dist
|
|
263
|
+
exclude:
|
|
264
|
+
- api/.next/cache/**/*
|
|
272
265
|
expire_in: 1 day
|
|
273
266
|
when: always
|
|
274
267
|
reports: {}
|
|
@@ -492,17 +485,17 @@ api ๐งช test:
|
|
|
492
485
|
- when: on_success
|
|
493
486
|
if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && $CI_COMMIT_MESSAGE !~ /^chore\\(release\\).*/
|
|
494
487
|
needs:
|
|
495
|
-
- job: api ๐ฎ lint
|
|
488
|
+
- job: 'api ๐ฎ lint | dev '
|
|
496
489
|
artifacts: false
|
|
497
490
|
- job: 'api ๐จ app | dev '
|
|
498
491
|
artifacts: false
|
|
499
492
|
- job: 'api ๐จ docker | dev '
|
|
500
493
|
artifacts: false
|
|
501
|
-
- job: api ๐งช test
|
|
494
|
+
- job: 'api ๐งช test | dev '
|
|
502
495
|
artifacts: false
|
|
503
496
|
- job: 'api ๐งพ sbom | dev '
|
|
504
497
|
artifacts: true
|
|
505
|
-
- job: api ๐ก audit
|
|
498
|
+
- job: 'api ๐ก audit | dev '
|
|
506
499
|
artifacts: false
|
|
507
500
|
retry: *a1
|
|
508
501
|
interruptible: true
|
|
@@ -607,6 +600,115 @@ api ๐งช test:
|
|
|
607
600
|
retry: *a1
|
|
608
601
|
interruptible: true
|
|
609
602
|
allow_failure: true
|
|
603
|
+
'api ๐ก audit | review ':
|
|
604
|
+
stage: test
|
|
605
|
+
image: path/to/docker/jobs-default: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
|
+
- cd api
|
|
615
|
+
- yarn npm audit --environment production
|
|
616
|
+
rules:
|
|
617
|
+
- when: never
|
|
618
|
+
if: $CI_PIPELINE_SOURCE == "trigger"
|
|
619
|
+
- if: $CI_MERGE_REQUEST_ID
|
|
620
|
+
needs: []
|
|
621
|
+
retry: *a1
|
|
622
|
+
interruptible: true
|
|
623
|
+
allow_failure: true
|
|
624
|
+
'api ๐ฎ lint | review ':
|
|
625
|
+
stage: test
|
|
626
|
+
image: path/to/docker/jobs-default:the-version
|
|
627
|
+
variables:
|
|
628
|
+
KUBERNETES_CPU_REQUEST: '0.45'
|
|
629
|
+
KUBERNETES_MEMORY_REQUEST: 1Gi
|
|
630
|
+
KUBERNETES_MEMORY_LIMIT: 4Gi
|
|
631
|
+
script:
|
|
632
|
+
- collapseable_section_start "injectvars" "Injecting variables"
|
|
633
|
+
- export APP_PATH="api"
|
|
634
|
+
- collapseable_section_end "injectvars"
|
|
635
|
+
- collapseable_section_start "nodeinstall" "Ensure node version"
|
|
636
|
+
- if [ -f ~/.nvm/nvm.sh ]; then source ~/.nvm/nvm.sh; fi
|
|
637
|
+
- if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi
|
|
638
|
+
- collapseable_section_end "nodeinstall"
|
|
639
|
+
- cd api
|
|
640
|
+
- collapseable_section_start "nodeinstall" "Ensure node version"
|
|
641
|
+
- if [ -f ~/.nvm/nvm.sh ]; then source ~/.nvm/nvm.sh; fi
|
|
642
|
+
- if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi
|
|
643
|
+
- collapseable_section_end "nodeinstall"
|
|
644
|
+
- collapseable_section_start "yarninstall" "Yarn install"
|
|
645
|
+
- yarn install --immutable
|
|
646
|
+
- collapseable_section_end "yarninstall"
|
|
647
|
+
- yarn lint
|
|
648
|
+
cache:
|
|
649
|
+
- key: api-yarn-mr$CI_MERGE_REQUEST_IID
|
|
650
|
+
policy: pull-push
|
|
651
|
+
paths:
|
|
652
|
+
- api/.yarn
|
|
653
|
+
fallback_keys:
|
|
654
|
+
- api-yarn
|
|
655
|
+
- key: api-node-modules-mr$CI_MERGE_REQUEST_IID
|
|
656
|
+
policy: pull-push
|
|
657
|
+
paths:
|
|
658
|
+
- api/node_modules
|
|
659
|
+
fallback_keys:
|
|
660
|
+
- api-node-modules
|
|
661
|
+
rules:
|
|
662
|
+
- when: never
|
|
663
|
+
if: $CI_PIPELINE_SOURCE == "trigger"
|
|
664
|
+
- if: $CI_MERGE_REQUEST_ID
|
|
665
|
+
needs: []
|
|
666
|
+
retry: *a1
|
|
667
|
+
interruptible: true
|
|
668
|
+
'api ๐งช test | review ':
|
|
669
|
+
stage: test
|
|
670
|
+
image: path/to/docker/jobs-testing-chrome:the-version
|
|
671
|
+
variables:
|
|
672
|
+
KUBERNETES_CPU_REQUEST: '0.45'
|
|
673
|
+
KUBERNETES_MEMORY_REQUEST: 1Gi
|
|
674
|
+
KUBERNETES_MEMORY_LIMIT: 4Gi
|
|
675
|
+
script:
|
|
676
|
+
- collapseable_section_start "injectvars" "Injecting variables"
|
|
677
|
+
- export APP_PATH="api"
|
|
678
|
+
- collapseable_section_end "injectvars"
|
|
679
|
+
- collapseable_section_start "nodeinstall" "Ensure node version"
|
|
680
|
+
- if [ -f ~/.nvm/nvm.sh ]; then source ~/.nvm/nvm.sh; fi
|
|
681
|
+
- if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi
|
|
682
|
+
- collapseable_section_end "nodeinstall"
|
|
683
|
+
- cd api
|
|
684
|
+
- collapseable_section_start "nodeinstall" "Ensure node version"
|
|
685
|
+
- if [ -f ~/.nvm/nvm.sh ]; then source ~/.nvm/nvm.sh; fi
|
|
686
|
+
- if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi
|
|
687
|
+
- collapseable_section_end "nodeinstall"
|
|
688
|
+
- collapseable_section_start "yarninstall" "Yarn install"
|
|
689
|
+
- yarn install --immutable
|
|
690
|
+
- collapseable_section_end "yarninstall"
|
|
691
|
+
- yarn test
|
|
692
|
+
cache:
|
|
693
|
+
- key: api-yarn-mr$CI_MERGE_REQUEST_IID
|
|
694
|
+
policy: pull-push
|
|
695
|
+
paths:
|
|
696
|
+
- api/.yarn
|
|
697
|
+
fallback_keys:
|
|
698
|
+
- api-yarn
|
|
699
|
+
- key: api-node-modules-mr$CI_MERGE_REQUEST_IID
|
|
700
|
+
policy: pull-push
|
|
701
|
+
paths:
|
|
702
|
+
- api/node_modules
|
|
703
|
+
fallback_keys:
|
|
704
|
+
- api-node-modules
|
|
705
|
+
rules:
|
|
706
|
+
- when: never
|
|
707
|
+
if: $CI_PIPELINE_SOURCE == "trigger"
|
|
708
|
+
- if: $CI_MERGE_REQUEST_ID
|
|
709
|
+
needs: []
|
|
710
|
+
retry: *a1
|
|
711
|
+
interruptible: true
|
|
610
712
|
'api ๐จ app | review ':
|
|
611
713
|
stage: build
|
|
612
714
|
image: path/to/docker/jobs-default:the-version
|
|
@@ -646,19 +748,25 @@ api ๐งช test:
|
|
|
646
748
|
- collapseable_section_end "yarninstall"
|
|
647
749
|
- yarn build
|
|
648
750
|
cache:
|
|
649
|
-
- key: api-yarn
|
|
751
|
+
- key: api-yarn-mr$CI_MERGE_REQUEST_IID
|
|
650
752
|
policy: pull-push
|
|
651
753
|
paths:
|
|
652
754
|
- api/.yarn
|
|
653
|
-
|
|
755
|
+
fallback_keys:
|
|
756
|
+
- api-yarn
|
|
757
|
+
- key: api-node-modules-mr$CI_MERGE_REQUEST_IID
|
|
654
758
|
policy: pull-push
|
|
655
759
|
paths:
|
|
656
760
|
- api/node_modules
|
|
761
|
+
fallback_keys:
|
|
762
|
+
- api-node-modules
|
|
657
763
|
artifacts:
|
|
658
764
|
paths:
|
|
659
765
|
- api/__build_info.json
|
|
660
766
|
- api/.next
|
|
661
767
|
- api/dist
|
|
768
|
+
exclude:
|
|
769
|
+
- api/.next/cache/**/*
|
|
662
770
|
expire_in: 1 day
|
|
663
771
|
when: always
|
|
664
772
|
reports: {}
|
|
@@ -717,10 +825,12 @@ api ๐งช test:
|
|
|
717
825
|
- docker push $DOCKER_CACHE_IMAGE
|
|
718
826
|
- collapseable_section_end "docker-push"
|
|
719
827
|
cache:
|
|
720
|
-
- key: api-yarn
|
|
828
|
+
- key: api-yarn-mr$CI_MERGE_REQUEST_IID
|
|
721
829
|
policy: pull
|
|
722
830
|
paths:
|
|
723
831
|
- api/.yarn
|
|
832
|
+
fallback_keys:
|
|
833
|
+
- api-yarn
|
|
724
834
|
rules:
|
|
725
835
|
- when: never
|
|
726
836
|
if: $CI_PIPELINE_SOURCE == "trigger"
|
|
@@ -883,17 +993,17 @@ api ๐งช test:
|
|
|
883
993
|
- when: on_success
|
|
884
994
|
if: $CI_MERGE_REQUEST_ID
|
|
885
995
|
needs:
|
|
886
|
-
- job: api ๐ฎ lint
|
|
996
|
+
- job: 'api ๐ฎ lint | review '
|
|
887
997
|
artifacts: false
|
|
888
998
|
- job: 'api ๐จ app | review '
|
|
889
999
|
artifacts: false
|
|
890
1000
|
- job: 'api ๐จ docker | review '
|
|
891
1001
|
artifacts: false
|
|
892
|
-
- job: api ๐งช test
|
|
1002
|
+
- job: 'api ๐งช test | review '
|
|
893
1003
|
artifacts: false
|
|
894
1004
|
- job: 'api ๐งพ sbom | review '
|
|
895
1005
|
artifacts: true
|
|
896
|
-
- job: api ๐ก audit
|
|
1006
|
+
- job: 'api ๐ก audit | review '
|
|
897
1007
|
artifacts: false
|
|
898
1008
|
retry: *a1
|
|
899
1009
|
interruptible: true
|
|
@@ -1050,6 +1160,8 @@ api ๐งช test:
|
|
|
1050
1160
|
- api/__build_info.json
|
|
1051
1161
|
- api/.next
|
|
1052
1162
|
- api/dist
|
|
1163
|
+
exclude:
|
|
1164
|
+
- api/.next/cache/**/*
|
|
1053
1165
|
expire_in: 1 day
|
|
1054
1166
|
when: always
|
|
1055
1167
|
reports: {}
|
|
@@ -1433,6 +1545,8 @@ api ๐งช test:
|
|
|
1433
1545
|
- api/__build_info.json
|
|
1434
1546
|
- api/.next
|
|
1435
1547
|
- api/dist
|
|
1548
|
+
exclude:
|
|
1549
|
+
- api/.next/cache/**/*
|
|
1436
1550
|
expire_in: 1 day
|
|
1437
1551
|
when: always
|
|
1438
1552
|
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
|
|
@@ -271,6 +262,8 @@ api ๐งช test:
|
|
|
271
262
|
- api/__build_info.json
|
|
272
263
|
- api/.next
|
|
273
264
|
- api/dist
|
|
265
|
+
exclude:
|
|
266
|
+
- api/.next/cache/**/*
|
|
274
267
|
expire_in: 1 day
|
|
275
268
|
when: always
|
|
276
269
|
reports: {}
|
|
@@ -493,17 +486,17 @@ api ๐งช test:
|
|
|
493
486
|
- when: on_success
|
|
494
487
|
if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && $CI_COMMIT_MESSAGE !~ /^chore\\(release\\).*/
|
|
495
488
|
needs:
|
|
496
|
-
- job: api ๐ฎ lint
|
|
489
|
+
- job: 'api ๐ฎ lint | dev '
|
|
497
490
|
artifacts: false
|
|
498
491
|
- job: 'api ๐จ app | dev '
|
|
499
492
|
artifacts: false
|
|
500
493
|
- job: 'api ๐จ docker | dev '
|
|
501
494
|
artifacts: false
|
|
502
|
-
- job: api ๐งช test
|
|
495
|
+
- job: 'api ๐งช test | dev '
|
|
503
496
|
artifacts: false
|
|
504
497
|
- job: 'api ๐งพ sbom | dev '
|
|
505
498
|
artifacts: true
|
|
506
|
-
- job: api ๐ก audit
|
|
499
|
+
- job: 'api ๐ก audit | dev '
|
|
507
500
|
artifacts: false
|
|
508
501
|
retry: *a1
|
|
509
502
|
interruptible: true
|
|
@@ -612,6 +605,115 @@ api ๐งช test:
|
|
|
612
605
|
retry: *a1
|
|
613
606
|
interruptible: true
|
|
614
607
|
allow_failure: true
|
|
608
|
+
'api ๐ก audit | review ':
|
|
609
|
+
stage: test
|
|
610
|
+
image: path/to/docker/jobs-default:the-version
|
|
611
|
+
variables:
|
|
612
|
+
KUBERNETES_CPU_REQUEST: '0.45'
|
|
613
|
+
KUBERNETES_MEMORY_REQUEST: 1Gi
|
|
614
|
+
KUBERNETES_MEMORY_LIMIT: 4Gi
|
|
615
|
+
script:
|
|
616
|
+
- collapseable_section_start "injectvars" "Injecting variables"
|
|
617
|
+
- export APP_PATH="api"
|
|
618
|
+
- collapseable_section_end "injectvars"
|
|
619
|
+
- cd api
|
|
620
|
+
- yarn npm audit --environment production
|
|
621
|
+
rules:
|
|
622
|
+
- when: never
|
|
623
|
+
if: $CI_PIPELINE_SOURCE == "trigger"
|
|
624
|
+
- if: $CI_MERGE_REQUEST_ID
|
|
625
|
+
needs: []
|
|
626
|
+
retry: *a1
|
|
627
|
+
interruptible: true
|
|
628
|
+
allow_failure: true
|
|
629
|
+
'api ๐ฎ lint | review ':
|
|
630
|
+
stage: test
|
|
631
|
+
image: path/to/docker/jobs-default:the-version
|
|
632
|
+
variables:
|
|
633
|
+
KUBERNETES_CPU_REQUEST: '0.45'
|
|
634
|
+
KUBERNETES_MEMORY_REQUEST: 1Gi
|
|
635
|
+
KUBERNETES_MEMORY_LIMIT: 4Gi
|
|
636
|
+
script:
|
|
637
|
+
- collapseable_section_start "injectvars" "Injecting variables"
|
|
638
|
+
- export APP_PATH="api"
|
|
639
|
+
- collapseable_section_end "injectvars"
|
|
640
|
+
- collapseable_section_start "nodeinstall" "Ensure node version"
|
|
641
|
+
- if [ -f ~/.nvm/nvm.sh ]; then source ~/.nvm/nvm.sh; fi
|
|
642
|
+
- if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi
|
|
643
|
+
- collapseable_section_end "nodeinstall"
|
|
644
|
+
- cd api
|
|
645
|
+
- collapseable_section_start "nodeinstall" "Ensure node version"
|
|
646
|
+
- if [ -f ~/.nvm/nvm.sh ]; then source ~/.nvm/nvm.sh; fi
|
|
647
|
+
- if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi
|
|
648
|
+
- collapseable_section_end "nodeinstall"
|
|
649
|
+
- collapseable_section_start "yarninstall" "Yarn install"
|
|
650
|
+
- yarn install --immutable
|
|
651
|
+
- collapseable_section_end "yarninstall"
|
|
652
|
+
- yarn lint
|
|
653
|
+
cache:
|
|
654
|
+
- key: api-yarn-mr$CI_MERGE_REQUEST_IID
|
|
655
|
+
policy: pull-push
|
|
656
|
+
paths:
|
|
657
|
+
- api/.yarn
|
|
658
|
+
fallback_keys:
|
|
659
|
+
- api-yarn
|
|
660
|
+
- key: api-node-modules-mr$CI_MERGE_REQUEST_IID
|
|
661
|
+
policy: pull-push
|
|
662
|
+
paths:
|
|
663
|
+
- api/node_modules
|
|
664
|
+
fallback_keys:
|
|
665
|
+
- api-node-modules
|
|
666
|
+
rules:
|
|
667
|
+
- when: never
|
|
668
|
+
if: $CI_PIPELINE_SOURCE == "trigger"
|
|
669
|
+
- if: $CI_MERGE_REQUEST_ID
|
|
670
|
+
needs: []
|
|
671
|
+
retry: *a1
|
|
672
|
+
interruptible: true
|
|
673
|
+
'api ๐งช test | review ':
|
|
674
|
+
stage: test
|
|
675
|
+
image: path/to/docker/jobs-testing-chrome:the-version
|
|
676
|
+
variables:
|
|
677
|
+
KUBERNETES_CPU_REQUEST: '0.45'
|
|
678
|
+
KUBERNETES_MEMORY_REQUEST: 1Gi
|
|
679
|
+
KUBERNETES_MEMORY_LIMIT: 4Gi
|
|
680
|
+
script:
|
|
681
|
+
- collapseable_section_start "injectvars" "Injecting variables"
|
|
682
|
+
- export APP_PATH="api"
|
|
683
|
+
- collapseable_section_end "injectvars"
|
|
684
|
+
- collapseable_section_start "nodeinstall" "Ensure node version"
|
|
685
|
+
- if [ -f ~/.nvm/nvm.sh ]; then source ~/.nvm/nvm.sh; fi
|
|
686
|
+
- if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi
|
|
687
|
+
- collapseable_section_end "nodeinstall"
|
|
688
|
+
- cd api
|
|
689
|
+
- collapseable_section_start "nodeinstall" "Ensure node version"
|
|
690
|
+
- if [ -f ~/.nvm/nvm.sh ]; then source ~/.nvm/nvm.sh; fi
|
|
691
|
+
- if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi
|
|
692
|
+
- collapseable_section_end "nodeinstall"
|
|
693
|
+
- collapseable_section_start "yarninstall" "Yarn install"
|
|
694
|
+
- yarn install --immutable
|
|
695
|
+
- collapseable_section_end "yarninstall"
|
|
696
|
+
- yarn test
|
|
697
|
+
cache:
|
|
698
|
+
- key: api-yarn-mr$CI_MERGE_REQUEST_IID
|
|
699
|
+
policy: pull-push
|
|
700
|
+
paths:
|
|
701
|
+
- api/.yarn
|
|
702
|
+
fallback_keys:
|
|
703
|
+
- api-yarn
|
|
704
|
+
- key: api-node-modules-mr$CI_MERGE_REQUEST_IID
|
|
705
|
+
policy: pull-push
|
|
706
|
+
paths:
|
|
707
|
+
- api/node_modules
|
|
708
|
+
fallback_keys:
|
|
709
|
+
- api-node-modules
|
|
710
|
+
rules:
|
|
711
|
+
- when: never
|
|
712
|
+
if: $CI_PIPELINE_SOURCE == "trigger"
|
|
713
|
+
- if: $CI_MERGE_REQUEST_ID
|
|
714
|
+
needs: []
|
|
715
|
+
retry: *a1
|
|
716
|
+
interruptible: true
|
|
615
717
|
'api ๐จ app | review ':
|
|
616
718
|
stage: build
|
|
617
719
|
image: path/to/docker/jobs-default:the-version
|
|
@@ -653,19 +755,25 @@ api ๐งช test:
|
|
|
653
755
|
- collapseable_section_end "yarninstall"
|
|
654
756
|
- yarn build
|
|
655
757
|
cache:
|
|
656
|
-
- key: api-yarn
|
|
758
|
+
- key: api-yarn-mr$CI_MERGE_REQUEST_IID
|
|
657
759
|
policy: pull-push
|
|
658
760
|
paths:
|
|
659
761
|
- api/.yarn
|
|
660
|
-
|
|
762
|
+
fallback_keys:
|
|
763
|
+
- api-yarn
|
|
764
|
+
- key: api-node-modules-mr$CI_MERGE_REQUEST_IID
|
|
661
765
|
policy: pull-push
|
|
662
766
|
paths:
|
|
663
767
|
- api/node_modules
|
|
768
|
+
fallback_keys:
|
|
769
|
+
- api-node-modules
|
|
664
770
|
artifacts:
|
|
665
771
|
paths:
|
|
666
772
|
- api/__build_info.json
|
|
667
773
|
- api/.next
|
|
668
774
|
- api/dist
|
|
775
|
+
exclude:
|
|
776
|
+
- api/.next/cache/**/*
|
|
669
777
|
expire_in: 1 day
|
|
670
778
|
when: always
|
|
671
779
|
reports: {}
|
|
@@ -724,10 +832,12 @@ api ๐งช test:
|
|
|
724
832
|
- docker push $DOCKER_CACHE_IMAGE
|
|
725
833
|
- collapseable_section_end "docker-push"
|
|
726
834
|
cache:
|
|
727
|
-
- key: api-yarn
|
|
835
|
+
- key: api-yarn-mr$CI_MERGE_REQUEST_IID
|
|
728
836
|
policy: pull
|
|
729
837
|
paths:
|
|
730
838
|
- api/.yarn
|
|
839
|
+
fallback_keys:
|
|
840
|
+
- api-yarn
|
|
731
841
|
rules:
|
|
732
842
|
- when: never
|
|
733
843
|
if: $CI_PIPELINE_SOURCE == "trigger"
|
|
@@ -889,17 +999,17 @@ api ๐งช test:
|
|
|
889
999
|
- when: on_success
|
|
890
1000
|
if: $CI_MERGE_REQUEST_ID
|
|
891
1001
|
needs:
|
|
892
|
-
- job: api ๐ฎ lint
|
|
1002
|
+
- job: 'api ๐ฎ lint | review '
|
|
893
1003
|
artifacts: false
|
|
894
1004
|
- job: 'api ๐จ app | review '
|
|
895
1005
|
artifacts: false
|
|
896
1006
|
- job: 'api ๐จ docker | review '
|
|
897
1007
|
artifacts: false
|
|
898
|
-
- job: api ๐งช test
|
|
1008
|
+
- job: 'api ๐งช test | review '
|
|
899
1009
|
artifacts: false
|
|
900
1010
|
- job: 'api ๐งพ sbom | review '
|
|
901
1011
|
artifacts: true
|
|
902
|
-
- job: api ๐ก audit
|
|
1012
|
+
- job: 'api ๐ก audit | review '
|
|
903
1013
|
artifacts: false
|
|
904
1014
|
retry: *a1
|
|
905
1015
|
interruptible: true
|
|
@@ -1062,6 +1172,8 @@ api ๐งช test:
|
|
|
1062
1172
|
- api/__build_info.json
|
|
1063
1173
|
- api/.next
|
|
1064
1174
|
- api/dist
|
|
1175
|
+
exclude:
|
|
1176
|
+
- api/.next/cache/**/*
|
|
1065
1177
|
expire_in: 1 day
|
|
1066
1178
|
when: always
|
|
1067
1179
|
reports: {}
|
|
@@ -1450,6 +1562,8 @@ api ๐งช test:
|
|
|
1450
1562
|
- api/__build_info.json
|
|
1451
1563
|
- api/.next
|
|
1452
1564
|
- api/dist
|
|
1565
|
+
exclude:
|
|
1566
|
+
- api/.next/cache/**/*
|
|
1453
1567
|
expire_in: 1 day
|
|
1454
1568
|
when: always
|
|
1455
1569
|
reports: {}
|