@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
|
|
@@ -307,6 +298,7 @@ api ๐งช test:
|
|
|
307
298
|
- api/dist
|
|
308
299
|
exclude:
|
|
309
300
|
- api/.env
|
|
301
|
+
- api/.next/cache/**/*
|
|
310
302
|
expire_in: 1 day
|
|
311
303
|
when: always
|
|
312
304
|
reports: {}
|
|
@@ -578,17 +570,17 @@ api ๐งช test:
|
|
|
578
570
|
- when: on_success
|
|
579
571
|
if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && $CI_COMMIT_MESSAGE !~ /^chore\\(release\\).*/
|
|
580
572
|
needs:
|
|
581
|
-
- job: api ๐ฎ lint
|
|
573
|
+
- job: 'api ๐ฎ lint | dev '
|
|
582
574
|
artifacts: false
|
|
583
575
|
- job: 'api ๐จ app | dev '
|
|
584
576
|
artifacts: false
|
|
585
577
|
- job: 'api ๐จ docker | dev '
|
|
586
578
|
artifacts: false
|
|
587
|
-
- job: api ๐งช test
|
|
579
|
+
- job: 'api ๐งช test | dev '
|
|
588
580
|
artifacts: false
|
|
589
581
|
- job: 'api ๐งพ sbom | dev '
|
|
590
582
|
artifacts: true
|
|
591
|
-
- job: api ๐ก audit
|
|
583
|
+
- job: 'api ๐ก audit | dev '
|
|
592
584
|
artifacts: false
|
|
593
585
|
retry: *a1
|
|
594
586
|
interruptible: true
|
|
@@ -636,6 +628,115 @@ api ๐งช test:
|
|
|
636
628
|
retry: *a1
|
|
637
629
|
interruptible: true
|
|
638
630
|
allow_failure: true
|
|
631
|
+
'api ๐ก audit | review ':
|
|
632
|
+
stage: test
|
|
633
|
+
image: path/to/docker/jobs-default:the-version
|
|
634
|
+
variables:
|
|
635
|
+
KUBERNETES_CPU_REQUEST: '0.45'
|
|
636
|
+
KUBERNETES_MEMORY_REQUEST: 1Gi
|
|
637
|
+
KUBERNETES_MEMORY_LIMIT: 4Gi
|
|
638
|
+
script:
|
|
639
|
+
- collapseable_section_start "injectvars" "Injecting variables"
|
|
640
|
+
- export APP_PATH="api"
|
|
641
|
+
- collapseable_section_end "injectvars"
|
|
642
|
+
- cd api
|
|
643
|
+
- yarn npm audit --environment production
|
|
644
|
+
rules:
|
|
645
|
+
- when: never
|
|
646
|
+
if: $CI_PIPELINE_SOURCE == "trigger"
|
|
647
|
+
- if: $CI_MERGE_REQUEST_ID
|
|
648
|
+
needs: []
|
|
649
|
+
retry: *a1
|
|
650
|
+
interruptible: true
|
|
651
|
+
allow_failure: true
|
|
652
|
+
'api ๐ฎ lint | review ':
|
|
653
|
+
stage: test
|
|
654
|
+
image: path/to/docker/jobs-default:the-version
|
|
655
|
+
variables:
|
|
656
|
+
KUBERNETES_CPU_REQUEST: '0.45'
|
|
657
|
+
KUBERNETES_MEMORY_REQUEST: 1Gi
|
|
658
|
+
KUBERNETES_MEMORY_LIMIT: 4Gi
|
|
659
|
+
script:
|
|
660
|
+
- collapseable_section_start "injectvars" "Injecting variables"
|
|
661
|
+
- export APP_PATH="api"
|
|
662
|
+
- collapseable_section_end "injectvars"
|
|
663
|
+
- collapseable_section_start "nodeinstall" "Ensure node version"
|
|
664
|
+
- if [ -f ~/.nvm/nvm.sh ]; then source ~/.nvm/nvm.sh; fi
|
|
665
|
+
- if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi
|
|
666
|
+
- collapseable_section_end "nodeinstall"
|
|
667
|
+
- cd api
|
|
668
|
+
- collapseable_section_start "nodeinstall" "Ensure node version"
|
|
669
|
+
- if [ -f ~/.nvm/nvm.sh ]; then source ~/.nvm/nvm.sh; fi
|
|
670
|
+
- if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi
|
|
671
|
+
- collapseable_section_end "nodeinstall"
|
|
672
|
+
- collapseable_section_start "yarninstall" "Yarn install"
|
|
673
|
+
- yarn install --immutable
|
|
674
|
+
- collapseable_section_end "yarninstall"
|
|
675
|
+
- yarn lint
|
|
676
|
+
cache:
|
|
677
|
+
- key: api-yarn-mr$CI_MERGE_REQUEST_IID
|
|
678
|
+
policy: pull-push
|
|
679
|
+
paths:
|
|
680
|
+
- api/.yarn
|
|
681
|
+
fallback_keys:
|
|
682
|
+
- api-yarn
|
|
683
|
+
- key: api-node-modules-mr$CI_MERGE_REQUEST_IID
|
|
684
|
+
policy: pull-push
|
|
685
|
+
paths:
|
|
686
|
+
- api/node_modules
|
|
687
|
+
fallback_keys:
|
|
688
|
+
- api-node-modules
|
|
689
|
+
rules:
|
|
690
|
+
- when: never
|
|
691
|
+
if: $CI_PIPELINE_SOURCE == "trigger"
|
|
692
|
+
- if: $CI_MERGE_REQUEST_ID
|
|
693
|
+
needs: []
|
|
694
|
+
retry: *a1
|
|
695
|
+
interruptible: true
|
|
696
|
+
'api ๐งช test | review ':
|
|
697
|
+
stage: test
|
|
698
|
+
image: path/to/docker/jobs-testing-chrome:the-version
|
|
699
|
+
variables:
|
|
700
|
+
KUBERNETES_CPU_REQUEST: '0.45'
|
|
701
|
+
KUBERNETES_MEMORY_REQUEST: 1Gi
|
|
702
|
+
KUBERNETES_MEMORY_LIMIT: 4Gi
|
|
703
|
+
script:
|
|
704
|
+
- collapseable_section_start "injectvars" "Injecting variables"
|
|
705
|
+
- export APP_PATH="api"
|
|
706
|
+
- collapseable_section_end "injectvars"
|
|
707
|
+
- collapseable_section_start "nodeinstall" "Ensure node version"
|
|
708
|
+
- if [ -f ~/.nvm/nvm.sh ]; then source ~/.nvm/nvm.sh; fi
|
|
709
|
+
- if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi
|
|
710
|
+
- collapseable_section_end "nodeinstall"
|
|
711
|
+
- cd api
|
|
712
|
+
- collapseable_section_start "nodeinstall" "Ensure node version"
|
|
713
|
+
- if [ -f ~/.nvm/nvm.sh ]; then source ~/.nvm/nvm.sh; fi
|
|
714
|
+
- if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi
|
|
715
|
+
- collapseable_section_end "nodeinstall"
|
|
716
|
+
- collapseable_section_start "yarninstall" "Yarn install"
|
|
717
|
+
- yarn install --immutable
|
|
718
|
+
- collapseable_section_end "yarninstall"
|
|
719
|
+
- yarn test
|
|
720
|
+
cache:
|
|
721
|
+
- key: api-yarn-mr$CI_MERGE_REQUEST_IID
|
|
722
|
+
policy: pull-push
|
|
723
|
+
paths:
|
|
724
|
+
- api/.yarn
|
|
725
|
+
fallback_keys:
|
|
726
|
+
- api-yarn
|
|
727
|
+
- key: api-node-modules-mr$CI_MERGE_REQUEST_IID
|
|
728
|
+
policy: pull-push
|
|
729
|
+
paths:
|
|
730
|
+
- api/node_modules
|
|
731
|
+
fallback_keys:
|
|
732
|
+
- api-node-modules
|
|
733
|
+
rules:
|
|
734
|
+
- when: never
|
|
735
|
+
if: $CI_PIPELINE_SOURCE == "trigger"
|
|
736
|
+
- if: $CI_MERGE_REQUEST_ID
|
|
737
|
+
needs: []
|
|
738
|
+
retry: *a1
|
|
739
|
+
interruptible: true
|
|
639
740
|
'api ๐จ app | review ':
|
|
640
741
|
stage: build
|
|
641
742
|
image: path/to/docker/jobs-default:the-version
|
|
@@ -711,14 +812,18 @@ api ๐งช test:
|
|
|
711
812
|
- collapseable_section_end "yarninstall"
|
|
712
813
|
- yarn build
|
|
713
814
|
cache:
|
|
714
|
-
- key: api-yarn
|
|
815
|
+
- key: api-yarn-mr$CI_MERGE_REQUEST_IID
|
|
715
816
|
policy: pull-push
|
|
716
817
|
paths:
|
|
717
818
|
- api/.yarn
|
|
718
|
-
|
|
819
|
+
fallback_keys:
|
|
820
|
+
- api-yarn
|
|
821
|
+
- key: api-node-modules-mr$CI_MERGE_REQUEST_IID
|
|
719
822
|
policy: pull-push
|
|
720
823
|
paths:
|
|
721
824
|
- api/node_modules
|
|
825
|
+
fallback_keys:
|
|
826
|
+
- api-node-modules
|
|
722
827
|
artifacts:
|
|
723
828
|
paths:
|
|
724
829
|
- api/__build_info.json
|
|
@@ -726,6 +831,7 @@ api ๐งช test:
|
|
|
726
831
|
- api/dist
|
|
727
832
|
exclude:
|
|
728
833
|
- api/.env
|
|
834
|
+
- api/.next/cache/**/*
|
|
729
835
|
expire_in: 1 day
|
|
730
836
|
when: always
|
|
731
837
|
reports: {}
|
|
@@ -784,10 +890,12 @@ api ๐งช test:
|
|
|
784
890
|
- docker push $DOCKER_CACHE_IMAGE
|
|
785
891
|
- collapseable_section_end "docker-push"
|
|
786
892
|
cache:
|
|
787
|
-
- key: api-yarn
|
|
893
|
+
- key: api-yarn-mr$CI_MERGE_REQUEST_IID
|
|
788
894
|
policy: pull
|
|
789
895
|
paths:
|
|
790
896
|
- api/.yarn
|
|
897
|
+
fallback_keys:
|
|
898
|
+
- api-yarn
|
|
791
899
|
rules:
|
|
792
900
|
- when: never
|
|
793
901
|
if: $CI_PIPELINE_SOURCE == "trigger"
|
|
@@ -993,17 +1101,17 @@ api ๐งช test:
|
|
|
993
1101
|
- when: on_success
|
|
994
1102
|
if: $CI_MERGE_REQUEST_ID
|
|
995
1103
|
needs:
|
|
996
|
-
- job: api ๐ฎ lint
|
|
1104
|
+
- job: 'api ๐ฎ lint | review '
|
|
997
1105
|
artifacts: false
|
|
998
1106
|
- job: 'api ๐จ app | review '
|
|
999
1107
|
artifacts: false
|
|
1000
1108
|
- job: 'api ๐จ docker | review '
|
|
1001
1109
|
artifacts: false
|
|
1002
|
-
- job: api ๐งช test
|
|
1110
|
+
- job: 'api ๐งช test | review '
|
|
1003
1111
|
artifacts: false
|
|
1004
1112
|
- job: 'api ๐งพ sbom | review '
|
|
1005
1113
|
artifacts: true
|
|
1006
|
-
- job: api ๐ก audit
|
|
1114
|
+
- job: 'api ๐ก audit | review '
|
|
1007
1115
|
artifacts: false
|
|
1008
1116
|
retry: *a1
|
|
1009
1117
|
interruptible: true
|
|
@@ -1146,6 +1254,7 @@ api ๐งช test:
|
|
|
1146
1254
|
- api/dist
|
|
1147
1255
|
exclude:
|
|
1148
1256
|
- api/.env
|
|
1257
|
+
- api/.next/cache/**/*
|
|
1149
1258
|
expire_in: 1 day
|
|
1150
1259
|
when: always
|
|
1151
1260
|
reports: {}
|
|
@@ -1556,6 +1665,7 @@ api ๐งช test:
|
|
|
1556
1665
|
- api/dist
|
|
1557
1666
|
exclude:
|
|
1558
1667
|
- api/.env
|
|
1668
|
+
- api/.next/cache/**/*
|
|
1559
1669
|
expire_in: 1 day
|
|
1560
1670
|
when: always
|
|
1561
1671
|
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
|
|
@@ -289,6 +280,7 @@ api ๐งช test:
|
|
|
289
280
|
- api/dist
|
|
290
281
|
exclude:
|
|
291
282
|
- api/.env
|
|
283
|
+
- api/.next/cache/**/*
|
|
292
284
|
expire_in: 1 day
|
|
293
285
|
when: always
|
|
294
286
|
reports: {}
|
|
@@ -478,17 +470,17 @@ api ๐งช test:
|
|
|
478
470
|
- when: on_success
|
|
479
471
|
if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && $CI_COMMIT_MESSAGE !~ /^chore\\(release\\).*/
|
|
480
472
|
needs:
|
|
481
|
-
- job: api ๐ฎ lint
|
|
473
|
+
- job: 'api ๐ฎ lint | dev '
|
|
482
474
|
artifacts: false
|
|
483
475
|
- job: 'api ๐จ app | dev '
|
|
484
476
|
artifacts: false
|
|
485
477
|
- job: 'api ๐จ docker | dev '
|
|
486
478
|
artifacts: false
|
|
487
|
-
- job: api ๐งช test
|
|
479
|
+
- job: 'api ๐งช test | dev '
|
|
488
480
|
artifacts: false
|
|
489
481
|
- job: 'api ๐งพ sbom | dev '
|
|
490
482
|
artifacts: true
|
|
491
|
-
- job: api ๐ก audit
|
|
483
|
+
- job: 'api ๐ก audit | dev '
|
|
492
484
|
artifacts: false
|
|
493
485
|
retry: *a1
|
|
494
486
|
interruptible: true
|
|
@@ -528,6 +520,115 @@ api ๐งช test:
|
|
|
528
520
|
retry: *a1
|
|
529
521
|
interruptible: true
|
|
530
522
|
allow_failure: true
|
|
523
|
+
'api ๐ก audit | review ':
|
|
524
|
+
stage: test
|
|
525
|
+
image: path/to/docker/jobs-default:the-version
|
|
526
|
+
variables:
|
|
527
|
+
KUBERNETES_CPU_REQUEST: '0.45'
|
|
528
|
+
KUBERNETES_MEMORY_REQUEST: 1Gi
|
|
529
|
+
KUBERNETES_MEMORY_LIMIT: 4Gi
|
|
530
|
+
script:
|
|
531
|
+
- collapseable_section_start "injectvars" "Injecting variables"
|
|
532
|
+
- export APP_PATH="api"
|
|
533
|
+
- collapseable_section_end "injectvars"
|
|
534
|
+
- cd api
|
|
535
|
+
- yarn npm audit --environment production
|
|
536
|
+
rules:
|
|
537
|
+
- when: never
|
|
538
|
+
if: $CI_PIPELINE_SOURCE == "trigger"
|
|
539
|
+
- if: $CI_MERGE_REQUEST_ID
|
|
540
|
+
needs: []
|
|
541
|
+
retry: *a1
|
|
542
|
+
interruptible: true
|
|
543
|
+
allow_failure: true
|
|
544
|
+
'api ๐ฎ lint | review ':
|
|
545
|
+
stage: test
|
|
546
|
+
image: path/to/docker/jobs-default:the-version
|
|
547
|
+
variables:
|
|
548
|
+
KUBERNETES_CPU_REQUEST: '0.45'
|
|
549
|
+
KUBERNETES_MEMORY_REQUEST: 1Gi
|
|
550
|
+
KUBERNETES_MEMORY_LIMIT: 4Gi
|
|
551
|
+
script:
|
|
552
|
+
- collapseable_section_start "injectvars" "Injecting variables"
|
|
553
|
+
- export APP_PATH="api"
|
|
554
|
+
- collapseable_section_end "injectvars"
|
|
555
|
+
- collapseable_section_start "nodeinstall" "Ensure node version"
|
|
556
|
+
- if [ -f ~/.nvm/nvm.sh ]; then source ~/.nvm/nvm.sh; fi
|
|
557
|
+
- if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi
|
|
558
|
+
- collapseable_section_end "nodeinstall"
|
|
559
|
+
- cd api
|
|
560
|
+
- collapseable_section_start "nodeinstall" "Ensure node version"
|
|
561
|
+
- if [ -f ~/.nvm/nvm.sh ]; then source ~/.nvm/nvm.sh; fi
|
|
562
|
+
- if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi
|
|
563
|
+
- collapseable_section_end "nodeinstall"
|
|
564
|
+
- collapseable_section_start "yarninstall" "Yarn install"
|
|
565
|
+
- yarn install --immutable
|
|
566
|
+
- collapseable_section_end "yarninstall"
|
|
567
|
+
- yarn lint
|
|
568
|
+
cache:
|
|
569
|
+
- key: api-yarn-mr$CI_MERGE_REQUEST_IID
|
|
570
|
+
policy: pull-push
|
|
571
|
+
paths:
|
|
572
|
+
- api/.yarn
|
|
573
|
+
fallback_keys:
|
|
574
|
+
- api-yarn
|
|
575
|
+
- key: api-node-modules-mr$CI_MERGE_REQUEST_IID
|
|
576
|
+
policy: pull-push
|
|
577
|
+
paths:
|
|
578
|
+
- api/node_modules
|
|
579
|
+
fallback_keys:
|
|
580
|
+
- api-node-modules
|
|
581
|
+
rules:
|
|
582
|
+
- when: never
|
|
583
|
+
if: $CI_PIPELINE_SOURCE == "trigger"
|
|
584
|
+
- if: $CI_MERGE_REQUEST_ID
|
|
585
|
+
needs: []
|
|
586
|
+
retry: *a1
|
|
587
|
+
interruptible: true
|
|
588
|
+
'api ๐งช test | review ':
|
|
589
|
+
stage: test
|
|
590
|
+
image: path/to/docker/jobs-testing-chrome:the-version
|
|
591
|
+
variables:
|
|
592
|
+
KUBERNETES_CPU_REQUEST: '0.45'
|
|
593
|
+
KUBERNETES_MEMORY_REQUEST: 1Gi
|
|
594
|
+
KUBERNETES_MEMORY_LIMIT: 4Gi
|
|
595
|
+
script:
|
|
596
|
+
- collapseable_section_start "injectvars" "Injecting variables"
|
|
597
|
+
- export APP_PATH="api"
|
|
598
|
+
- collapseable_section_end "injectvars"
|
|
599
|
+
- collapseable_section_start "nodeinstall" "Ensure node version"
|
|
600
|
+
- if [ -f ~/.nvm/nvm.sh ]; then source ~/.nvm/nvm.sh; fi
|
|
601
|
+
- if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi
|
|
602
|
+
- collapseable_section_end "nodeinstall"
|
|
603
|
+
- cd api
|
|
604
|
+
- collapseable_section_start "nodeinstall" "Ensure node version"
|
|
605
|
+
- if [ -f ~/.nvm/nvm.sh ]; then source ~/.nvm/nvm.sh; fi
|
|
606
|
+
- if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi
|
|
607
|
+
- collapseable_section_end "nodeinstall"
|
|
608
|
+
- collapseable_section_start "yarninstall" "Yarn install"
|
|
609
|
+
- yarn install --immutable
|
|
610
|
+
- collapseable_section_end "yarninstall"
|
|
611
|
+
- yarn test
|
|
612
|
+
cache:
|
|
613
|
+
- key: api-yarn-mr$CI_MERGE_REQUEST_IID
|
|
614
|
+
policy: pull-push
|
|
615
|
+
paths:
|
|
616
|
+
- api/.yarn
|
|
617
|
+
fallback_keys:
|
|
618
|
+
- api-yarn
|
|
619
|
+
- key: api-node-modules-mr$CI_MERGE_REQUEST_IID
|
|
620
|
+
policy: pull-push
|
|
621
|
+
paths:
|
|
622
|
+
- api/node_modules
|
|
623
|
+
fallback_keys:
|
|
624
|
+
- api-node-modules
|
|
625
|
+
rules:
|
|
626
|
+
- when: never
|
|
627
|
+
if: $CI_PIPELINE_SOURCE == "trigger"
|
|
628
|
+
- if: $CI_MERGE_REQUEST_ID
|
|
629
|
+
needs: []
|
|
630
|
+
retry: *a1
|
|
631
|
+
interruptible: true
|
|
531
632
|
'api ๐จ app | review ':
|
|
532
633
|
stage: build
|
|
533
634
|
image: path/to/docker/jobs-default:the-version
|
|
@@ -585,14 +686,18 @@ api ๐งช test:
|
|
|
585
686
|
- collapseable_section_end "yarninstall"
|
|
586
687
|
- yarn build
|
|
587
688
|
cache:
|
|
588
|
-
- key: api-yarn
|
|
689
|
+
- key: api-yarn-mr$CI_MERGE_REQUEST_IID
|
|
589
690
|
policy: pull-push
|
|
590
691
|
paths:
|
|
591
692
|
- api/.yarn
|
|
592
|
-
|
|
693
|
+
fallback_keys:
|
|
694
|
+
- api-yarn
|
|
695
|
+
- key: api-node-modules-mr$CI_MERGE_REQUEST_IID
|
|
593
696
|
policy: pull-push
|
|
594
697
|
paths:
|
|
595
698
|
- api/node_modules
|
|
699
|
+
fallback_keys:
|
|
700
|
+
- api-node-modules
|
|
596
701
|
artifacts:
|
|
597
702
|
paths:
|
|
598
703
|
- api/__build_info.json
|
|
@@ -600,6 +705,7 @@ api ๐งช test:
|
|
|
600
705
|
- api/dist
|
|
601
706
|
exclude:
|
|
602
707
|
- api/.env
|
|
708
|
+
- api/.next/cache/**/*
|
|
603
709
|
expire_in: 1 day
|
|
604
710
|
when: always
|
|
605
711
|
reports: {}
|
|
@@ -658,10 +764,12 @@ api ๐งช test:
|
|
|
658
764
|
- docker push $DOCKER_CACHE_IMAGE
|
|
659
765
|
- collapseable_section_end "docker-push"
|
|
660
766
|
cache:
|
|
661
|
-
- key: api-yarn
|
|
767
|
+
- key: api-yarn-mr$CI_MERGE_REQUEST_IID
|
|
662
768
|
policy: pull
|
|
663
769
|
paths:
|
|
664
770
|
- api/.yarn
|
|
771
|
+
fallback_keys:
|
|
772
|
+
- api-yarn
|
|
665
773
|
rules:
|
|
666
774
|
- when: never
|
|
667
775
|
if: $CI_PIPELINE_SOURCE == "trigger"
|
|
@@ -791,17 +899,17 @@ api ๐งช test:
|
|
|
791
899
|
- when: on_success
|
|
792
900
|
if: $CI_MERGE_REQUEST_ID
|
|
793
901
|
needs:
|
|
794
|
-
- job: api ๐ฎ lint
|
|
902
|
+
- job: 'api ๐ฎ lint | review '
|
|
795
903
|
artifacts: false
|
|
796
904
|
- job: 'api ๐จ app | review '
|
|
797
905
|
artifacts: false
|
|
798
906
|
- job: 'api ๐จ docker | review '
|
|
799
907
|
artifacts: false
|
|
800
|
-
- job: api ๐งช test
|
|
908
|
+
- job: 'api ๐งช test | review '
|
|
801
909
|
artifacts: false
|
|
802
910
|
- job: 'api ๐งพ sbom | review '
|
|
803
911
|
artifacts: true
|
|
804
|
-
- job: api ๐ก audit
|
|
912
|
+
- job: 'api ๐ก audit | review '
|
|
805
913
|
artifacts: false
|
|
806
914
|
retry: *a1
|
|
807
915
|
interruptible: true
|
|
@@ -915,6 +1023,7 @@ api ๐งช test:
|
|
|
915
1023
|
- api/dist
|
|
916
1024
|
exclude:
|
|
917
1025
|
- api/.env
|
|
1026
|
+
- api/.next/cache/**/*
|
|
918
1027
|
expire_in: 1 day
|
|
919
1028
|
when: always
|
|
920
1029
|
reports: {}
|
|
@@ -1219,6 +1328,7 @@ api ๐งช test:
|
|
|
1219
1328
|
- api/dist
|
|
1220
1329
|
exclude:
|
|
1221
1330
|
- api/.env
|
|
1331
|
+
- api/.next/cache/**/*
|
|
1222
1332
|
expire_in: 1 day
|
|
1223
1333
|
when: always
|
|
1224
1334
|
reports: {}
|