@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
|
-
my-app ๐ก audit:
|
|
106
|
+
'my-app ๐ก audit | dev ':
|
|
107
107
|
stage: test
|
|
108
108
|
image: path/to/docker/jobs-default:the-version
|
|
109
109
|
variables:
|
|
@@ -120,9 +120,6 @@ my-app ๐ก 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 @@ my-app ๐ก audit:
|
|
|
131
128
|
- stuck_or_timeout_failure
|
|
132
129
|
interruptible: true
|
|
133
130
|
allow_failure: true
|
|
134
|
-
my-app ๐ฎ lint:
|
|
131
|
+
'my-app ๐ฎ lint | dev ':
|
|
135
132
|
stage: test
|
|
136
133
|
image: path/to/docker/jobs-default:the-version
|
|
137
134
|
variables:
|
|
@@ -152,7 +149,7 @@ my-app ๐ฎ 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 @@ my-app ๐ฎ 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
|
-
my-app ๐งช test:
|
|
171
|
+
'my-app ๐งช test | dev ':
|
|
178
172
|
stage: test
|
|
179
173
|
image: path/to/docker/jobs-testing-chrome:the-version
|
|
180
174
|
variables:
|
|
@@ -195,7 +189,7 @@ my-app ๐งช 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 @@ my-app ๐งช 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 @@ my-app ๐งช 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 @@ my-app ๐งช test:
|
|
|
327
318
|
- export DOCKER_CACHE_IMAGE="europe-west6-docker.pkg.dev/my-project-id/catladder-deploy/pan-test-app/caches/my-app"
|
|
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
|
- |-
|
|
@@ -483,17 +475,17 @@ my-app ๐งช test:
|
|
|
483
475
|
- when: on_success
|
|
484
476
|
if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && $CI_COMMIT_MESSAGE !~ /^chore\\(release\\).*/
|
|
485
477
|
needs:
|
|
486
|
-
- job: my-app ๐ฎ lint
|
|
478
|
+
- job: 'my-app ๐ฎ lint | dev '
|
|
487
479
|
artifacts: false
|
|
488
480
|
- job: 'my-app ๐จ app | dev '
|
|
489
481
|
artifacts: false
|
|
490
482
|
- job: 'my-app ๐จ docker | dev '
|
|
491
483
|
artifacts: false
|
|
492
|
-
- job: my-app ๐งช test
|
|
484
|
+
- job: 'my-app ๐งช test | dev '
|
|
493
485
|
artifacts: false
|
|
494
486
|
- job: 'my-app ๐งพ sbom | dev '
|
|
495
487
|
artifacts: true
|
|
496
|
-
- job: my-app ๐ก audit
|
|
488
|
+
- job: 'my-app ๐ก audit | dev '
|
|
497
489
|
artifacts: false
|
|
498
490
|
retry: *a1
|
|
499
491
|
interruptible: true
|
|
@@ -532,6 +524,115 @@ my-app ๐งช test:
|
|
|
532
524
|
retry: *a1
|
|
533
525
|
interruptible: true
|
|
534
526
|
allow_failure: true
|
|
527
|
+
'my-app ๐ก audit | review ':
|
|
528
|
+
stage: test
|
|
529
|
+
image: path/to/docker/jobs-default:the-version
|
|
530
|
+
variables:
|
|
531
|
+
KUBERNETES_CPU_REQUEST: '0.45'
|
|
532
|
+
KUBERNETES_MEMORY_REQUEST: 1Gi
|
|
533
|
+
KUBERNETES_MEMORY_LIMIT: 4Gi
|
|
534
|
+
script:
|
|
535
|
+
- collapseable_section_start "injectvars" "Injecting variables"
|
|
536
|
+
- export APP_PATH="app"
|
|
537
|
+
- collapseable_section_end "injectvars"
|
|
538
|
+
- cd app
|
|
539
|
+
- yarn npm audit --environment production
|
|
540
|
+
rules:
|
|
541
|
+
- when: never
|
|
542
|
+
if: $CI_PIPELINE_SOURCE == "trigger"
|
|
543
|
+
- if: $CI_MERGE_REQUEST_ID
|
|
544
|
+
needs: []
|
|
545
|
+
retry: *a1
|
|
546
|
+
interruptible: true
|
|
547
|
+
allow_failure: true
|
|
548
|
+
'my-app ๐ฎ lint | review ':
|
|
549
|
+
stage: test
|
|
550
|
+
image: path/to/docker/jobs-default:the-version
|
|
551
|
+
variables:
|
|
552
|
+
KUBERNETES_CPU_REQUEST: '0.45'
|
|
553
|
+
KUBERNETES_MEMORY_REQUEST: 1Gi
|
|
554
|
+
KUBERNETES_MEMORY_LIMIT: 4Gi
|
|
555
|
+
script:
|
|
556
|
+
- collapseable_section_start "injectvars" "Injecting variables"
|
|
557
|
+
- export APP_PATH="app"
|
|
558
|
+
- collapseable_section_end "injectvars"
|
|
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
|
+
- cd app
|
|
564
|
+
- collapseable_section_start "nodeinstall" "Ensure node version"
|
|
565
|
+
- if [ -f ~/.nvm/nvm.sh ]; then source ~/.nvm/nvm.sh; fi
|
|
566
|
+
- if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi
|
|
567
|
+
- collapseable_section_end "nodeinstall"
|
|
568
|
+
- collapseable_section_start "yarninstall" "Yarn install"
|
|
569
|
+
- yarn install --immutable --inline-builds
|
|
570
|
+
- collapseable_section_end "yarninstall"
|
|
571
|
+
- yarn lint
|
|
572
|
+
cache:
|
|
573
|
+
- key: app-yarn-mr$CI_MERGE_REQUEST_IID
|
|
574
|
+
policy: pull-push
|
|
575
|
+
paths:
|
|
576
|
+
- app/.yarn
|
|
577
|
+
fallback_keys:
|
|
578
|
+
- app-yarn
|
|
579
|
+
- key: app-node-modules-mr$CI_MERGE_REQUEST_IID
|
|
580
|
+
policy: pull-push
|
|
581
|
+
paths:
|
|
582
|
+
- app/node_modules
|
|
583
|
+
fallback_keys:
|
|
584
|
+
- app-node-modules
|
|
585
|
+
rules:
|
|
586
|
+
- when: never
|
|
587
|
+
if: $CI_PIPELINE_SOURCE == "trigger"
|
|
588
|
+
- if: $CI_MERGE_REQUEST_ID
|
|
589
|
+
needs: []
|
|
590
|
+
retry: *a1
|
|
591
|
+
interruptible: true
|
|
592
|
+
'my-app ๐งช test | review ':
|
|
593
|
+
stage: test
|
|
594
|
+
image: path/to/docker/jobs-testing-chrome:the-version
|
|
595
|
+
variables:
|
|
596
|
+
KUBERNETES_CPU_REQUEST: '0.45'
|
|
597
|
+
KUBERNETES_MEMORY_REQUEST: 1Gi
|
|
598
|
+
KUBERNETES_MEMORY_LIMIT: 4Gi
|
|
599
|
+
script:
|
|
600
|
+
- collapseable_section_start "injectvars" "Injecting variables"
|
|
601
|
+
- export APP_PATH="app"
|
|
602
|
+
- collapseable_section_end "injectvars"
|
|
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
|
+
- cd app
|
|
608
|
+
- collapseable_section_start "nodeinstall" "Ensure node version"
|
|
609
|
+
- if [ -f ~/.nvm/nvm.sh ]; then source ~/.nvm/nvm.sh; fi
|
|
610
|
+
- if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi
|
|
611
|
+
- collapseable_section_end "nodeinstall"
|
|
612
|
+
- collapseable_section_start "yarninstall" "Yarn install"
|
|
613
|
+
- yarn install --immutable --inline-builds
|
|
614
|
+
- collapseable_section_end "yarninstall"
|
|
615
|
+
- yarn test
|
|
616
|
+
cache:
|
|
617
|
+
- key: app-yarn-mr$CI_MERGE_REQUEST_IID
|
|
618
|
+
policy: pull-push
|
|
619
|
+
paths:
|
|
620
|
+
- app/.yarn
|
|
621
|
+
fallback_keys:
|
|
622
|
+
- app-yarn
|
|
623
|
+
- key: app-node-modules-mr$CI_MERGE_REQUEST_IID
|
|
624
|
+
policy: pull-push
|
|
625
|
+
paths:
|
|
626
|
+
- app/node_modules
|
|
627
|
+
fallback_keys:
|
|
628
|
+
- app-node-modules
|
|
629
|
+
rules:
|
|
630
|
+
- when: never
|
|
631
|
+
if: $CI_PIPELINE_SOURCE == "trigger"
|
|
632
|
+
- if: $CI_MERGE_REQUEST_ID
|
|
633
|
+
needs: []
|
|
634
|
+
retry: *a1
|
|
635
|
+
interruptible: true
|
|
535
636
|
'my-app ๐จ app | review ':
|
|
536
637
|
stage: build
|
|
537
638
|
image: path/to/docker/jobs-default:the-version
|
|
@@ -589,18 +690,22 @@ my-app ๐งช test:
|
|
|
589
690
|
- if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi
|
|
590
691
|
- collapseable_section_end "nodeinstall"
|
|
591
692
|
- collapseable_section_start "yarninstall" "Yarn install"
|
|
592
|
-
- yarn install --immutable
|
|
693
|
+
- yarn install --immutable --inline-builds
|
|
593
694
|
- collapseable_section_end "yarninstall"
|
|
594
695
|
- yarn build
|
|
595
696
|
cache:
|
|
596
|
-
- key: app-yarn
|
|
697
|
+
- key: app-yarn-mr$CI_MERGE_REQUEST_IID
|
|
597
698
|
policy: pull-push
|
|
598
699
|
paths:
|
|
599
700
|
- app/.yarn
|
|
600
|
-
|
|
701
|
+
fallback_keys:
|
|
702
|
+
- app-yarn
|
|
703
|
+
- key: app-node-modules-mr$CI_MERGE_REQUEST_IID
|
|
601
704
|
policy: pull-push
|
|
602
705
|
paths:
|
|
603
706
|
- app/node_modules
|
|
707
|
+
fallback_keys:
|
|
708
|
+
- app-node-modules
|
|
604
709
|
artifacts:
|
|
605
710
|
paths:
|
|
606
711
|
- app/__build_info.json
|
|
@@ -644,7 +749,8 @@ my-app ๐งช test:
|
|
|
644
749
|
- export DOCKER_CACHE_IMAGE="europe-west6-docker.pkg.dev/my-project-id/catladder-deploy/pan-test-app/caches/my-app"
|
|
645
750
|
- export DOCKER_IMAGE_TAG="$CI_COMMIT_SHA"
|
|
646
751
|
- |-
|
|
647
|
-
export DOCKER_COPY_AND_INSTALL_APP="
|
|
752
|
+
export DOCKER_COPY_AND_INSTALL_APP="ENV YARN_ENABLE_INLINE_BUILDS=1
|
|
753
|
+
COPY --chown=node:node $APP_DIR .
|
|
648
754
|
RUN yarn plugin import workspace-tools
|
|
649
755
|
RUN yarn workspaces focus --production && yarn rebuild"
|
|
650
756
|
- |-
|
|
@@ -667,10 +773,12 @@ my-app ๐งช test:
|
|
|
667
773
|
- docker push $DOCKER_CACHE_IMAGE
|
|
668
774
|
- collapseable_section_end "docker-push"
|
|
669
775
|
cache:
|
|
670
|
-
- key: app-yarn
|
|
776
|
+
- key: app-yarn-mr$CI_MERGE_REQUEST_IID
|
|
671
777
|
policy: pull
|
|
672
778
|
paths:
|
|
673
779
|
- app/.yarn
|
|
780
|
+
fallback_keys:
|
|
781
|
+
- app-yarn
|
|
674
782
|
rules:
|
|
675
783
|
- when: never
|
|
676
784
|
if: $CI_PIPELINE_SOURCE == "trigger"
|
|
@@ -806,17 +914,17 @@ my-app ๐งช test:
|
|
|
806
914
|
- when: on_success
|
|
807
915
|
if: $CI_MERGE_REQUEST_ID
|
|
808
916
|
needs:
|
|
809
|
-
- job: my-app ๐ฎ lint
|
|
917
|
+
- job: 'my-app ๐ฎ lint | review '
|
|
810
918
|
artifacts: false
|
|
811
919
|
- job: 'my-app ๐จ app | review '
|
|
812
920
|
artifacts: false
|
|
813
921
|
- job: 'my-app ๐จ docker | review '
|
|
814
922
|
artifacts: false
|
|
815
|
-
- job: my-app ๐งช test
|
|
923
|
+
- job: 'my-app ๐งช test | review '
|
|
816
924
|
artifacts: false
|
|
817
925
|
- job: 'my-app ๐งพ sbom | review '
|
|
818
926
|
artifacts: true
|
|
819
|
-
- job: my-app ๐ก audit
|
|
927
|
+
- job: 'my-app ๐ก audit | review '
|
|
820
928
|
artifacts: false
|
|
821
929
|
retry: *a1
|
|
822
930
|
interruptible: true
|
|
@@ -913,7 +1021,7 @@ my-app ๐งช test:
|
|
|
913
1021
|
- if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi
|
|
914
1022
|
- collapseable_section_end "nodeinstall"
|
|
915
1023
|
- collapseable_section_start "yarninstall" "Yarn install"
|
|
916
|
-
- yarn install --immutable
|
|
1024
|
+
- yarn install --immutable --inline-builds
|
|
917
1025
|
- collapseable_section_end "yarninstall"
|
|
918
1026
|
- yarn build
|
|
919
1027
|
cache:
|
|
@@ -968,7 +1076,8 @@ my-app ๐งช test:
|
|
|
968
1076
|
- export DOCKER_CACHE_IMAGE="europe-west6-docker.pkg.dev/my-project-id/catladder-deploy/pan-test-app/caches/my-app"
|
|
969
1077
|
- export DOCKER_IMAGE_TAG="$CI_COMMIT_SHA"
|
|
970
1078
|
- |-
|
|
971
|
-
export DOCKER_COPY_AND_INSTALL_APP="
|
|
1079
|
+
export DOCKER_COPY_AND_INSTALL_APP="ENV YARN_ENABLE_INLINE_BUILDS=1
|
|
1080
|
+
COPY --chown=node:node $APP_DIR .
|
|
972
1081
|
RUN yarn plugin import workspace-tools
|
|
973
1082
|
RUN yarn workspaces focus --production && yarn rebuild"
|
|
974
1083
|
- |-
|
|
@@ -1221,7 +1330,7 @@ my-app ๐งช test:
|
|
|
1221
1330
|
- if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi
|
|
1222
1331
|
- collapseable_section_end "nodeinstall"
|
|
1223
1332
|
- collapseable_section_start "yarninstall" "Yarn install"
|
|
1224
|
-
- yarn install --immutable
|
|
1333
|
+
- yarn install --immutable --inline-builds
|
|
1225
1334
|
- collapseable_section_end "yarninstall"
|
|
1226
1335
|
- yarn build
|
|
1227
1336
|
cache:
|
|
@@ -1276,7 +1385,8 @@ my-app ๐งช test:
|
|
|
1276
1385
|
- export DOCKER_CACHE_IMAGE="europe-west6-docker.pkg.dev/my-project-id/catladder-deploy/pan-test-app/caches/my-app"
|
|
1277
1386
|
- export DOCKER_IMAGE_TAG="$CI_COMMIT_SHA"
|
|
1278
1387
|
- |-
|
|
1279
|
-
export DOCKER_COPY_AND_INSTALL_APP="
|
|
1388
|
+
export DOCKER_COPY_AND_INSTALL_APP="ENV YARN_ENABLE_INLINE_BUILDS=1
|
|
1389
|
+
COPY --chown=node:node $APP_DIR .
|
|
1280
1390
|
RUN yarn plugin import workspace-tools
|
|
1281
1391
|
RUN yarn workspaces focus --production && yarn rebuild"
|
|
1282
1392
|
- |-
|
|
@@ -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
|
-
app ๐ก audit:
|
|
106
|
+
'app ๐ก audit | dev ':
|
|
107
107
|
stage: test
|
|
108
108
|
image: ruby:3.2.1
|
|
109
109
|
variables: {}
|
|
@@ -117,9 +117,6 @@ app ๐ก audit:
|
|
|
117
117
|
- when: never
|
|
118
118
|
if: $CI_PIPELINE_SOURCE == "trigger"
|
|
119
119
|
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && $CI_COMMIT_MESSAGE !~ /^chore\\(release\\).*/
|
|
120
|
-
- when: never
|
|
121
|
-
if: $CI_PIPELINE_SOURCE == "trigger"
|
|
122
|
-
- if: $CI_MERGE_REQUEST_ID
|
|
123
120
|
needs: []
|
|
124
121
|
retry: &a1
|
|
125
122
|
max: 2
|
|
@@ -128,7 +125,7 @@ app ๐ก audit:
|
|
|
128
125
|
- stuck_or_timeout_failure
|
|
129
126
|
interruptible: true
|
|
130
127
|
allow_failure: true
|
|
131
|
-
app ๐ฎ lint:
|
|
128
|
+
'app ๐ฎ lint | dev ':
|
|
132
129
|
stage: test
|
|
133
130
|
image: ruby:3.2.1
|
|
134
131
|
variables: {}
|
|
@@ -150,13 +147,10 @@ app ๐ฎ lint:
|
|
|
150
147
|
- when: never
|
|
151
148
|
if: $CI_PIPELINE_SOURCE == "trigger"
|
|
152
149
|
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && $CI_COMMIT_MESSAGE !~ /^chore\\(release\\).*/
|
|
153
|
-
- when: never
|
|
154
|
-
if: $CI_PIPELINE_SOURCE == "trigger"
|
|
155
|
-
- if: $CI_MERGE_REQUEST_ID
|
|
156
150
|
needs: []
|
|
157
151
|
retry: *a1
|
|
158
152
|
interruptible: true
|
|
159
|
-
app ๐งช test:
|
|
153
|
+
'app ๐งช test | dev ':
|
|
160
154
|
stage: test
|
|
161
155
|
image: ruby:3.2.1
|
|
162
156
|
services:
|
|
@@ -181,9 +175,6 @@ app ๐งช test:
|
|
|
181
175
|
- when: never
|
|
182
176
|
if: $CI_PIPELINE_SOURCE == "trigger"
|
|
183
177
|
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && $CI_COMMIT_MESSAGE !~ /^chore\\(release\\).*/
|
|
184
|
-
- when: never
|
|
185
|
-
if: $CI_PIPELINE_SOURCE == "trigger"
|
|
186
|
-
- if: $CI_MERGE_REQUEST_ID
|
|
187
178
|
needs: []
|
|
188
179
|
retry: *a1
|
|
189
180
|
interruptible: true
|
|
@@ -398,15 +389,15 @@ app ๐งช test:
|
|
|
398
389
|
- when: on_success
|
|
399
390
|
if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && $CI_COMMIT_MESSAGE !~ /^chore\\(release\\).*/
|
|
400
391
|
needs:
|
|
401
|
-
- job: app ๐ฎ lint
|
|
392
|
+
- job: 'app ๐ฎ lint | dev '
|
|
402
393
|
artifacts: false
|
|
403
394
|
- job: 'app ๐จ docker | dev '
|
|
404
395
|
artifacts: false
|
|
405
|
-
- job: app ๐งช test
|
|
396
|
+
- job: 'app ๐งช test | dev '
|
|
406
397
|
artifacts: false
|
|
407
398
|
- job: 'app ๐งพ sbom | dev '
|
|
408
399
|
artifacts: true
|
|
409
|
-
- job: app ๐ก audit
|
|
400
|
+
- job: 'app ๐ก audit | dev '
|
|
410
401
|
artifacts: false
|
|
411
402
|
retry: *a1
|
|
412
403
|
interruptible: true
|
|
@@ -519,6 +510,77 @@ app ๐งช test:
|
|
|
519
510
|
retry: *a1
|
|
520
511
|
interruptible: true
|
|
521
512
|
allow_failure: true
|
|
513
|
+
'app ๐ก audit | review ':
|
|
514
|
+
stage: test
|
|
515
|
+
image: ruby:3.2.1
|
|
516
|
+
variables: {}
|
|
517
|
+
script:
|
|
518
|
+
- collapseable_section_start "injectvars" "Injecting variables"
|
|
519
|
+
- collapseable_section_end "injectvars"
|
|
520
|
+
- cd .temp-with-dockerfile
|
|
521
|
+
- gem install bundler-audit
|
|
522
|
+
- bundle audit check
|
|
523
|
+
rules:
|
|
524
|
+
- when: never
|
|
525
|
+
if: $CI_PIPELINE_SOURCE == "trigger"
|
|
526
|
+
- if: $CI_MERGE_REQUEST_ID
|
|
527
|
+
needs: []
|
|
528
|
+
retry: *a1
|
|
529
|
+
interruptible: true
|
|
530
|
+
allow_failure: true
|
|
531
|
+
'app ๐ฎ lint | review ':
|
|
532
|
+
stage: test
|
|
533
|
+
image: ruby:3.2.1
|
|
534
|
+
variables: {}
|
|
535
|
+
script:
|
|
536
|
+
- collapseable_section_start "injectvars" "Injecting variables"
|
|
537
|
+
- collapseable_section_end "injectvars"
|
|
538
|
+
- cd .temp-with-dockerfile
|
|
539
|
+
- bundle config set path 'tmp/cache'
|
|
540
|
+
- bundle install -j $(nproc)
|
|
541
|
+
- bundle exec rubocop
|
|
542
|
+
cache: &a3
|
|
543
|
+
key:
|
|
544
|
+
files:
|
|
545
|
+
- Gemfile.lock
|
|
546
|
+
prefix: $CI_JOB_IMAGE
|
|
547
|
+
paths:
|
|
548
|
+
- tmp/cache
|
|
549
|
+
rules:
|
|
550
|
+
- when: never
|
|
551
|
+
if: $CI_PIPELINE_SOURCE == "trigger"
|
|
552
|
+
- if: $CI_MERGE_REQUEST_ID
|
|
553
|
+
needs: []
|
|
554
|
+
retry: *a1
|
|
555
|
+
interruptible: true
|
|
556
|
+
'app ๐งช test | review ':
|
|
557
|
+
stage: test
|
|
558
|
+
image: ruby:3.2.1
|
|
559
|
+
services:
|
|
560
|
+
- name: docker.io/postgres:latest
|
|
561
|
+
alias: database
|
|
562
|
+
variables:
|
|
563
|
+
POSTGRES_HOST_AUTH_METHOD: trust
|
|
564
|
+
variables:
|
|
565
|
+
RAILS_ENV: test
|
|
566
|
+
DATABASE_URL: postgresql://postgres@database
|
|
567
|
+
script:
|
|
568
|
+
- collapseable_section_start "injectvars" "Injecting variables"
|
|
569
|
+
- collapseable_section_end "injectvars"
|
|
570
|
+
- cd .temp-with-dockerfile
|
|
571
|
+
- bundle config set path 'tmp/cache'
|
|
572
|
+
- bundle install -j $(nproc)
|
|
573
|
+
- bundle exec rake db:test:prepare
|
|
574
|
+
- bundle exec rake assets:precompile assets:clean
|
|
575
|
+
- bundle exec rspec
|
|
576
|
+
cache: *a3
|
|
577
|
+
rules:
|
|
578
|
+
- when: never
|
|
579
|
+
if: $CI_PIPELINE_SOURCE == "trigger"
|
|
580
|
+
- if: $CI_MERGE_REQUEST_ID
|
|
581
|
+
needs: []
|
|
582
|
+
retry: *a1
|
|
583
|
+
interruptible: true
|
|
522
584
|
'app ๐จ docker | review ':
|
|
523
585
|
stage: build
|
|
524
586
|
image: path/to/docker/docker-build:the-version
|
|
@@ -736,15 +798,15 @@ app ๐งช test:
|
|
|
736
798
|
- when: on_success
|
|
737
799
|
if: $CI_MERGE_REQUEST_ID
|
|
738
800
|
needs:
|
|
739
|
-
- job: app ๐ฎ lint
|
|
801
|
+
- job: 'app ๐ฎ lint | review '
|
|
740
802
|
artifacts: false
|
|
741
803
|
- job: 'app ๐จ docker | review '
|
|
742
804
|
artifacts: false
|
|
743
|
-
- job: app ๐งช test
|
|
805
|
+
- job: 'app ๐งช test | review '
|
|
744
806
|
artifacts: false
|
|
745
807
|
- job: 'app ๐งพ sbom | review '
|
|
746
808
|
artifacts: true
|
|
747
|
-
- job: app ๐ก audit
|
|
809
|
+
- job: 'app ๐ก audit | review '
|
|
748
810
|
artifacts: false
|
|
749
811
|
retry: *a1
|
|
750
812
|
interruptible: true
|
|
@@ -1514,13 +1576,13 @@ create release:
|
|
|
1514
1576
|
- semanticRelease
|
|
1515
1577
|
- echo '๐ The project access token might be invald - run \`project-renew-token\` in catladder CLI to fix.'
|
|
1516
1578
|
rules:
|
|
1517
|
-
- &
|
|
1579
|
+
- &a4
|
|
1518
1580
|
if: $CI_COMMIT_MESSAGE =~ /^chore\\(release\\).*/
|
|
1519
1581
|
when: never
|
|
1520
|
-
- &
|
|
1582
|
+
- &a5
|
|
1521
1583
|
if: $CI_PIPELINE_SOURCE == "trigger"
|
|
1522
1584
|
when: never
|
|
1523
|
-
- &
|
|
1585
|
+
- &a6
|
|
1524
1586
|
if: $CI_PIPELINE_SOURCE == "schedule"
|
|
1525
1587
|
when: never
|
|
1526
1588
|
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
|
|
@@ -1534,9 +1596,9 @@ create release:
|
|
|
1534
1596
|
- semanticRelease
|
|
1535
1597
|
- echo '๐ The project access token might be invald - run \`project-renew-token\` in catladder CLI to fix.'
|
|
1536
1598
|
rules:
|
|
1537
|
-
- *a3
|
|
1538
1599
|
- *a4
|
|
1539
1600
|
- *a5
|
|
1601
|
+
- *a6
|
|
1540
1602
|
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
|
|
1541
1603
|
when: manual
|
|
1542
1604
|
- if: $CI_COMMIT_BRANCH =~ /^[0-9]+.([0-9]+|x).x$/
|