@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
|
|
@@ -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: {}
|
|
@@ -519,17 +512,17 @@ api ๐งช test:
|
|
|
519
512
|
- when: on_success
|
|
520
513
|
if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && $CI_COMMIT_MESSAGE !~ /^chore\\(release\\).*/
|
|
521
514
|
needs:
|
|
522
|
-
- job: api ๐ฎ lint
|
|
515
|
+
- job: 'api ๐ฎ lint | dev '
|
|
523
516
|
artifacts: false
|
|
524
517
|
- job: 'api ๐จ app | dev '
|
|
525
518
|
artifacts: false
|
|
526
519
|
- job: 'api ๐จ docker | dev '
|
|
527
520
|
artifacts: false
|
|
528
|
-
- job: api ๐งช test
|
|
521
|
+
- job: 'api ๐งช test | dev '
|
|
529
522
|
artifacts: false
|
|
530
523
|
- job: 'api ๐งพ sbom | dev '
|
|
531
524
|
artifacts: true
|
|
532
|
-
- job: api ๐ก audit
|
|
525
|
+
- job: 'api ๐ก audit | dev '
|
|
533
526
|
artifacts: false
|
|
534
527
|
retry: *a1
|
|
535
528
|
interruptible: true
|
|
@@ -638,6 +631,115 @@ api ๐งช test:
|
|
|
638
631
|
retry: *a1
|
|
639
632
|
interruptible: true
|
|
640
633
|
allow_failure: true
|
|
634
|
+
'api ๐ก audit | review ':
|
|
635
|
+
stage: test
|
|
636
|
+
image: path/to/docker/jobs-default:the-version
|
|
637
|
+
variables:
|
|
638
|
+
KUBERNETES_CPU_REQUEST: '0.45'
|
|
639
|
+
KUBERNETES_MEMORY_REQUEST: 1Gi
|
|
640
|
+
KUBERNETES_MEMORY_LIMIT: 4Gi
|
|
641
|
+
script:
|
|
642
|
+
- collapseable_section_start "injectvars" "Injecting variables"
|
|
643
|
+
- export APP_PATH="api"
|
|
644
|
+
- collapseable_section_end "injectvars"
|
|
645
|
+
- cd api
|
|
646
|
+
- yarn npm audit --environment production
|
|
647
|
+
rules:
|
|
648
|
+
- when: never
|
|
649
|
+
if: $CI_PIPELINE_SOURCE == "trigger"
|
|
650
|
+
- if: $CI_MERGE_REQUEST_ID
|
|
651
|
+
needs: []
|
|
652
|
+
retry: *a1
|
|
653
|
+
interruptible: true
|
|
654
|
+
allow_failure: true
|
|
655
|
+
'api ๐ฎ lint | review ':
|
|
656
|
+
stage: test
|
|
657
|
+
image: path/to/docker/jobs-default:the-version
|
|
658
|
+
variables:
|
|
659
|
+
KUBERNETES_CPU_REQUEST: '0.45'
|
|
660
|
+
KUBERNETES_MEMORY_REQUEST: 1Gi
|
|
661
|
+
KUBERNETES_MEMORY_LIMIT: 4Gi
|
|
662
|
+
script:
|
|
663
|
+
- collapseable_section_start "injectvars" "Injecting variables"
|
|
664
|
+
- export APP_PATH="api"
|
|
665
|
+
- collapseable_section_end "injectvars"
|
|
666
|
+
- collapseable_section_start "nodeinstall" "Ensure node version"
|
|
667
|
+
- if [ -f ~/.nvm/nvm.sh ]; then source ~/.nvm/nvm.sh; fi
|
|
668
|
+
- if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi
|
|
669
|
+
- collapseable_section_end "nodeinstall"
|
|
670
|
+
- cd api
|
|
671
|
+
- collapseable_section_start "nodeinstall" "Ensure node version"
|
|
672
|
+
- if [ -f ~/.nvm/nvm.sh ]; then source ~/.nvm/nvm.sh; fi
|
|
673
|
+
- if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi
|
|
674
|
+
- collapseable_section_end "nodeinstall"
|
|
675
|
+
- collapseable_section_start "yarninstall" "Yarn install"
|
|
676
|
+
- yarn install --immutable
|
|
677
|
+
- collapseable_section_end "yarninstall"
|
|
678
|
+
- yarn lint
|
|
679
|
+
cache:
|
|
680
|
+
- key: api-yarn-mr$CI_MERGE_REQUEST_IID
|
|
681
|
+
policy: pull-push
|
|
682
|
+
paths:
|
|
683
|
+
- api/.yarn
|
|
684
|
+
fallback_keys:
|
|
685
|
+
- api-yarn
|
|
686
|
+
- key: api-node-modules-mr$CI_MERGE_REQUEST_IID
|
|
687
|
+
policy: pull-push
|
|
688
|
+
paths:
|
|
689
|
+
- api/node_modules
|
|
690
|
+
fallback_keys:
|
|
691
|
+
- api-node-modules
|
|
692
|
+
rules:
|
|
693
|
+
- when: never
|
|
694
|
+
if: $CI_PIPELINE_SOURCE == "trigger"
|
|
695
|
+
- if: $CI_MERGE_REQUEST_ID
|
|
696
|
+
needs: []
|
|
697
|
+
retry: *a1
|
|
698
|
+
interruptible: true
|
|
699
|
+
'api ๐งช test | review ':
|
|
700
|
+
stage: test
|
|
701
|
+
image: path/to/docker/jobs-testing-chrome:the-version
|
|
702
|
+
variables:
|
|
703
|
+
KUBERNETES_CPU_REQUEST: '0.45'
|
|
704
|
+
KUBERNETES_MEMORY_REQUEST: 1Gi
|
|
705
|
+
KUBERNETES_MEMORY_LIMIT: 4Gi
|
|
706
|
+
script:
|
|
707
|
+
- collapseable_section_start "injectvars" "Injecting variables"
|
|
708
|
+
- export APP_PATH="api"
|
|
709
|
+
- collapseable_section_end "injectvars"
|
|
710
|
+
- collapseable_section_start "nodeinstall" "Ensure node version"
|
|
711
|
+
- if [ -f ~/.nvm/nvm.sh ]; then source ~/.nvm/nvm.sh; fi
|
|
712
|
+
- if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi
|
|
713
|
+
- collapseable_section_end "nodeinstall"
|
|
714
|
+
- cd api
|
|
715
|
+
- collapseable_section_start "nodeinstall" "Ensure node version"
|
|
716
|
+
- if [ -f ~/.nvm/nvm.sh ]; then source ~/.nvm/nvm.sh; fi
|
|
717
|
+
- if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi
|
|
718
|
+
- collapseable_section_end "nodeinstall"
|
|
719
|
+
- collapseable_section_start "yarninstall" "Yarn install"
|
|
720
|
+
- yarn install --immutable
|
|
721
|
+
- collapseable_section_end "yarninstall"
|
|
722
|
+
- yarn test
|
|
723
|
+
cache:
|
|
724
|
+
- key: api-yarn-mr$CI_MERGE_REQUEST_IID
|
|
725
|
+
policy: pull-push
|
|
726
|
+
paths:
|
|
727
|
+
- api/.yarn
|
|
728
|
+
fallback_keys:
|
|
729
|
+
- api-yarn
|
|
730
|
+
- key: api-node-modules-mr$CI_MERGE_REQUEST_IID
|
|
731
|
+
policy: pull-push
|
|
732
|
+
paths:
|
|
733
|
+
- api/node_modules
|
|
734
|
+
fallback_keys:
|
|
735
|
+
- api-node-modules
|
|
736
|
+
rules:
|
|
737
|
+
- when: never
|
|
738
|
+
if: $CI_PIPELINE_SOURCE == "trigger"
|
|
739
|
+
- if: $CI_MERGE_REQUEST_ID
|
|
740
|
+
needs: []
|
|
741
|
+
retry: *a1
|
|
742
|
+
interruptible: true
|
|
641
743
|
'api ๐จ app | review ':
|
|
642
744
|
stage: build
|
|
643
745
|
image: path/to/docker/jobs-default:the-version
|
|
@@ -679,19 +781,25 @@ api ๐งช test:
|
|
|
679
781
|
- collapseable_section_end "yarninstall"
|
|
680
782
|
- yarn build
|
|
681
783
|
cache:
|
|
682
|
-
- key: api-yarn
|
|
784
|
+
- key: api-yarn-mr$CI_MERGE_REQUEST_IID
|
|
683
785
|
policy: pull-push
|
|
684
786
|
paths:
|
|
685
787
|
- api/.yarn
|
|
686
|
-
|
|
788
|
+
fallback_keys:
|
|
789
|
+
- api-yarn
|
|
790
|
+
- key: api-node-modules-mr$CI_MERGE_REQUEST_IID
|
|
687
791
|
policy: pull-push
|
|
688
792
|
paths:
|
|
689
793
|
- api/node_modules
|
|
794
|
+
fallback_keys:
|
|
795
|
+
- api-node-modules
|
|
690
796
|
artifacts:
|
|
691
797
|
paths:
|
|
692
798
|
- api/__build_info.json
|
|
693
799
|
- api/.next
|
|
694
800
|
- api/dist
|
|
801
|
+
exclude:
|
|
802
|
+
- api/.next/cache/**/*
|
|
695
803
|
expire_in: 1 day
|
|
696
804
|
when: always
|
|
697
805
|
reports: {}
|
|
@@ -750,10 +858,12 @@ api ๐งช test:
|
|
|
750
858
|
- docker push $DOCKER_CACHE_IMAGE
|
|
751
859
|
- collapseable_section_end "docker-push"
|
|
752
860
|
cache:
|
|
753
|
-
- key: api-yarn
|
|
861
|
+
- key: api-yarn-mr$CI_MERGE_REQUEST_IID
|
|
754
862
|
policy: pull
|
|
755
863
|
paths:
|
|
756
864
|
- api/.yarn
|
|
865
|
+
fallback_keys:
|
|
866
|
+
- api-yarn
|
|
757
867
|
rules:
|
|
758
868
|
- when: never
|
|
759
869
|
if: $CI_PIPELINE_SOURCE == "trigger"
|
|
@@ -941,17 +1051,17 @@ api ๐งช test:
|
|
|
941
1051
|
- when: on_success
|
|
942
1052
|
if: $CI_MERGE_REQUEST_ID
|
|
943
1053
|
needs:
|
|
944
|
-
- job: api ๐ฎ lint
|
|
1054
|
+
- job: 'api ๐ฎ lint | review '
|
|
945
1055
|
artifacts: false
|
|
946
1056
|
- job: 'api ๐จ app | review '
|
|
947
1057
|
artifacts: false
|
|
948
1058
|
- job: 'api ๐จ docker | review '
|
|
949
1059
|
artifacts: false
|
|
950
|
-
- job: api ๐งช test
|
|
1060
|
+
- job: 'api ๐งช test | review '
|
|
951
1061
|
artifacts: false
|
|
952
1062
|
- job: 'api ๐งพ sbom | review '
|
|
953
1063
|
artifacts: true
|
|
954
|
-
- job: api ๐ก audit
|
|
1064
|
+
- job: 'api ๐ก audit | review '
|
|
955
1065
|
artifacts: false
|
|
956
1066
|
retry: *a1
|
|
957
1067
|
interruptible: true
|
|
@@ -1114,6 +1224,8 @@ api ๐งช test:
|
|
|
1114
1224
|
- api/__build_info.json
|
|
1115
1225
|
- api/.next
|
|
1116
1226
|
- api/dist
|
|
1227
|
+
exclude:
|
|
1228
|
+
- api/.next/cache/**/*
|
|
1117
1229
|
expire_in: 1 day
|
|
1118
1230
|
when: always
|
|
1119
1231
|
reports: {}
|
|
@@ -1528,6 +1640,8 @@ api ๐งช test:
|
|
|
1528
1640
|
- api/__build_info.json
|
|
1529
1641
|
- api/.next
|
|
1530
1642
|
- api/dist
|
|
1643
|
+
exclude:
|
|
1644
|
+
- api/.next/cache/**/*
|
|
1531
1645
|
expire_in: 1 day
|
|
1532
1646
|
when: always
|
|
1533
1647
|
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
|
|
@@ -270,6 +261,8 @@ api ๐งช test:
|
|
|
270
261
|
- api/__build_info.json
|
|
271
262
|
- api/.next
|
|
272
263
|
- api/dist
|
|
264
|
+
exclude:
|
|
265
|
+
- api/.next/cache/**/*
|
|
273
266
|
expire_in: 1 day
|
|
274
267
|
when: always
|
|
275
268
|
reports: {}
|
|
@@ -458,17 +451,17 @@ api ๐งช test:
|
|
|
458
451
|
- when: on_success
|
|
459
452
|
if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && $CI_COMMIT_MESSAGE !~ /^chore\\(release\\).*/
|
|
460
453
|
needs:
|
|
461
|
-
- job: api ๐ฎ lint
|
|
454
|
+
- job: 'api ๐ฎ lint | dev '
|
|
462
455
|
artifacts: false
|
|
463
456
|
- job: 'api ๐จ app | dev '
|
|
464
457
|
artifacts: false
|
|
465
458
|
- job: 'api ๐จ docker | dev '
|
|
466
459
|
artifacts: false
|
|
467
|
-
- job: api ๐งช test
|
|
460
|
+
- job: 'api ๐งช test | dev '
|
|
468
461
|
artifacts: false
|
|
469
462
|
- job: 'api ๐งพ sbom | dev '
|
|
470
463
|
artifacts: true
|
|
471
|
-
- job: api ๐ก audit
|
|
464
|
+
- job: 'api ๐ก audit | dev '
|
|
472
465
|
artifacts: false
|
|
473
466
|
retry: *a1
|
|
474
467
|
interruptible: true
|
|
@@ -507,6 +500,115 @@ api ๐งช test:
|
|
|
507
500
|
retry: *a1
|
|
508
501
|
interruptible: true
|
|
509
502
|
allow_failure: true
|
|
503
|
+
'api ๐ก audit | review ':
|
|
504
|
+
stage: test
|
|
505
|
+
image: path/to/docker/jobs-default:the-version
|
|
506
|
+
variables:
|
|
507
|
+
KUBERNETES_CPU_REQUEST: '0.45'
|
|
508
|
+
KUBERNETES_MEMORY_REQUEST: 1Gi
|
|
509
|
+
KUBERNETES_MEMORY_LIMIT: 4Gi
|
|
510
|
+
script:
|
|
511
|
+
- collapseable_section_start "injectvars" "Injecting variables"
|
|
512
|
+
- export APP_PATH="api"
|
|
513
|
+
- collapseable_section_end "injectvars"
|
|
514
|
+
- cd api
|
|
515
|
+
- yarn npm audit --environment production
|
|
516
|
+
rules:
|
|
517
|
+
- when: never
|
|
518
|
+
if: $CI_PIPELINE_SOURCE == "trigger"
|
|
519
|
+
- if: $CI_MERGE_REQUEST_ID
|
|
520
|
+
needs: []
|
|
521
|
+
retry: *a1
|
|
522
|
+
interruptible: true
|
|
523
|
+
allow_failure: true
|
|
524
|
+
'api ๐ฎ lint | review ':
|
|
525
|
+
stage: test
|
|
526
|
+
image: path/to/docker/jobs-default:the-version
|
|
527
|
+
variables:
|
|
528
|
+
KUBERNETES_CPU_REQUEST: '0.45'
|
|
529
|
+
KUBERNETES_MEMORY_REQUEST: 1Gi
|
|
530
|
+
KUBERNETES_MEMORY_LIMIT: 4Gi
|
|
531
|
+
script:
|
|
532
|
+
- collapseable_section_start "injectvars" "Injecting variables"
|
|
533
|
+
- export APP_PATH="api"
|
|
534
|
+
- collapseable_section_end "injectvars"
|
|
535
|
+
- collapseable_section_start "nodeinstall" "Ensure node version"
|
|
536
|
+
- if [ -f ~/.nvm/nvm.sh ]; then source ~/.nvm/nvm.sh; fi
|
|
537
|
+
- if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi
|
|
538
|
+
- collapseable_section_end "nodeinstall"
|
|
539
|
+
- cd api
|
|
540
|
+
- collapseable_section_start "nodeinstall" "Ensure node version"
|
|
541
|
+
- if [ -f ~/.nvm/nvm.sh ]; then source ~/.nvm/nvm.sh; fi
|
|
542
|
+
- if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi
|
|
543
|
+
- collapseable_section_end "nodeinstall"
|
|
544
|
+
- collapseable_section_start "yarninstall" "Yarn install"
|
|
545
|
+
- yarn install --immutable
|
|
546
|
+
- collapseable_section_end "yarninstall"
|
|
547
|
+
- yarn lint
|
|
548
|
+
cache:
|
|
549
|
+
- key: api-yarn-mr$CI_MERGE_REQUEST_IID
|
|
550
|
+
policy: pull-push
|
|
551
|
+
paths:
|
|
552
|
+
- api/.yarn
|
|
553
|
+
fallback_keys:
|
|
554
|
+
- api-yarn
|
|
555
|
+
- key: api-node-modules-mr$CI_MERGE_REQUEST_IID
|
|
556
|
+
policy: pull-push
|
|
557
|
+
paths:
|
|
558
|
+
- api/node_modules
|
|
559
|
+
fallback_keys:
|
|
560
|
+
- api-node-modules
|
|
561
|
+
rules:
|
|
562
|
+
- when: never
|
|
563
|
+
if: $CI_PIPELINE_SOURCE == "trigger"
|
|
564
|
+
- if: $CI_MERGE_REQUEST_ID
|
|
565
|
+
needs: []
|
|
566
|
+
retry: *a1
|
|
567
|
+
interruptible: true
|
|
568
|
+
'api ๐งช test | review ':
|
|
569
|
+
stage: test
|
|
570
|
+
image: path/to/docker/jobs-testing-chrome:the-version
|
|
571
|
+
variables:
|
|
572
|
+
KUBERNETES_CPU_REQUEST: '0.45'
|
|
573
|
+
KUBERNETES_MEMORY_REQUEST: 1Gi
|
|
574
|
+
KUBERNETES_MEMORY_LIMIT: 4Gi
|
|
575
|
+
script:
|
|
576
|
+
- collapseable_section_start "injectvars" "Injecting variables"
|
|
577
|
+
- export APP_PATH="api"
|
|
578
|
+
- collapseable_section_end "injectvars"
|
|
579
|
+
- collapseable_section_start "nodeinstall" "Ensure node version"
|
|
580
|
+
- if [ -f ~/.nvm/nvm.sh ]; then source ~/.nvm/nvm.sh; fi
|
|
581
|
+
- if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi
|
|
582
|
+
- collapseable_section_end "nodeinstall"
|
|
583
|
+
- cd api
|
|
584
|
+
- collapseable_section_start "nodeinstall" "Ensure node version"
|
|
585
|
+
- if [ -f ~/.nvm/nvm.sh ]; then source ~/.nvm/nvm.sh; fi
|
|
586
|
+
- if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi
|
|
587
|
+
- collapseable_section_end "nodeinstall"
|
|
588
|
+
- collapseable_section_start "yarninstall" "Yarn install"
|
|
589
|
+
- yarn install --immutable
|
|
590
|
+
- collapseable_section_end "yarninstall"
|
|
591
|
+
- yarn test
|
|
592
|
+
cache:
|
|
593
|
+
- key: api-yarn-mr$CI_MERGE_REQUEST_IID
|
|
594
|
+
policy: pull-push
|
|
595
|
+
paths:
|
|
596
|
+
- api/.yarn
|
|
597
|
+
fallback_keys:
|
|
598
|
+
- api-yarn
|
|
599
|
+
- key: api-node-modules-mr$CI_MERGE_REQUEST_IID
|
|
600
|
+
policy: pull-push
|
|
601
|
+
paths:
|
|
602
|
+
- api/node_modules
|
|
603
|
+
fallback_keys:
|
|
604
|
+
- api-node-modules
|
|
605
|
+
rules:
|
|
606
|
+
- when: never
|
|
607
|
+
if: $CI_PIPELINE_SOURCE == "trigger"
|
|
608
|
+
- if: $CI_MERGE_REQUEST_ID
|
|
609
|
+
needs: []
|
|
610
|
+
retry: *a1
|
|
611
|
+
interruptible: true
|
|
510
612
|
'api ๐จ app | review ':
|
|
511
613
|
stage: build
|
|
512
614
|
image: path/to/docker/jobs-default:the-version
|
|
@@ -547,19 +649,25 @@ api ๐งช test:
|
|
|
547
649
|
- collapseable_section_end "yarninstall"
|
|
548
650
|
- yarn build
|
|
549
651
|
cache:
|
|
550
|
-
- key: api-yarn
|
|
652
|
+
- key: api-yarn-mr$CI_MERGE_REQUEST_IID
|
|
551
653
|
policy: pull-push
|
|
552
654
|
paths:
|
|
553
655
|
- api/.yarn
|
|
554
|
-
|
|
656
|
+
fallback_keys:
|
|
657
|
+
- api-yarn
|
|
658
|
+
- key: api-node-modules-mr$CI_MERGE_REQUEST_IID
|
|
555
659
|
policy: pull-push
|
|
556
660
|
paths:
|
|
557
661
|
- api/node_modules
|
|
662
|
+
fallback_keys:
|
|
663
|
+
- api-node-modules
|
|
558
664
|
artifacts:
|
|
559
665
|
paths:
|
|
560
666
|
- api/__build_info.json
|
|
561
667
|
- api/.next
|
|
562
668
|
- api/dist
|
|
669
|
+
exclude:
|
|
670
|
+
- api/.next/cache/**/*
|
|
563
671
|
expire_in: 1 day
|
|
564
672
|
when: always
|
|
565
673
|
reports: {}
|
|
@@ -618,10 +726,12 @@ api ๐งช test:
|
|
|
618
726
|
- docker push $DOCKER_CACHE_IMAGE
|
|
619
727
|
- collapseable_section_end "docker-push"
|
|
620
728
|
cache:
|
|
621
|
-
- key: api-yarn
|
|
729
|
+
- key: api-yarn-mr$CI_MERGE_REQUEST_IID
|
|
622
730
|
policy: pull
|
|
623
731
|
paths:
|
|
624
732
|
- api/.yarn
|
|
733
|
+
fallback_keys:
|
|
734
|
+
- api-yarn
|
|
625
735
|
rules:
|
|
626
736
|
- when: never
|
|
627
737
|
if: $CI_PIPELINE_SOURCE == "trigger"
|
|
@@ -751,17 +861,17 @@ api ๐งช test:
|
|
|
751
861
|
- when: on_success
|
|
752
862
|
if: $CI_MERGE_REQUEST_ID
|
|
753
863
|
needs:
|
|
754
|
-
- job: api ๐ฎ lint
|
|
864
|
+
- job: 'api ๐ฎ lint | review '
|
|
755
865
|
artifacts: false
|
|
756
866
|
- job: 'api ๐จ app | review '
|
|
757
867
|
artifacts: false
|
|
758
868
|
- job: 'api ๐จ docker | review '
|
|
759
869
|
artifacts: false
|
|
760
|
-
- job: api ๐งช test
|
|
870
|
+
- job: 'api ๐งช test | review '
|
|
761
871
|
artifacts: false
|
|
762
872
|
- job: 'api ๐งพ sbom | review '
|
|
763
873
|
artifacts: true
|
|
764
|
-
- job: api ๐ก audit
|
|
874
|
+
- job: 'api ๐ก audit | review '
|
|
765
875
|
artifacts: false
|
|
766
876
|
retry: *a1
|
|
767
877
|
interruptible: true
|
|
@@ -856,6 +966,8 @@ api ๐งช test:
|
|
|
856
966
|
- api/__build_info.json
|
|
857
967
|
- api/.next
|
|
858
968
|
- api/dist
|
|
969
|
+
exclude:
|
|
970
|
+
- api/.next/cache/**/*
|
|
859
971
|
expire_in: 1 day
|
|
860
972
|
when: always
|
|
861
973
|
reports: {}
|
|
@@ -1139,6 +1251,8 @@ api ๐งช test:
|
|
|
1139
1251
|
- api/__build_info.json
|
|
1140
1252
|
- api/.next
|
|
1141
1253
|
- api/dist
|
|
1254
|
+
exclude:
|
|
1255
|
+
- api/.next/cache/**/*
|
|
1142
1256
|
expire_in: 1 day
|
|
1143
1257
|
when: always
|
|
1144
1258
|
reports: {}
|