@catladder/pipeline 3.25.0 → 3.27.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/node/yarn.js +3 -2
- package/dist/build/rails/test.js +1 -2
- package/dist/constants.js +1 -1
- package/dist/deploy/types/googleCloudRun.d.ts +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 +141 -31
- package/examples/__snapshots__/cloud-run-health-check-defaults.test.ts.snap +141 -31
- package/examples/__snapshots__/cloud-run-health-check-only-startup.test.ts.snap +141 -31
- package/examples/__snapshots__/cloud-run-health-check.test.ts.snap +141 -31
- package/examples/__snapshots__/cloud-run-http2.test.ts.snap +141 -31
- package/examples/__snapshots__/cloud-run-memory-limit.test.ts.snap +141 -31
- package/examples/__snapshots__/cloud-run-meteor-with-worker.test.ts.snap +133 -27
- package/examples/__snapshots__/cloud-run-nextjs.test.ts.snap +144 -32
- package/examples/__snapshots__/cloud-run-no-cpu-throttling.test.ts.snap +141 -31
- package/examples/__snapshots__/cloud-run-no-service.test.ts.snap +141 -31
- package/examples/__snapshots__/cloud-run-non-public.test.ts.snap +141 -31
- package/examples/__snapshots__/cloud-run-post-stop-job.test.ts.snap +141 -31
- package/examples/__snapshots__/cloud-run-service-custom-vpc-connector.test.ts.snap +141 -31
- package/examples/__snapshots__/cloud-run-service-custom-vpc.test.ts.snap +141 -31
- package/examples/__snapshots__/cloud-run-service-gen2.test.ts.snap +141 -31
- package/examples/__snapshots__/cloud-run-service-increase-timout.test.ts.snap +141 -31
- package/examples/__snapshots__/cloud-run-service-with-volumes.test.ts.snap +141 -31
- package/examples/__snapshots__/cloud-run-storybook.test.ts.snap +21 -11
- package/examples/__snapshots__/cloud-run-with-agents.test.ts.snap +144 -32
- package/examples/__snapshots__/cloud-run-with-gpu.test.ts.snap +141 -31
- package/examples/__snapshots__/cloud-run-with-ngnix.test.ts.snap +141 -31
- package/examples/__snapshots__/cloud-run-with-sql-legacy-jobs.test.ts.snap +141 -31
- package/examples/__snapshots__/cloud-run-with-sql-multiple-dbs.test.ts.snap +423 -93
- package/examples/__snapshots__/cloud-run-with-sql-reuse-db.test.ts.snap +282 -62
- package/examples/__snapshots__/cloud-run-with-sql.test.ts.snap +141 -31
- package/examples/__snapshots__/cloud-run-with-worker.test.ts.snap +141 -31
- package/examples/__snapshots__/custom-build-job-with-tests.test.ts.snap +93 -22
- package/examples/__snapshots__/custom-deploy.test.ts.snap +141 -31
- package/examples/__snapshots__/custom-envs.test.ts.snap +328 -40
- package/examples/__snapshots__/custom-verify-job.test.ts.snap +144 -32
- package/examples/__snapshots__/git-submodule.test.ts.snap +141 -31
- package/examples/__snapshots__/kubernetes-application-customization.test.ts.snap +141 -31
- package/examples/__snapshots__/kubernetes-with-cloud-sql.test.ts.snap +141 -31
- package/examples/__snapshots__/kubernetes-with-jobs.test.ts.snap +282 -62
- package/examples/__snapshots__/kubernetes-with-mongodb.test.ts.snap +141 -31
- package/examples/__snapshots__/local-dot-env.test.ts.snap +141 -31
- package/examples/__snapshots__/meteor-kubernetes.test.ts.snap +133 -27
- package/examples/__snapshots__/modify-generated-files.test.ts.snap +124 -20
- package/examples/__snapshots__/modify-generated-yaml.test.ts.snap +124 -20
- package/examples/__snapshots__/multiline-var.test.ts.snap +423 -93
- package/examples/__snapshots__/native-app.test.ts.snap +277 -57
- package/examples/__snapshots__/node-build-with-custom-image.test.ts.snap +141 -31
- package/examples/__snapshots__/node-build-with-docker-additions.test.ts.snap +141 -31
- package/examples/__snapshots__/override-secrets.test.ts.snap +141 -31
- 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 +423 -93
- package/examples/__snapshots__/wait-for-other-deploy.test.ts.snap +260 -52
- package/examples/__snapshots__/workspace-api-www-turbo-cache.test.ts.snap +161 -43
- package/examples/__snapshots__/workspace-api-www.test.ts.snap +161 -43
- package/package.json +1 -1
- package/src/build/custom/testJob.ts +0 -1
- package/src/build/node/testJob.ts +0 -1
- package/src/build/node/yarn.ts +3 -2
- package/src/build/rails/test.ts +0 -1
- package/src/deploy/types/googleCloudRun.ts +1 -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:
|
|
@@ -152,7 +149,7 @@ api 👮 lint:
|
|
|
152
149
|
- if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi
|
|
153
150
|
- collapseable_section_end "nodeinstall"
|
|
154
151
|
- collapseable_section_start "yarninstall" "Yarn install"
|
|
155
|
-
- yarn install --immutable
|
|
152
|
+
- yarn install --immutable --inline-builds
|
|
156
153
|
- collapseable_section_end "yarninstall"
|
|
157
154
|
- yarn lint
|
|
158
155
|
cache:
|
|
@@ -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:
|
|
@@ -195,7 +189,7 @@ api 🧪 test:
|
|
|
195
189
|
- if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi
|
|
196
190
|
- collapseable_section_end "nodeinstall"
|
|
197
191
|
- collapseable_section_start "yarninstall" "Yarn install"
|
|
198
|
-
- yarn install --immutable
|
|
192
|
+
- yarn install --immutable --inline-builds
|
|
199
193
|
- collapseable_section_end "yarninstall"
|
|
200
194
|
- yarn test
|
|
201
195
|
cache:
|
|
@@ -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
|
|
@@ -272,7 +263,7 @@ api 🧪 test:
|
|
|
272
263
|
- if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi
|
|
273
264
|
- collapseable_section_end "nodeinstall"
|
|
274
265
|
- collapseable_section_start "yarninstall" "Yarn install"
|
|
275
|
-
- yarn install --immutable
|
|
266
|
+
- yarn install --immutable --inline-builds
|
|
276
267
|
- collapseable_section_end "yarninstall"
|
|
277
268
|
- yarn build
|
|
278
269
|
cache:
|
|
@@ -327,7 +318,8 @@ api 🧪 test:
|
|
|
327
318
|
- export DOCKER_CACHE_IMAGE="europe-west6-docker.pkg.dev/google-project-id/catladder-deploy/pan-test-app/caches/api"
|
|
328
319
|
- export DOCKER_IMAGE_TAG="$CI_COMMIT_SHA"
|
|
329
320
|
- |-
|
|
330
|
-
export DOCKER_COPY_AND_INSTALL_APP="
|
|
321
|
+
export DOCKER_COPY_AND_INSTALL_APP="ENV YARN_ENABLE_INLINE_BUILDS=1
|
|
322
|
+
COPY --chown=node:node $APP_DIR .
|
|
331
323
|
RUN yarn plugin import workspace-tools
|
|
332
324
|
RUN yarn workspaces focus --production && yarn rebuild"
|
|
333
325
|
- |-
|
|
@@ -493,17 +485,17 @@ api 🧪 test:
|
|
|
493
485
|
- when: on_success
|
|
494
486
|
if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && $CI_COMMIT_MESSAGE !~ /^chore\\(release\\).*/
|
|
495
487
|
needs:
|
|
496
|
-
- job: api 👮 lint
|
|
488
|
+
- job: 'api 👮 lint | dev '
|
|
497
489
|
artifacts: false
|
|
498
490
|
- job: 'api 🔨 app | dev '
|
|
499
491
|
artifacts: false
|
|
500
492
|
- job: 'api 🔨 docker | dev '
|
|
501
493
|
artifacts: false
|
|
502
|
-
- job: api 🧪 test
|
|
494
|
+
- job: 'api 🧪 test | dev '
|
|
503
495
|
artifacts: false
|
|
504
496
|
- job: 'api 🧾 sbom | dev '
|
|
505
497
|
artifacts: true
|
|
506
|
-
- job: api 🛡 audit
|
|
498
|
+
- job: 'api 🛡 audit | dev '
|
|
507
499
|
artifacts: false
|
|
508
500
|
retry: *a1
|
|
509
501
|
interruptible: true
|
|
@@ -544,6 +536,115 @@ api 🧪 test:
|
|
|
544
536
|
retry: *a1
|
|
545
537
|
interruptible: true
|
|
546
538
|
allow_failure: true
|
|
539
|
+
'api 🛡 audit | review ':
|
|
540
|
+
stage: test
|
|
541
|
+
image: path/to/docker/jobs-default:the-version
|
|
542
|
+
variables:
|
|
543
|
+
KUBERNETES_CPU_REQUEST: '0.45'
|
|
544
|
+
KUBERNETES_MEMORY_REQUEST: 1Gi
|
|
545
|
+
KUBERNETES_MEMORY_LIMIT: 4Gi
|
|
546
|
+
script:
|
|
547
|
+
- collapseable_section_start "injectvars" "Injecting variables"
|
|
548
|
+
- export APP_PATH="api"
|
|
549
|
+
- collapseable_section_end "injectvars"
|
|
550
|
+
- cd api
|
|
551
|
+
- yarn npm audit --environment production
|
|
552
|
+
rules:
|
|
553
|
+
- when: never
|
|
554
|
+
if: $CI_PIPELINE_SOURCE == "trigger"
|
|
555
|
+
- if: $CI_MERGE_REQUEST_ID
|
|
556
|
+
needs: []
|
|
557
|
+
retry: *a1
|
|
558
|
+
interruptible: true
|
|
559
|
+
allow_failure: true
|
|
560
|
+
'api 👮 lint | review ':
|
|
561
|
+
stage: test
|
|
562
|
+
image: path/to/docker/jobs-default:the-version
|
|
563
|
+
variables:
|
|
564
|
+
KUBERNETES_CPU_REQUEST: '0.45'
|
|
565
|
+
KUBERNETES_MEMORY_REQUEST: 1Gi
|
|
566
|
+
KUBERNETES_MEMORY_LIMIT: 4Gi
|
|
567
|
+
script:
|
|
568
|
+
- collapseable_section_start "injectvars" "Injecting variables"
|
|
569
|
+
- export APP_PATH="api"
|
|
570
|
+
- collapseable_section_end "injectvars"
|
|
571
|
+
- collapseable_section_start "nodeinstall" "Ensure node version"
|
|
572
|
+
- if [ -f ~/.nvm/nvm.sh ]; then source ~/.nvm/nvm.sh; fi
|
|
573
|
+
- if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi
|
|
574
|
+
- collapseable_section_end "nodeinstall"
|
|
575
|
+
- cd api
|
|
576
|
+
- collapseable_section_start "nodeinstall" "Ensure node version"
|
|
577
|
+
- if [ -f ~/.nvm/nvm.sh ]; then source ~/.nvm/nvm.sh; fi
|
|
578
|
+
- if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi
|
|
579
|
+
- collapseable_section_end "nodeinstall"
|
|
580
|
+
- collapseable_section_start "yarninstall" "Yarn install"
|
|
581
|
+
- yarn install --immutable --inline-builds
|
|
582
|
+
- collapseable_section_end "yarninstall"
|
|
583
|
+
- yarn lint
|
|
584
|
+
cache:
|
|
585
|
+
- key: api-yarn-mr$CI_MERGE_REQUEST_IID
|
|
586
|
+
policy: pull-push
|
|
587
|
+
paths:
|
|
588
|
+
- api/.yarn
|
|
589
|
+
fallback_keys:
|
|
590
|
+
- api-yarn
|
|
591
|
+
- key: api-node-modules-mr$CI_MERGE_REQUEST_IID
|
|
592
|
+
policy: pull-push
|
|
593
|
+
paths:
|
|
594
|
+
- api/node_modules
|
|
595
|
+
fallback_keys:
|
|
596
|
+
- api-node-modules
|
|
597
|
+
rules:
|
|
598
|
+
- when: never
|
|
599
|
+
if: $CI_PIPELINE_SOURCE == "trigger"
|
|
600
|
+
- if: $CI_MERGE_REQUEST_ID
|
|
601
|
+
needs: []
|
|
602
|
+
retry: *a1
|
|
603
|
+
interruptible: true
|
|
604
|
+
'api 🧪 test | review ':
|
|
605
|
+
stage: test
|
|
606
|
+
image: path/to/docker/jobs-testing-chrome:the-version
|
|
607
|
+
variables:
|
|
608
|
+
KUBERNETES_CPU_REQUEST: '0.45'
|
|
609
|
+
KUBERNETES_MEMORY_REQUEST: 1Gi
|
|
610
|
+
KUBERNETES_MEMORY_LIMIT: 4Gi
|
|
611
|
+
script:
|
|
612
|
+
- collapseable_section_start "injectvars" "Injecting variables"
|
|
613
|
+
- export APP_PATH="api"
|
|
614
|
+
- collapseable_section_end "injectvars"
|
|
615
|
+
- collapseable_section_start "nodeinstall" "Ensure node version"
|
|
616
|
+
- if [ -f ~/.nvm/nvm.sh ]; then source ~/.nvm/nvm.sh; fi
|
|
617
|
+
- if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi
|
|
618
|
+
- collapseable_section_end "nodeinstall"
|
|
619
|
+
- cd api
|
|
620
|
+
- collapseable_section_start "nodeinstall" "Ensure node version"
|
|
621
|
+
- if [ -f ~/.nvm/nvm.sh ]; then source ~/.nvm/nvm.sh; fi
|
|
622
|
+
- if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi
|
|
623
|
+
- collapseable_section_end "nodeinstall"
|
|
624
|
+
- collapseable_section_start "yarninstall" "Yarn install"
|
|
625
|
+
- yarn install --immutable --inline-builds
|
|
626
|
+
- collapseable_section_end "yarninstall"
|
|
627
|
+
- yarn test
|
|
628
|
+
cache:
|
|
629
|
+
- key: api-yarn-mr$CI_MERGE_REQUEST_IID
|
|
630
|
+
policy: pull-push
|
|
631
|
+
paths:
|
|
632
|
+
- api/.yarn
|
|
633
|
+
fallback_keys:
|
|
634
|
+
- api-yarn
|
|
635
|
+
- key: api-node-modules-mr$CI_MERGE_REQUEST_IID
|
|
636
|
+
policy: pull-push
|
|
637
|
+
paths:
|
|
638
|
+
- api/node_modules
|
|
639
|
+
fallback_keys:
|
|
640
|
+
- api-node-modules
|
|
641
|
+
rules:
|
|
642
|
+
- when: never
|
|
643
|
+
if: $CI_PIPELINE_SOURCE == "trigger"
|
|
644
|
+
- if: $CI_MERGE_REQUEST_ID
|
|
645
|
+
needs: []
|
|
646
|
+
retry: *a1
|
|
647
|
+
interruptible: true
|
|
547
648
|
'api 🔨 app | review ':
|
|
548
649
|
stage: build
|
|
549
650
|
image: path/to/docker/jobs-default:the-version
|
|
@@ -599,18 +700,22 @@ api 🧪 test:
|
|
|
599
700
|
- if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi
|
|
600
701
|
- collapseable_section_end "nodeinstall"
|
|
601
702
|
- collapseable_section_start "yarninstall" "Yarn install"
|
|
602
|
-
- yarn install --immutable
|
|
703
|
+
- yarn install --immutable --inline-builds
|
|
603
704
|
- collapseable_section_end "yarninstall"
|
|
604
705
|
- yarn build
|
|
605
706
|
cache:
|
|
606
|
-
- key: api-yarn
|
|
707
|
+
- key: api-yarn-mr$CI_MERGE_REQUEST_IID
|
|
607
708
|
policy: pull-push
|
|
608
709
|
paths:
|
|
609
710
|
- api/.yarn
|
|
610
|
-
|
|
711
|
+
fallback_keys:
|
|
712
|
+
- api-yarn
|
|
713
|
+
- key: api-node-modules-mr$CI_MERGE_REQUEST_IID
|
|
611
714
|
policy: pull-push
|
|
612
715
|
paths:
|
|
613
716
|
- api/node_modules
|
|
717
|
+
fallback_keys:
|
|
718
|
+
- api-node-modules
|
|
614
719
|
artifacts:
|
|
615
720
|
paths:
|
|
616
721
|
- api/__build_info.json
|
|
@@ -654,7 +759,8 @@ api 🧪 test:
|
|
|
654
759
|
- export DOCKER_CACHE_IMAGE="europe-west6-docker.pkg.dev/google-project-id/catladder-deploy/pan-test-app/caches/api"
|
|
655
760
|
- export DOCKER_IMAGE_TAG="$CI_COMMIT_SHA"
|
|
656
761
|
- |-
|
|
657
|
-
export DOCKER_COPY_AND_INSTALL_APP="
|
|
762
|
+
export DOCKER_COPY_AND_INSTALL_APP="ENV YARN_ENABLE_INLINE_BUILDS=1
|
|
763
|
+
COPY --chown=node:node $APP_DIR .
|
|
658
764
|
RUN yarn plugin import workspace-tools
|
|
659
765
|
RUN yarn workspaces focus --production && yarn rebuild"
|
|
660
766
|
- |-
|
|
@@ -677,10 +783,12 @@ api 🧪 test:
|
|
|
677
783
|
- docker push $DOCKER_CACHE_IMAGE
|
|
678
784
|
- collapseable_section_end "docker-push"
|
|
679
785
|
cache:
|
|
680
|
-
- key: api-yarn
|
|
786
|
+
- key: api-yarn-mr$CI_MERGE_REQUEST_IID
|
|
681
787
|
policy: pull
|
|
682
788
|
paths:
|
|
683
789
|
- api/.yarn
|
|
790
|
+
fallback_keys:
|
|
791
|
+
- api-yarn
|
|
684
792
|
rules:
|
|
685
793
|
- when: never
|
|
686
794
|
if: $CI_PIPELINE_SOURCE == "trigger"
|
|
@@ -823,17 +931,17 @@ api 🧪 test:
|
|
|
823
931
|
- when: on_success
|
|
824
932
|
if: $CI_MERGE_REQUEST_ID
|
|
825
933
|
needs:
|
|
826
|
-
- job: api 👮 lint
|
|
934
|
+
- job: 'api 👮 lint | review '
|
|
827
935
|
artifacts: false
|
|
828
936
|
- job: 'api 🔨 app | review '
|
|
829
937
|
artifacts: false
|
|
830
938
|
- job: 'api 🔨 docker | review '
|
|
831
939
|
artifacts: false
|
|
832
|
-
- job: api 🧪 test
|
|
940
|
+
- job: 'api 🧪 test | review '
|
|
833
941
|
artifacts: false
|
|
834
942
|
- job: 'api 🧾 sbom | review '
|
|
835
943
|
artifacts: true
|
|
836
|
-
- job: api 🛡 audit
|
|
944
|
+
- job: 'api 🛡 audit | review '
|
|
837
945
|
artifacts: false
|
|
838
946
|
retry: *a1
|
|
839
947
|
interruptible: true
|
|
@@ -932,7 +1040,7 @@ api 🧪 test:
|
|
|
932
1040
|
- if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi
|
|
933
1041
|
- collapseable_section_end "nodeinstall"
|
|
934
1042
|
- collapseable_section_start "yarninstall" "Yarn install"
|
|
935
|
-
- yarn install --immutable
|
|
1043
|
+
- yarn install --immutable --inline-builds
|
|
936
1044
|
- collapseable_section_end "yarninstall"
|
|
937
1045
|
- yarn build
|
|
938
1046
|
cache:
|
|
@@ -987,7 +1095,8 @@ api 🧪 test:
|
|
|
987
1095
|
- export DOCKER_CACHE_IMAGE="europe-west6-docker.pkg.dev/google-project-id/catladder-deploy/pan-test-app/caches/api"
|
|
988
1096
|
- export DOCKER_IMAGE_TAG="$CI_COMMIT_SHA"
|
|
989
1097
|
- |-
|
|
990
|
-
export DOCKER_COPY_AND_INSTALL_APP="
|
|
1098
|
+
export DOCKER_COPY_AND_INSTALL_APP="ENV YARN_ENABLE_INLINE_BUILDS=1
|
|
1099
|
+
COPY --chown=node:node $APP_DIR .
|
|
991
1100
|
RUN yarn plugin import workspace-tools
|
|
992
1101
|
RUN yarn workspaces focus --production && yarn rebuild"
|
|
993
1102
|
- |-
|
|
@@ -1252,7 +1361,7 @@ api 🧪 test:
|
|
|
1252
1361
|
- if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi
|
|
1253
1362
|
- collapseable_section_end "nodeinstall"
|
|
1254
1363
|
- collapseable_section_start "yarninstall" "Yarn install"
|
|
1255
|
-
- yarn install --immutable
|
|
1364
|
+
- yarn install --immutable --inline-builds
|
|
1256
1365
|
- collapseable_section_end "yarninstall"
|
|
1257
1366
|
- yarn build
|
|
1258
1367
|
cache:
|
|
@@ -1307,7 +1416,8 @@ api 🧪 test:
|
|
|
1307
1416
|
- export DOCKER_CACHE_IMAGE="europe-west6-docker.pkg.dev/google-project-id/catladder-deploy/pan-test-app/caches/api"
|
|
1308
1417
|
- export DOCKER_IMAGE_TAG="$CI_COMMIT_SHA"
|
|
1309
1418
|
- |-
|
|
1310
|
-
export DOCKER_COPY_AND_INSTALL_APP="
|
|
1419
|
+
export DOCKER_COPY_AND_INSTALL_APP="ENV YARN_ENABLE_INLINE_BUILDS=1
|
|
1420
|
+
COPY --chown=node:node $APP_DIR .
|
|
1311
1421
|
RUN yarn plugin import workspace-tools
|
|
1312
1422
|
RUN yarn workspaces focus --production && yarn rebuild"
|
|
1313
1423
|
- |-
|
|
@@ -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:
|
|
@@ -152,7 +149,7 @@ api 👮 lint:
|
|
|
152
149
|
- if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi
|
|
153
150
|
- collapseable_section_end "nodeinstall"
|
|
154
151
|
- collapseable_section_start "yarninstall" "Yarn install"
|
|
155
|
-
- yarn install --immutable
|
|
152
|
+
- yarn install --immutable --inline-builds
|
|
156
153
|
- collapseable_section_end "yarninstall"
|
|
157
154
|
- yarn lint
|
|
158
155
|
cache:
|
|
@@ -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:
|
|
@@ -195,7 +189,7 @@ api 🧪 test:
|
|
|
195
189
|
- if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi
|
|
196
190
|
- collapseable_section_end "nodeinstall"
|
|
197
191
|
- collapseable_section_start "yarninstall" "Yarn install"
|
|
198
|
-
- yarn install --immutable
|
|
192
|
+
- yarn install --immutable --inline-builds
|
|
199
193
|
- collapseable_section_end "yarninstall"
|
|
200
194
|
- yarn test
|
|
201
195
|
cache:
|
|
@@ -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
|
|
@@ -272,7 +263,7 @@ api 🧪 test:
|
|
|
272
263
|
- if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi
|
|
273
264
|
- collapseable_section_end "nodeinstall"
|
|
274
265
|
- collapseable_section_start "yarninstall" "Yarn install"
|
|
275
|
-
- yarn install --immutable
|
|
266
|
+
- yarn install --immutable --inline-builds
|
|
276
267
|
- collapseable_section_end "yarninstall"
|
|
277
268
|
- yarn build
|
|
278
269
|
cache:
|
|
@@ -327,7 +318,8 @@ api 🧪 test:
|
|
|
327
318
|
- export DOCKER_CACHE_IMAGE="europe-west6-docker.pkg.dev/google-project-id/catladder-deploy/pan-test-app/caches/api"
|
|
328
319
|
- export DOCKER_IMAGE_TAG="$CI_COMMIT_SHA"
|
|
329
320
|
- |-
|
|
330
|
-
export DOCKER_COPY_AND_INSTALL_APP="
|
|
321
|
+
export DOCKER_COPY_AND_INSTALL_APP="ENV YARN_ENABLE_INLINE_BUILDS=1
|
|
322
|
+
COPY --chown=node:node $APP_DIR .
|
|
331
323
|
RUN yarn plugin import workspace-tools
|
|
332
324
|
RUN yarn workspaces focus --production && yarn rebuild"
|
|
333
325
|
- |-
|
|
@@ -493,17 +485,17 @@ api 🧪 test:
|
|
|
493
485
|
- when: on_success
|
|
494
486
|
if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && $CI_COMMIT_MESSAGE !~ /^chore\\(release\\).*/
|
|
495
487
|
needs:
|
|
496
|
-
- job: api 👮 lint
|
|
488
|
+
- job: 'api 👮 lint | dev '
|
|
497
489
|
artifacts: false
|
|
498
490
|
- job: 'api 🔨 app | dev '
|
|
499
491
|
artifacts: false
|
|
500
492
|
- job: 'api 🔨 docker | dev '
|
|
501
493
|
artifacts: false
|
|
502
|
-
- job: api 🧪 test
|
|
494
|
+
- job: 'api 🧪 test | dev '
|
|
503
495
|
artifacts: false
|
|
504
496
|
- job: 'api 🧾 sbom | dev '
|
|
505
497
|
artifacts: true
|
|
506
|
-
- job: api 🛡 audit
|
|
498
|
+
- job: 'api 🛡 audit | dev '
|
|
507
499
|
artifacts: false
|
|
508
500
|
retry: *a1
|
|
509
501
|
interruptible: true
|
|
@@ -544,6 +536,115 @@ api 🧪 test:
|
|
|
544
536
|
retry: *a1
|
|
545
537
|
interruptible: true
|
|
546
538
|
allow_failure: true
|
|
539
|
+
'api 🛡 audit | review ':
|
|
540
|
+
stage: test
|
|
541
|
+
image: path/to/docker/jobs-default:the-version
|
|
542
|
+
variables:
|
|
543
|
+
KUBERNETES_CPU_REQUEST: '0.45'
|
|
544
|
+
KUBERNETES_MEMORY_REQUEST: 1Gi
|
|
545
|
+
KUBERNETES_MEMORY_LIMIT: 4Gi
|
|
546
|
+
script:
|
|
547
|
+
- collapseable_section_start "injectvars" "Injecting variables"
|
|
548
|
+
- export APP_PATH="api"
|
|
549
|
+
- collapseable_section_end "injectvars"
|
|
550
|
+
- cd api
|
|
551
|
+
- yarn npm audit --environment production
|
|
552
|
+
rules:
|
|
553
|
+
- when: never
|
|
554
|
+
if: $CI_PIPELINE_SOURCE == "trigger"
|
|
555
|
+
- if: $CI_MERGE_REQUEST_ID
|
|
556
|
+
needs: []
|
|
557
|
+
retry: *a1
|
|
558
|
+
interruptible: true
|
|
559
|
+
allow_failure: true
|
|
560
|
+
'api 👮 lint | review ':
|
|
561
|
+
stage: test
|
|
562
|
+
image: path/to/docker/jobs-default:the-version
|
|
563
|
+
variables:
|
|
564
|
+
KUBERNETES_CPU_REQUEST: '0.45'
|
|
565
|
+
KUBERNETES_MEMORY_REQUEST: 1Gi
|
|
566
|
+
KUBERNETES_MEMORY_LIMIT: 4Gi
|
|
567
|
+
script:
|
|
568
|
+
- collapseable_section_start "injectvars" "Injecting variables"
|
|
569
|
+
- export APP_PATH="api"
|
|
570
|
+
- collapseable_section_end "injectvars"
|
|
571
|
+
- collapseable_section_start "nodeinstall" "Ensure node version"
|
|
572
|
+
- if [ -f ~/.nvm/nvm.sh ]; then source ~/.nvm/nvm.sh; fi
|
|
573
|
+
- if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi
|
|
574
|
+
- collapseable_section_end "nodeinstall"
|
|
575
|
+
- cd api
|
|
576
|
+
- collapseable_section_start "nodeinstall" "Ensure node version"
|
|
577
|
+
- if [ -f ~/.nvm/nvm.sh ]; then source ~/.nvm/nvm.sh; fi
|
|
578
|
+
- if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi
|
|
579
|
+
- collapseable_section_end "nodeinstall"
|
|
580
|
+
- collapseable_section_start "yarninstall" "Yarn install"
|
|
581
|
+
- yarn install --immutable --inline-builds
|
|
582
|
+
- collapseable_section_end "yarninstall"
|
|
583
|
+
- yarn lint
|
|
584
|
+
cache:
|
|
585
|
+
- key: api-yarn-mr$CI_MERGE_REQUEST_IID
|
|
586
|
+
policy: pull-push
|
|
587
|
+
paths:
|
|
588
|
+
- api/.yarn
|
|
589
|
+
fallback_keys:
|
|
590
|
+
- api-yarn
|
|
591
|
+
- key: api-node-modules-mr$CI_MERGE_REQUEST_IID
|
|
592
|
+
policy: pull-push
|
|
593
|
+
paths:
|
|
594
|
+
- api/node_modules
|
|
595
|
+
fallback_keys:
|
|
596
|
+
- api-node-modules
|
|
597
|
+
rules:
|
|
598
|
+
- when: never
|
|
599
|
+
if: $CI_PIPELINE_SOURCE == "trigger"
|
|
600
|
+
- if: $CI_MERGE_REQUEST_ID
|
|
601
|
+
needs: []
|
|
602
|
+
retry: *a1
|
|
603
|
+
interruptible: true
|
|
604
|
+
'api 🧪 test | review ':
|
|
605
|
+
stage: test
|
|
606
|
+
image: path/to/docker/jobs-testing-chrome:the-version
|
|
607
|
+
variables:
|
|
608
|
+
KUBERNETES_CPU_REQUEST: '0.45'
|
|
609
|
+
KUBERNETES_MEMORY_REQUEST: 1Gi
|
|
610
|
+
KUBERNETES_MEMORY_LIMIT: 4Gi
|
|
611
|
+
script:
|
|
612
|
+
- collapseable_section_start "injectvars" "Injecting variables"
|
|
613
|
+
- export APP_PATH="api"
|
|
614
|
+
- collapseable_section_end "injectvars"
|
|
615
|
+
- collapseable_section_start "nodeinstall" "Ensure node version"
|
|
616
|
+
- if [ -f ~/.nvm/nvm.sh ]; then source ~/.nvm/nvm.sh; fi
|
|
617
|
+
- if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi
|
|
618
|
+
- collapseable_section_end "nodeinstall"
|
|
619
|
+
- cd api
|
|
620
|
+
- collapseable_section_start "nodeinstall" "Ensure node version"
|
|
621
|
+
- if [ -f ~/.nvm/nvm.sh ]; then source ~/.nvm/nvm.sh; fi
|
|
622
|
+
- if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi
|
|
623
|
+
- collapseable_section_end "nodeinstall"
|
|
624
|
+
- collapseable_section_start "yarninstall" "Yarn install"
|
|
625
|
+
- yarn install --immutable --inline-builds
|
|
626
|
+
- collapseable_section_end "yarninstall"
|
|
627
|
+
- yarn test
|
|
628
|
+
cache:
|
|
629
|
+
- key: api-yarn-mr$CI_MERGE_REQUEST_IID
|
|
630
|
+
policy: pull-push
|
|
631
|
+
paths:
|
|
632
|
+
- api/.yarn
|
|
633
|
+
fallback_keys:
|
|
634
|
+
- api-yarn
|
|
635
|
+
- key: api-node-modules-mr$CI_MERGE_REQUEST_IID
|
|
636
|
+
policy: pull-push
|
|
637
|
+
paths:
|
|
638
|
+
- api/node_modules
|
|
639
|
+
fallback_keys:
|
|
640
|
+
- api-node-modules
|
|
641
|
+
rules:
|
|
642
|
+
- when: never
|
|
643
|
+
if: $CI_PIPELINE_SOURCE == "trigger"
|
|
644
|
+
- if: $CI_MERGE_REQUEST_ID
|
|
645
|
+
needs: []
|
|
646
|
+
retry: *a1
|
|
647
|
+
interruptible: true
|
|
547
648
|
'api 🔨 app | review ':
|
|
548
649
|
stage: build
|
|
549
650
|
image: path/to/docker/jobs-default:the-version
|
|
@@ -599,18 +700,22 @@ api 🧪 test:
|
|
|
599
700
|
- if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi
|
|
600
701
|
- collapseable_section_end "nodeinstall"
|
|
601
702
|
- collapseable_section_start "yarninstall" "Yarn install"
|
|
602
|
-
- yarn install --immutable
|
|
703
|
+
- yarn install --immutable --inline-builds
|
|
603
704
|
- collapseable_section_end "yarninstall"
|
|
604
705
|
- yarn build
|
|
605
706
|
cache:
|
|
606
|
-
- key: api-yarn
|
|
707
|
+
- key: api-yarn-mr$CI_MERGE_REQUEST_IID
|
|
607
708
|
policy: pull-push
|
|
608
709
|
paths:
|
|
609
710
|
- api/.yarn
|
|
610
|
-
|
|
711
|
+
fallback_keys:
|
|
712
|
+
- api-yarn
|
|
713
|
+
- key: api-node-modules-mr$CI_MERGE_REQUEST_IID
|
|
611
714
|
policy: pull-push
|
|
612
715
|
paths:
|
|
613
716
|
- api/node_modules
|
|
717
|
+
fallback_keys:
|
|
718
|
+
- api-node-modules
|
|
614
719
|
artifacts:
|
|
615
720
|
paths:
|
|
616
721
|
- api/__build_info.json
|
|
@@ -654,7 +759,8 @@ api 🧪 test:
|
|
|
654
759
|
- export DOCKER_CACHE_IMAGE="europe-west6-docker.pkg.dev/google-project-id/catladder-deploy/pan-test-app/caches/api"
|
|
655
760
|
- export DOCKER_IMAGE_TAG="$CI_COMMIT_SHA"
|
|
656
761
|
- |-
|
|
657
|
-
export DOCKER_COPY_AND_INSTALL_APP="
|
|
762
|
+
export DOCKER_COPY_AND_INSTALL_APP="ENV YARN_ENABLE_INLINE_BUILDS=1
|
|
763
|
+
COPY --chown=node:node $APP_DIR .
|
|
658
764
|
RUN yarn plugin import workspace-tools
|
|
659
765
|
RUN yarn workspaces focus --production && yarn rebuild"
|
|
660
766
|
- |-
|
|
@@ -677,10 +783,12 @@ api 🧪 test:
|
|
|
677
783
|
- docker push $DOCKER_CACHE_IMAGE
|
|
678
784
|
- collapseable_section_end "docker-push"
|
|
679
785
|
cache:
|
|
680
|
-
- key: api-yarn
|
|
786
|
+
- key: api-yarn-mr$CI_MERGE_REQUEST_IID
|
|
681
787
|
policy: pull
|
|
682
788
|
paths:
|
|
683
789
|
- api/.yarn
|
|
790
|
+
fallback_keys:
|
|
791
|
+
- api-yarn
|
|
684
792
|
rules:
|
|
685
793
|
- when: never
|
|
686
794
|
if: $CI_PIPELINE_SOURCE == "trigger"
|
|
@@ -823,17 +931,17 @@ api 🧪 test:
|
|
|
823
931
|
- when: on_success
|
|
824
932
|
if: $CI_MERGE_REQUEST_ID
|
|
825
933
|
needs:
|
|
826
|
-
- job: api 👮 lint
|
|
934
|
+
- job: 'api 👮 lint | review '
|
|
827
935
|
artifacts: false
|
|
828
936
|
- job: 'api 🔨 app | review '
|
|
829
937
|
artifacts: false
|
|
830
938
|
- job: 'api 🔨 docker | review '
|
|
831
939
|
artifacts: false
|
|
832
|
-
- job: api 🧪 test
|
|
940
|
+
- job: 'api 🧪 test | review '
|
|
833
941
|
artifacts: false
|
|
834
942
|
- job: 'api 🧾 sbom | review '
|
|
835
943
|
artifacts: true
|
|
836
|
-
- job: api 🛡 audit
|
|
944
|
+
- job: 'api 🛡 audit | review '
|
|
837
945
|
artifacts: false
|
|
838
946
|
retry: *a1
|
|
839
947
|
interruptible: true
|
|
@@ -932,7 +1040,7 @@ api 🧪 test:
|
|
|
932
1040
|
- if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi
|
|
933
1041
|
- collapseable_section_end "nodeinstall"
|
|
934
1042
|
- collapseable_section_start "yarninstall" "Yarn install"
|
|
935
|
-
- yarn install --immutable
|
|
1043
|
+
- yarn install --immutable --inline-builds
|
|
936
1044
|
- collapseable_section_end "yarninstall"
|
|
937
1045
|
- yarn build
|
|
938
1046
|
cache:
|
|
@@ -987,7 +1095,8 @@ api 🧪 test:
|
|
|
987
1095
|
- export DOCKER_CACHE_IMAGE="europe-west6-docker.pkg.dev/google-project-id/catladder-deploy/pan-test-app/caches/api"
|
|
988
1096
|
- export DOCKER_IMAGE_TAG="$CI_COMMIT_SHA"
|
|
989
1097
|
- |-
|
|
990
|
-
export DOCKER_COPY_AND_INSTALL_APP="
|
|
1098
|
+
export DOCKER_COPY_AND_INSTALL_APP="ENV YARN_ENABLE_INLINE_BUILDS=1
|
|
1099
|
+
COPY --chown=node:node $APP_DIR .
|
|
991
1100
|
RUN yarn plugin import workspace-tools
|
|
992
1101
|
RUN yarn workspaces focus --production && yarn rebuild"
|
|
993
1102
|
- |-
|
|
@@ -1252,7 +1361,7 @@ api 🧪 test:
|
|
|
1252
1361
|
- if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi
|
|
1253
1362
|
- collapseable_section_end "nodeinstall"
|
|
1254
1363
|
- collapseable_section_start "yarninstall" "Yarn install"
|
|
1255
|
-
- yarn install --immutable
|
|
1364
|
+
- yarn install --immutable --inline-builds
|
|
1256
1365
|
- collapseable_section_end "yarninstall"
|
|
1257
1366
|
- yarn build
|
|
1258
1367
|
cache:
|
|
@@ -1307,7 +1416,8 @@ api 🧪 test:
|
|
|
1307
1416
|
- export DOCKER_CACHE_IMAGE="europe-west6-docker.pkg.dev/google-project-id/catladder-deploy/pan-test-app/caches/api"
|
|
1308
1417
|
- export DOCKER_IMAGE_TAG="$CI_COMMIT_SHA"
|
|
1309
1418
|
- |-
|
|
1310
|
-
export DOCKER_COPY_AND_INSTALL_APP="
|
|
1419
|
+
export DOCKER_COPY_AND_INSTALL_APP="ENV YARN_ENABLE_INLINE_BUILDS=1
|
|
1420
|
+
COPY --chown=node:node $APP_DIR .
|
|
1311
1421
|
RUN yarn plugin import workspace-tools
|
|
1312
1422
|
RUN yarn workspaces focus --production && yarn rebuild"
|
|
1313
1423
|
- |-
|