@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
|
|
@@ -270,7 +261,7 @@ api 🧪 test:
|
|
|
270
261
|
- if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi
|
|
271
262
|
- collapseable_section_end "nodeinstall"
|
|
272
263
|
- collapseable_section_start "yarninstall" "Yarn install"
|
|
273
|
-
- yarn install --immutable
|
|
264
|
+
- yarn install --immutable --inline-builds
|
|
274
265
|
- collapseable_section_end "yarninstall"
|
|
275
266
|
- yarn build
|
|
276
267
|
cache:
|
|
@@ -325,7 +316,8 @@ api 🧪 test:
|
|
|
325
316
|
- export DOCKER_CACHE_IMAGE="europe-west6-docker.pkg.dev/google-project-id/catladder-deploy/pan-test-app/caches/api"
|
|
326
317
|
- export DOCKER_IMAGE_TAG="$CI_COMMIT_SHA"
|
|
327
318
|
- |-
|
|
328
|
-
export DOCKER_COPY_AND_INSTALL_APP="
|
|
319
|
+
export DOCKER_COPY_AND_INSTALL_APP="ENV YARN_ENABLE_INLINE_BUILDS=1
|
|
320
|
+
COPY --chown=node:node $APP_DIR .
|
|
329
321
|
RUN yarn plugin import workspace-tools
|
|
330
322
|
RUN yarn workspaces focus --production && yarn rebuild"
|
|
331
323
|
- |-
|
|
@@ -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
|
|
@@ -527,6 +519,115 @@ api 🧪 test:
|
|
|
527
519
|
retry: *a1
|
|
528
520
|
interruptible: true
|
|
529
521
|
allow_failure: true
|
|
522
|
+
'api 🛡 audit | review ':
|
|
523
|
+
stage: test
|
|
524
|
+
image: path/to/docker/jobs-default:the-version
|
|
525
|
+
variables:
|
|
526
|
+
KUBERNETES_CPU_REQUEST: '0.45'
|
|
527
|
+
KUBERNETES_MEMORY_REQUEST: 1Gi
|
|
528
|
+
KUBERNETES_MEMORY_LIMIT: 4Gi
|
|
529
|
+
script:
|
|
530
|
+
- collapseable_section_start "injectvars" "Injecting variables"
|
|
531
|
+
- export APP_PATH="api"
|
|
532
|
+
- collapseable_section_end "injectvars"
|
|
533
|
+
- cd api
|
|
534
|
+
- yarn npm audit --environment production
|
|
535
|
+
rules:
|
|
536
|
+
- when: never
|
|
537
|
+
if: $CI_PIPELINE_SOURCE == "trigger"
|
|
538
|
+
- if: $CI_MERGE_REQUEST_ID
|
|
539
|
+
needs: []
|
|
540
|
+
retry: *a1
|
|
541
|
+
interruptible: true
|
|
542
|
+
allow_failure: true
|
|
543
|
+
'api 👮 lint | review ':
|
|
544
|
+
stage: test
|
|
545
|
+
image: path/to/docker/jobs-default:the-version
|
|
546
|
+
variables:
|
|
547
|
+
KUBERNETES_CPU_REQUEST: '0.45'
|
|
548
|
+
KUBERNETES_MEMORY_REQUEST: 1Gi
|
|
549
|
+
KUBERNETES_MEMORY_LIMIT: 4Gi
|
|
550
|
+
script:
|
|
551
|
+
- collapseable_section_start "injectvars" "Injecting variables"
|
|
552
|
+
- export APP_PATH="api"
|
|
553
|
+
- collapseable_section_end "injectvars"
|
|
554
|
+
- collapseable_section_start "nodeinstall" "Ensure node version"
|
|
555
|
+
- if [ -f ~/.nvm/nvm.sh ]; then source ~/.nvm/nvm.sh; fi
|
|
556
|
+
- if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi
|
|
557
|
+
- collapseable_section_end "nodeinstall"
|
|
558
|
+
- cd api
|
|
559
|
+
- collapseable_section_start "nodeinstall" "Ensure node version"
|
|
560
|
+
- if [ -f ~/.nvm/nvm.sh ]; then source ~/.nvm/nvm.sh; fi
|
|
561
|
+
- if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi
|
|
562
|
+
- collapseable_section_end "nodeinstall"
|
|
563
|
+
- collapseable_section_start "yarninstall" "Yarn install"
|
|
564
|
+
- yarn install --immutable --inline-builds
|
|
565
|
+
- collapseable_section_end "yarninstall"
|
|
566
|
+
- yarn lint
|
|
567
|
+
cache:
|
|
568
|
+
- key: api-yarn-mr$CI_MERGE_REQUEST_IID
|
|
569
|
+
policy: pull-push
|
|
570
|
+
paths:
|
|
571
|
+
- api/.yarn
|
|
572
|
+
fallback_keys:
|
|
573
|
+
- api-yarn
|
|
574
|
+
- key: api-node-modules-mr$CI_MERGE_REQUEST_IID
|
|
575
|
+
policy: pull-push
|
|
576
|
+
paths:
|
|
577
|
+
- api/node_modules
|
|
578
|
+
fallback_keys:
|
|
579
|
+
- api-node-modules
|
|
580
|
+
rules:
|
|
581
|
+
- when: never
|
|
582
|
+
if: $CI_PIPELINE_SOURCE == "trigger"
|
|
583
|
+
- if: $CI_MERGE_REQUEST_ID
|
|
584
|
+
needs: []
|
|
585
|
+
retry: *a1
|
|
586
|
+
interruptible: true
|
|
587
|
+
'api 🧪 test | review ':
|
|
588
|
+
stage: test
|
|
589
|
+
image: path/to/docker/jobs-testing-chrome:the-version
|
|
590
|
+
variables:
|
|
591
|
+
KUBERNETES_CPU_REQUEST: '0.45'
|
|
592
|
+
KUBERNETES_MEMORY_REQUEST: 1Gi
|
|
593
|
+
KUBERNETES_MEMORY_LIMIT: 4Gi
|
|
594
|
+
script:
|
|
595
|
+
- collapseable_section_start "injectvars" "Injecting variables"
|
|
596
|
+
- export APP_PATH="api"
|
|
597
|
+
- collapseable_section_end "injectvars"
|
|
598
|
+
- collapseable_section_start "nodeinstall" "Ensure node version"
|
|
599
|
+
- if [ -f ~/.nvm/nvm.sh ]; then source ~/.nvm/nvm.sh; fi
|
|
600
|
+
- if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi
|
|
601
|
+
- collapseable_section_end "nodeinstall"
|
|
602
|
+
- cd api
|
|
603
|
+
- collapseable_section_start "nodeinstall" "Ensure node version"
|
|
604
|
+
- if [ -f ~/.nvm/nvm.sh ]; then source ~/.nvm/nvm.sh; fi
|
|
605
|
+
- if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi
|
|
606
|
+
- collapseable_section_end "nodeinstall"
|
|
607
|
+
- collapseable_section_start "yarninstall" "Yarn install"
|
|
608
|
+
- yarn install --immutable --inline-builds
|
|
609
|
+
- collapseable_section_end "yarninstall"
|
|
610
|
+
- yarn test
|
|
611
|
+
cache:
|
|
612
|
+
- key: api-yarn-mr$CI_MERGE_REQUEST_IID
|
|
613
|
+
policy: pull-push
|
|
614
|
+
paths:
|
|
615
|
+
- api/.yarn
|
|
616
|
+
fallback_keys:
|
|
617
|
+
- api-yarn
|
|
618
|
+
- key: api-node-modules-mr$CI_MERGE_REQUEST_IID
|
|
619
|
+
policy: pull-push
|
|
620
|
+
paths:
|
|
621
|
+
- api/node_modules
|
|
622
|
+
fallback_keys:
|
|
623
|
+
- api-node-modules
|
|
624
|
+
rules:
|
|
625
|
+
- when: never
|
|
626
|
+
if: $CI_PIPELINE_SOURCE == "trigger"
|
|
627
|
+
- if: $CI_MERGE_REQUEST_ID
|
|
628
|
+
needs: []
|
|
629
|
+
retry: *a1
|
|
630
|
+
interruptible: true
|
|
530
631
|
'api 🔨 app | review ':
|
|
531
632
|
stage: build
|
|
532
633
|
image: path/to/docker/jobs-default:the-version
|
|
@@ -580,18 +681,22 @@ api 🧪 test:
|
|
|
580
681
|
- if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi
|
|
581
682
|
- collapseable_section_end "nodeinstall"
|
|
582
683
|
- collapseable_section_start "yarninstall" "Yarn install"
|
|
583
|
-
- yarn install --immutable
|
|
684
|
+
- yarn install --immutable --inline-builds
|
|
584
685
|
- collapseable_section_end "yarninstall"
|
|
585
686
|
- yarn build
|
|
586
687
|
cache:
|
|
587
|
-
- key: api-yarn
|
|
688
|
+
- key: api-yarn-mr$CI_MERGE_REQUEST_IID
|
|
588
689
|
policy: pull-push
|
|
589
690
|
paths:
|
|
590
691
|
- api/.yarn
|
|
591
|
-
|
|
692
|
+
fallback_keys:
|
|
693
|
+
- api-yarn
|
|
694
|
+
- key: api-node-modules-mr$CI_MERGE_REQUEST_IID
|
|
592
695
|
policy: pull-push
|
|
593
696
|
paths:
|
|
594
697
|
- api/node_modules
|
|
698
|
+
fallback_keys:
|
|
699
|
+
- api-node-modules
|
|
595
700
|
artifacts:
|
|
596
701
|
paths:
|
|
597
702
|
- api/__build_info.json
|
|
@@ -635,7 +740,8 @@ api 🧪 test:
|
|
|
635
740
|
- export DOCKER_CACHE_IMAGE="europe-west6-docker.pkg.dev/google-project-id/catladder-deploy/pan-test-app/caches/api"
|
|
636
741
|
- export DOCKER_IMAGE_TAG="$CI_COMMIT_SHA"
|
|
637
742
|
- |-
|
|
638
|
-
export DOCKER_COPY_AND_INSTALL_APP="
|
|
743
|
+
export DOCKER_COPY_AND_INSTALL_APP="ENV YARN_ENABLE_INLINE_BUILDS=1
|
|
744
|
+
COPY --chown=node:node $APP_DIR .
|
|
639
745
|
RUN yarn plugin import workspace-tools
|
|
640
746
|
RUN yarn workspaces focus --production && yarn rebuild"
|
|
641
747
|
- |-
|
|
@@ -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
|
|
@@ -896,7 +1004,7 @@ api 🧪 test:
|
|
|
896
1004
|
- if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi
|
|
897
1005
|
- collapseable_section_end "nodeinstall"
|
|
898
1006
|
- collapseable_section_start "yarninstall" "Yarn install"
|
|
899
|
-
- yarn install --immutable
|
|
1007
|
+
- yarn install --immutable --inline-builds
|
|
900
1008
|
- collapseable_section_end "yarninstall"
|
|
901
1009
|
- yarn build
|
|
902
1010
|
cache:
|
|
@@ -951,7 +1059,8 @@ api 🧪 test:
|
|
|
951
1059
|
- export DOCKER_CACHE_IMAGE="europe-west6-docker.pkg.dev/google-project-id/catladder-deploy/pan-test-app/caches/api"
|
|
952
1060
|
- export DOCKER_IMAGE_TAG="$CI_COMMIT_SHA"
|
|
953
1061
|
- |-
|
|
954
|
-
export DOCKER_COPY_AND_INSTALL_APP="
|
|
1062
|
+
export DOCKER_COPY_AND_INSTALL_APP="ENV YARN_ENABLE_INLINE_BUILDS=1
|
|
1063
|
+
COPY --chown=node:node $APP_DIR .
|
|
955
1064
|
RUN yarn plugin import workspace-tools
|
|
956
1065
|
RUN yarn workspaces focus --production && yarn rebuild"
|
|
957
1066
|
- |-
|
|
@@ -1199,7 +1308,7 @@ api 🧪 test:
|
|
|
1199
1308
|
- if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi
|
|
1200
1309
|
- collapseable_section_end "nodeinstall"
|
|
1201
1310
|
- collapseable_section_start "yarninstall" "Yarn install"
|
|
1202
|
-
- yarn install --immutable
|
|
1311
|
+
- yarn install --immutable --inline-builds
|
|
1203
1312
|
- collapseable_section_end "yarninstall"
|
|
1204
1313
|
- yarn build
|
|
1205
1314
|
cache:
|
|
@@ -1254,7 +1363,8 @@ api 🧪 test:
|
|
|
1254
1363
|
- export DOCKER_CACHE_IMAGE="europe-west6-docker.pkg.dev/google-project-id/catladder-deploy/pan-test-app/caches/api"
|
|
1255
1364
|
- export DOCKER_IMAGE_TAG="$CI_COMMIT_SHA"
|
|
1256
1365
|
- |-
|
|
1257
|
-
export DOCKER_COPY_AND_INSTALL_APP="
|
|
1366
|
+
export DOCKER_COPY_AND_INSTALL_APP="ENV YARN_ENABLE_INLINE_BUILDS=1
|
|
1367
|
+
COPY --chown=node:node $APP_DIR .
|
|
1258
1368
|
RUN yarn plugin import workspace-tools
|
|
1259
1369
|
RUN yarn workspaces focus --production && yarn rebuild"
|
|
1260
1370
|
- |-
|
|
@@ -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="asia-east1-docker.pkg.dev/asdf/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
|
- |-
|
|
@@ -503,17 +495,17 @@ api 🧪 test:
|
|
|
503
495
|
- when: on_success
|
|
504
496
|
if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && $CI_COMMIT_MESSAGE !~ /^chore\\(release\\).*/
|
|
505
497
|
needs:
|
|
506
|
-
- job: api 👮 lint
|
|
498
|
+
- job: 'api 👮 lint | dev '
|
|
507
499
|
artifacts: false
|
|
508
500
|
- job: 'api 🔨 app | dev '
|
|
509
501
|
artifacts: false
|
|
510
502
|
- job: 'api 🔨 docker | dev '
|
|
511
503
|
artifacts: false
|
|
512
|
-
- job: api 🧪 test
|
|
504
|
+
- job: 'api 🧪 test | dev '
|
|
513
505
|
artifacts: false
|
|
514
506
|
- job: 'api 🧾 sbom | dev '
|
|
515
507
|
artifacts: true
|
|
516
|
-
- job: api 🛡 audit
|
|
508
|
+
- job: 'api 🛡 audit | dev '
|
|
517
509
|
artifacts: false
|
|
518
510
|
retry: *a1
|
|
519
511
|
interruptible: true
|
|
@@ -554,6 +546,115 @@ api 🧪 test:
|
|
|
554
546
|
retry: *a1
|
|
555
547
|
interruptible: true
|
|
556
548
|
allow_failure: true
|
|
549
|
+
'api 🛡 audit | review ':
|
|
550
|
+
stage: test
|
|
551
|
+
image: path/to/docker/jobs-default:the-version
|
|
552
|
+
variables:
|
|
553
|
+
KUBERNETES_CPU_REQUEST: '0.45'
|
|
554
|
+
KUBERNETES_MEMORY_REQUEST: 1Gi
|
|
555
|
+
KUBERNETES_MEMORY_LIMIT: 4Gi
|
|
556
|
+
script:
|
|
557
|
+
- collapseable_section_start "injectvars" "Injecting variables"
|
|
558
|
+
- export APP_PATH="app"
|
|
559
|
+
- collapseable_section_end "injectvars"
|
|
560
|
+
- cd app
|
|
561
|
+
- yarn npm audit --environment production
|
|
562
|
+
rules:
|
|
563
|
+
- when: never
|
|
564
|
+
if: $CI_PIPELINE_SOURCE == "trigger"
|
|
565
|
+
- if: $CI_MERGE_REQUEST_ID
|
|
566
|
+
needs: []
|
|
567
|
+
retry: *a1
|
|
568
|
+
interruptible: true
|
|
569
|
+
allow_failure: true
|
|
570
|
+
'api 👮 lint | review ':
|
|
571
|
+
stage: test
|
|
572
|
+
image: path/to/docker/jobs-default:the-version
|
|
573
|
+
variables:
|
|
574
|
+
KUBERNETES_CPU_REQUEST: '0.45'
|
|
575
|
+
KUBERNETES_MEMORY_REQUEST: 1Gi
|
|
576
|
+
KUBERNETES_MEMORY_LIMIT: 4Gi
|
|
577
|
+
script:
|
|
578
|
+
- collapseable_section_start "injectvars" "Injecting variables"
|
|
579
|
+
- export APP_PATH="app"
|
|
580
|
+
- collapseable_section_end "injectvars"
|
|
581
|
+
- collapseable_section_start "nodeinstall" "Ensure node version"
|
|
582
|
+
- if [ -f ~/.nvm/nvm.sh ]; then source ~/.nvm/nvm.sh; fi
|
|
583
|
+
- if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi
|
|
584
|
+
- collapseable_section_end "nodeinstall"
|
|
585
|
+
- cd app
|
|
586
|
+
- collapseable_section_start "nodeinstall" "Ensure node version"
|
|
587
|
+
- if [ -f ~/.nvm/nvm.sh ]; then source ~/.nvm/nvm.sh; fi
|
|
588
|
+
- if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi
|
|
589
|
+
- collapseable_section_end "nodeinstall"
|
|
590
|
+
- collapseable_section_start "yarninstall" "Yarn install"
|
|
591
|
+
- yarn install --immutable --inline-builds
|
|
592
|
+
- collapseable_section_end "yarninstall"
|
|
593
|
+
- yarn lint
|
|
594
|
+
cache:
|
|
595
|
+
- key: app-yarn-mr$CI_MERGE_REQUEST_IID
|
|
596
|
+
policy: pull-push
|
|
597
|
+
paths:
|
|
598
|
+
- app/.yarn
|
|
599
|
+
fallback_keys:
|
|
600
|
+
- app-yarn
|
|
601
|
+
- key: app-node-modules-mr$CI_MERGE_REQUEST_IID
|
|
602
|
+
policy: pull-push
|
|
603
|
+
paths:
|
|
604
|
+
- app/node_modules
|
|
605
|
+
fallback_keys:
|
|
606
|
+
- app-node-modules
|
|
607
|
+
rules:
|
|
608
|
+
- when: never
|
|
609
|
+
if: $CI_PIPELINE_SOURCE == "trigger"
|
|
610
|
+
- if: $CI_MERGE_REQUEST_ID
|
|
611
|
+
needs: []
|
|
612
|
+
retry: *a1
|
|
613
|
+
interruptible: true
|
|
614
|
+
'api 🧪 test | review ':
|
|
615
|
+
stage: test
|
|
616
|
+
image: path/to/docker/jobs-testing-chrome:the-version
|
|
617
|
+
variables:
|
|
618
|
+
KUBERNETES_CPU_REQUEST: '0.45'
|
|
619
|
+
KUBERNETES_MEMORY_REQUEST: 1Gi
|
|
620
|
+
KUBERNETES_MEMORY_LIMIT: 4Gi
|
|
621
|
+
script:
|
|
622
|
+
- collapseable_section_start "injectvars" "Injecting variables"
|
|
623
|
+
- export APP_PATH="app"
|
|
624
|
+
- collapseable_section_end "injectvars"
|
|
625
|
+
- collapseable_section_start "nodeinstall" "Ensure node version"
|
|
626
|
+
- if [ -f ~/.nvm/nvm.sh ]; then source ~/.nvm/nvm.sh; fi
|
|
627
|
+
- if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi
|
|
628
|
+
- collapseable_section_end "nodeinstall"
|
|
629
|
+
- cd app
|
|
630
|
+
- collapseable_section_start "nodeinstall" "Ensure node version"
|
|
631
|
+
- if [ -f ~/.nvm/nvm.sh ]; then source ~/.nvm/nvm.sh; fi
|
|
632
|
+
- if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi
|
|
633
|
+
- collapseable_section_end "nodeinstall"
|
|
634
|
+
- collapseable_section_start "yarninstall" "Yarn install"
|
|
635
|
+
- yarn install --immutable --inline-builds
|
|
636
|
+
- collapseable_section_end "yarninstall"
|
|
637
|
+
- yarn test
|
|
638
|
+
cache:
|
|
639
|
+
- key: app-yarn-mr$CI_MERGE_REQUEST_IID
|
|
640
|
+
policy: pull-push
|
|
641
|
+
paths:
|
|
642
|
+
- app/.yarn
|
|
643
|
+
fallback_keys:
|
|
644
|
+
- app-yarn
|
|
645
|
+
- key: app-node-modules-mr$CI_MERGE_REQUEST_IID
|
|
646
|
+
policy: pull-push
|
|
647
|
+
paths:
|
|
648
|
+
- app/node_modules
|
|
649
|
+
fallback_keys:
|
|
650
|
+
- app-node-modules
|
|
651
|
+
rules:
|
|
652
|
+
- when: never
|
|
653
|
+
if: $CI_PIPELINE_SOURCE == "trigger"
|
|
654
|
+
- if: $CI_MERGE_REQUEST_ID
|
|
655
|
+
needs: []
|
|
656
|
+
retry: *a1
|
|
657
|
+
interruptible: true
|
|
557
658
|
'api 🔨 app | review ':
|
|
558
659
|
stage: build
|
|
559
660
|
image: path/to/docker/jobs-default:the-version
|
|
@@ -609,18 +710,22 @@ api 🧪 test:
|
|
|
609
710
|
- if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi
|
|
610
711
|
- collapseable_section_end "nodeinstall"
|
|
611
712
|
- collapseable_section_start "yarninstall" "Yarn install"
|
|
612
|
-
- yarn install --immutable
|
|
713
|
+
- yarn install --immutable --inline-builds
|
|
613
714
|
- collapseable_section_end "yarninstall"
|
|
614
715
|
- yarn build
|
|
615
716
|
cache:
|
|
616
|
-
- key: app-yarn
|
|
717
|
+
- key: app-yarn-mr$CI_MERGE_REQUEST_IID
|
|
617
718
|
policy: pull-push
|
|
618
719
|
paths:
|
|
619
720
|
- app/.yarn
|
|
620
|
-
|
|
721
|
+
fallback_keys:
|
|
722
|
+
- app-yarn
|
|
723
|
+
- key: app-node-modules-mr$CI_MERGE_REQUEST_IID
|
|
621
724
|
policy: pull-push
|
|
622
725
|
paths:
|
|
623
726
|
- app/node_modules
|
|
727
|
+
fallback_keys:
|
|
728
|
+
- app-node-modules
|
|
624
729
|
artifacts:
|
|
625
730
|
paths:
|
|
626
731
|
- app/__build_info.json
|
|
@@ -664,7 +769,8 @@ api 🧪 test:
|
|
|
664
769
|
- export DOCKER_CACHE_IMAGE="asia-east1-docker.pkg.dev/asdf/catladder-deploy/pan-test-app/caches/api"
|
|
665
770
|
- export DOCKER_IMAGE_TAG="$CI_COMMIT_SHA"
|
|
666
771
|
- |-
|
|
667
|
-
export DOCKER_COPY_AND_INSTALL_APP="
|
|
772
|
+
export DOCKER_COPY_AND_INSTALL_APP="ENV YARN_ENABLE_INLINE_BUILDS=1
|
|
773
|
+
COPY --chown=node:node $APP_DIR .
|
|
668
774
|
RUN yarn plugin import workspace-tools
|
|
669
775
|
RUN yarn workspaces focus --production && yarn rebuild"
|
|
670
776
|
- |-
|
|
@@ -687,10 +793,12 @@ api 🧪 test:
|
|
|
687
793
|
- docker push $DOCKER_CACHE_IMAGE
|
|
688
794
|
- collapseable_section_end "docker-push"
|
|
689
795
|
cache:
|
|
690
|
-
- key: app-yarn
|
|
796
|
+
- key: app-yarn-mr$CI_MERGE_REQUEST_IID
|
|
691
797
|
policy: pull
|
|
692
798
|
paths:
|
|
693
799
|
- app/.yarn
|
|
800
|
+
fallback_keys:
|
|
801
|
+
- app-yarn
|
|
694
802
|
rules:
|
|
695
803
|
- when: never
|
|
696
804
|
if: $CI_PIPELINE_SOURCE == "trigger"
|
|
@@ -843,17 +951,17 @@ api 🧪 test:
|
|
|
843
951
|
- when: on_success
|
|
844
952
|
if: $CI_MERGE_REQUEST_ID
|
|
845
953
|
needs:
|
|
846
|
-
- job: api 👮 lint
|
|
954
|
+
- job: 'api 👮 lint | review '
|
|
847
955
|
artifacts: false
|
|
848
956
|
- job: 'api 🔨 app | review '
|
|
849
957
|
artifacts: false
|
|
850
958
|
- job: 'api 🔨 docker | review '
|
|
851
959
|
artifacts: false
|
|
852
|
-
- job: api 🧪 test
|
|
960
|
+
- job: 'api 🧪 test | review '
|
|
853
961
|
artifacts: false
|
|
854
962
|
- job: 'api 🧾 sbom | review '
|
|
855
963
|
artifacts: true
|
|
856
|
-
- job: api 🛡 audit
|
|
964
|
+
- job: 'api 🛡 audit | review '
|
|
857
965
|
artifacts: false
|
|
858
966
|
retry: *a1
|
|
859
967
|
interruptible: true
|
|
@@ -952,7 +1060,7 @@ api 🧪 test:
|
|
|
952
1060
|
- if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi
|
|
953
1061
|
- collapseable_section_end "nodeinstall"
|
|
954
1062
|
- collapseable_section_start "yarninstall" "Yarn install"
|
|
955
|
-
- yarn install --immutable
|
|
1063
|
+
- yarn install --immutable --inline-builds
|
|
956
1064
|
- collapseable_section_end "yarninstall"
|
|
957
1065
|
- yarn build
|
|
958
1066
|
cache:
|
|
@@ -1007,7 +1115,8 @@ api 🧪 test:
|
|
|
1007
1115
|
- export DOCKER_CACHE_IMAGE="asia-east1-docker.pkg.dev/asdf/catladder-deploy/pan-test-app/caches/api"
|
|
1008
1116
|
- export DOCKER_IMAGE_TAG="$CI_COMMIT_SHA"
|
|
1009
1117
|
- |-
|
|
1010
|
-
export DOCKER_COPY_AND_INSTALL_APP="
|
|
1118
|
+
export DOCKER_COPY_AND_INSTALL_APP="ENV YARN_ENABLE_INLINE_BUILDS=1
|
|
1119
|
+
COPY --chown=node:node $APP_DIR .
|
|
1011
1120
|
RUN yarn plugin import workspace-tools
|
|
1012
1121
|
RUN yarn workspaces focus --production && yarn rebuild"
|
|
1013
1122
|
- |-
|
|
@@ -1282,7 +1391,7 @@ api 🧪 test:
|
|
|
1282
1391
|
- if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi
|
|
1283
1392
|
- collapseable_section_end "nodeinstall"
|
|
1284
1393
|
- collapseable_section_start "yarninstall" "Yarn install"
|
|
1285
|
-
- yarn install --immutable
|
|
1394
|
+
- yarn install --immutable --inline-builds
|
|
1286
1395
|
- collapseable_section_end "yarninstall"
|
|
1287
1396
|
- yarn build
|
|
1288
1397
|
cache:
|
|
@@ -1337,7 +1446,8 @@ api 🧪 test:
|
|
|
1337
1446
|
- export DOCKER_CACHE_IMAGE="asia-east1-docker.pkg.dev/asdf/catladder-deploy/pan-test-app/caches/api"
|
|
1338
1447
|
- export DOCKER_IMAGE_TAG="$CI_COMMIT_SHA"
|
|
1339
1448
|
- |-
|
|
1340
|
-
export DOCKER_COPY_AND_INSTALL_APP="
|
|
1449
|
+
export DOCKER_COPY_AND_INSTALL_APP="ENV YARN_ENABLE_INLINE_BUILDS=1
|
|
1450
|
+
COPY --chown=node:node $APP_DIR .
|
|
1341
1451
|
RUN yarn plugin import workspace-tools
|
|
1342
1452
|
RUN yarn workspaces focus --production && yarn rebuild"
|
|
1343
1453
|
- |-
|