@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
|
|
@@ -494,17 +485,17 @@ api ๐งช test:
|
|
|
494
485
|
- when: on_success
|
|
495
486
|
if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && $CI_COMMIT_MESSAGE !~ /^chore\\(release\\).*/
|
|
496
487
|
needs:
|
|
497
|
-
- job: api ๐ฎ lint
|
|
488
|
+
- job: 'api ๐ฎ lint | dev '
|
|
498
489
|
artifacts: false
|
|
499
490
|
- job: 'api ๐จ app | dev '
|
|
500
491
|
artifacts: false
|
|
501
492
|
- job: 'api ๐จ docker | dev '
|
|
502
493
|
artifacts: false
|
|
503
|
-
- job: api ๐งช test
|
|
494
|
+
- job: 'api ๐งช test | dev '
|
|
504
495
|
artifacts: false
|
|
505
496
|
- job: 'api ๐งพ sbom | dev '
|
|
506
497
|
artifacts: true
|
|
507
|
-
- job: api ๐ก audit
|
|
498
|
+
- job: 'api ๐ก audit | dev '
|
|
508
499
|
artifacts: false
|
|
509
500
|
retry: *a1
|
|
510
501
|
interruptible: true
|
|
@@ -609,6 +600,115 @@ api ๐งช test:
|
|
|
609
600
|
retry: *a1
|
|
610
601
|
interruptible: true
|
|
611
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
|
|
612
712
|
'api ๐จ app | review ':
|
|
613
713
|
stage: build
|
|
614
714
|
image: path/to/docker/jobs-default:the-version
|
|
@@ -648,14 +748,18 @@ api ๐งช test:
|
|
|
648
748
|
- collapseable_section_end "yarninstall"
|
|
649
749
|
- yarn build
|
|
650
750
|
cache:
|
|
651
|
-
- key: api-yarn
|
|
751
|
+
- key: api-yarn-mr$CI_MERGE_REQUEST_IID
|
|
652
752
|
policy: pull-push
|
|
653
753
|
paths:
|
|
654
754
|
- api/.yarn
|
|
655
|
-
|
|
755
|
+
fallback_keys:
|
|
756
|
+
- api-yarn
|
|
757
|
+
- key: api-node-modules-mr$CI_MERGE_REQUEST_IID
|
|
656
758
|
policy: pull-push
|
|
657
759
|
paths:
|
|
658
760
|
- api/node_modules
|
|
761
|
+
fallback_keys:
|
|
762
|
+
- api-node-modules
|
|
659
763
|
artifacts:
|
|
660
764
|
paths:
|
|
661
765
|
- api/__build_info.json
|
|
@@ -721,10 +825,12 @@ api ๐งช test:
|
|
|
721
825
|
- docker push $DOCKER_CACHE_IMAGE
|
|
722
826
|
- collapseable_section_end "docker-push"
|
|
723
827
|
cache:
|
|
724
|
-
- key: api-yarn
|
|
828
|
+
- key: api-yarn-mr$CI_MERGE_REQUEST_IID
|
|
725
829
|
policy: pull
|
|
726
830
|
paths:
|
|
727
831
|
- api/.yarn
|
|
832
|
+
fallback_keys:
|
|
833
|
+
- api-yarn
|
|
728
834
|
rules:
|
|
729
835
|
- when: never
|
|
730
836
|
if: $CI_PIPELINE_SOURCE == "trigger"
|
|
@@ -887,17 +993,17 @@ api ๐งช test:
|
|
|
887
993
|
- when: on_success
|
|
888
994
|
if: $CI_MERGE_REQUEST_ID
|
|
889
995
|
needs:
|
|
890
|
-
- job: api ๐ฎ lint
|
|
996
|
+
- job: 'api ๐ฎ lint | review '
|
|
891
997
|
artifacts: false
|
|
892
998
|
- job: 'api ๐จ app | review '
|
|
893
999
|
artifacts: false
|
|
894
1000
|
- job: 'api ๐จ docker | review '
|
|
895
1001
|
artifacts: false
|
|
896
|
-
- job: api ๐งช test
|
|
1002
|
+
- job: 'api ๐งช test | review '
|
|
897
1003
|
artifacts: false
|
|
898
1004
|
- job: 'api ๐งพ sbom | review '
|
|
899
1005
|
artifacts: true
|
|
900
|
-
- job: api ๐ก audit
|
|
1006
|
+
- job: 'api ๐ก audit | review '
|
|
901
1007
|
artifacts: false
|
|
902
1008
|
retry: *a1
|
|
903
1009
|
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
|
|
@@ -495,17 +486,17 @@ api ๐งช test:
|
|
|
495
486
|
- when: on_success
|
|
496
487
|
if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && $CI_COMMIT_MESSAGE !~ /^chore\\(release\\).*/
|
|
497
488
|
needs:
|
|
498
|
-
- job: api ๐ฎ lint
|
|
489
|
+
- job: 'api ๐ฎ lint | dev '
|
|
499
490
|
artifacts: false
|
|
500
491
|
- job: 'api ๐จ app | dev '
|
|
501
492
|
artifacts: false
|
|
502
493
|
- job: 'api ๐จ docker | dev '
|
|
503
494
|
artifacts: false
|
|
504
|
-
- job: api ๐งช test
|
|
495
|
+
- job: 'api ๐งช test | dev '
|
|
505
496
|
artifacts: false
|
|
506
497
|
- job: 'api ๐งพ sbom | dev '
|
|
507
498
|
artifacts: true
|
|
508
|
-
- job: api ๐ก audit
|
|
499
|
+
- job: 'api ๐ก audit | dev '
|
|
509
500
|
artifacts: false
|
|
510
501
|
retry: *a1
|
|
511
502
|
interruptible: true
|
|
@@ -614,6 +605,115 @@ api ๐งช test:
|
|
|
614
605
|
retry: *a1
|
|
615
606
|
interruptible: true
|
|
616
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
|
|
617
717
|
'api ๐จ app | review ':
|
|
618
718
|
stage: build
|
|
619
719
|
image: path/to/docker/jobs-default:the-version
|
|
@@ -655,14 +755,18 @@ api ๐งช test:
|
|
|
655
755
|
- collapseable_section_end "yarninstall"
|
|
656
756
|
- yarn build
|
|
657
757
|
cache:
|
|
658
|
-
- key: api-yarn
|
|
758
|
+
- key: api-yarn-mr$CI_MERGE_REQUEST_IID
|
|
659
759
|
policy: pull-push
|
|
660
760
|
paths:
|
|
661
761
|
- api/.yarn
|
|
662
|
-
|
|
762
|
+
fallback_keys:
|
|
763
|
+
- api-yarn
|
|
764
|
+
- key: api-node-modules-mr$CI_MERGE_REQUEST_IID
|
|
663
765
|
policy: pull-push
|
|
664
766
|
paths:
|
|
665
767
|
- api/node_modules
|
|
768
|
+
fallback_keys:
|
|
769
|
+
- api-node-modules
|
|
666
770
|
artifacts:
|
|
667
771
|
paths:
|
|
668
772
|
- api/__build_info.json
|
|
@@ -728,10 +832,12 @@ api ๐งช test:
|
|
|
728
832
|
- docker push $DOCKER_CACHE_IMAGE
|
|
729
833
|
- collapseable_section_end "docker-push"
|
|
730
834
|
cache:
|
|
731
|
-
- key: api-yarn
|
|
835
|
+
- key: api-yarn-mr$CI_MERGE_REQUEST_IID
|
|
732
836
|
policy: pull
|
|
733
837
|
paths:
|
|
734
838
|
- api/.yarn
|
|
839
|
+
fallback_keys:
|
|
840
|
+
- api-yarn
|
|
735
841
|
rules:
|
|
736
842
|
- when: never
|
|
737
843
|
if: $CI_PIPELINE_SOURCE == "trigger"
|
|
@@ -893,17 +999,17 @@ api ๐งช test:
|
|
|
893
999
|
- when: on_success
|
|
894
1000
|
if: $CI_MERGE_REQUEST_ID
|
|
895
1001
|
needs:
|
|
896
|
-
- job: api ๐ฎ lint
|
|
1002
|
+
- job: 'api ๐ฎ lint | review '
|
|
897
1003
|
artifacts: false
|
|
898
1004
|
- job: 'api ๐จ app | review '
|
|
899
1005
|
artifacts: false
|
|
900
1006
|
- job: 'api ๐จ docker | review '
|
|
901
1007
|
artifacts: false
|
|
902
|
-
- job: api ๐งช test
|
|
1008
|
+
- job: 'api ๐งช test | review '
|
|
903
1009
|
artifacts: false
|
|
904
1010
|
- job: 'api ๐งพ sbom | review '
|
|
905
1011
|
artifacts: true
|
|
906
|
-
- job: api ๐ก audit
|
|
1012
|
+
- job: 'api ๐ก audit | review '
|
|
907
1013
|
artifacts: false
|
|
908
1014
|
retry: *a1
|
|
909
1015
|
interruptible: true
|