@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
|
|
@@ -254,7 +245,7 @@ api 🧪 test:
|
|
|
254
245
|
- if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi
|
|
255
246
|
- collapseable_section_end "nodeinstall"
|
|
256
247
|
- collapseable_section_start "yarninstall" "Yarn install"
|
|
257
|
-
- yarn install --immutable
|
|
248
|
+
- yarn install --immutable --inline-builds
|
|
258
249
|
- collapseable_section_end "yarninstall"
|
|
259
250
|
- yarn build
|
|
260
251
|
cache:
|
|
@@ -309,7 +300,8 @@ api 🧪 test:
|
|
|
309
300
|
- export DOCKER_IMAGE="$CI_REGISTRY_IMAGE/$DOCKER_IMAGE_NAME"
|
|
310
301
|
- export DOCKER_IMAGE_TAG="$CI_COMMIT_SHA"
|
|
311
302
|
- |-
|
|
312
|
-
export DOCKER_COPY_AND_INSTALL_APP="
|
|
303
|
+
export DOCKER_COPY_AND_INSTALL_APP="ENV YARN_ENABLE_INLINE_BUILDS=1
|
|
304
|
+
COPY --chown=node:node $APP_DIR .
|
|
313
305
|
RUN yarn plugin import workspace-tools
|
|
314
306
|
RUN yarn workspaces focus --production && yarn rebuild"
|
|
315
307
|
- |-
|
|
@@ -521,17 +513,17 @@ api 🧪 test:
|
|
|
521
513
|
- when: on_success
|
|
522
514
|
if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && $CI_COMMIT_MESSAGE !~ /^chore\\(release\\).*/
|
|
523
515
|
needs:
|
|
524
|
-
- job: api 👮 lint
|
|
516
|
+
- job: 'api 👮 lint | dev '
|
|
525
517
|
artifacts: false
|
|
526
518
|
- job: 'api 🔨 app | dev '
|
|
527
519
|
artifacts: false
|
|
528
520
|
- job: 'api 🔨 docker | dev '
|
|
529
521
|
artifacts: false
|
|
530
|
-
- job: api 🧪 test
|
|
522
|
+
- job: 'api 🧪 test | dev '
|
|
531
523
|
artifacts: false
|
|
532
524
|
- job: 'api 🧾 sbom | dev '
|
|
533
525
|
artifacts: true
|
|
534
|
-
- job: api 🛡 audit
|
|
526
|
+
- job: 'api 🛡 audit | dev '
|
|
535
527
|
artifacts: false
|
|
536
528
|
retry: *a1
|
|
537
529
|
interruptible: true
|
|
@@ -640,6 +632,115 @@ api 🧪 test:
|
|
|
640
632
|
retry: *a1
|
|
641
633
|
interruptible: true
|
|
642
634
|
allow_failure: true
|
|
635
|
+
'api 🛡 audit | review ':
|
|
636
|
+
stage: test
|
|
637
|
+
image: path/to/docker/jobs-default:the-version
|
|
638
|
+
variables:
|
|
639
|
+
KUBERNETES_CPU_REQUEST: '0.45'
|
|
640
|
+
KUBERNETES_MEMORY_REQUEST: 1Gi
|
|
641
|
+
KUBERNETES_MEMORY_LIMIT: 4Gi
|
|
642
|
+
script:
|
|
643
|
+
- collapseable_section_start "injectvars" "Injecting variables"
|
|
644
|
+
- export APP_PATH="api"
|
|
645
|
+
- collapseable_section_end "injectvars"
|
|
646
|
+
- cd api
|
|
647
|
+
- yarn npm audit --environment production
|
|
648
|
+
rules:
|
|
649
|
+
- when: never
|
|
650
|
+
if: $CI_PIPELINE_SOURCE == "trigger"
|
|
651
|
+
- if: $CI_MERGE_REQUEST_ID
|
|
652
|
+
needs: []
|
|
653
|
+
retry: *a1
|
|
654
|
+
interruptible: true
|
|
655
|
+
allow_failure: true
|
|
656
|
+
'api 👮 lint | review ':
|
|
657
|
+
stage: test
|
|
658
|
+
image: path/to/docker/jobs-default:the-version
|
|
659
|
+
variables:
|
|
660
|
+
KUBERNETES_CPU_REQUEST: '0.45'
|
|
661
|
+
KUBERNETES_MEMORY_REQUEST: 1Gi
|
|
662
|
+
KUBERNETES_MEMORY_LIMIT: 4Gi
|
|
663
|
+
script:
|
|
664
|
+
- collapseable_section_start "injectvars" "Injecting variables"
|
|
665
|
+
- export APP_PATH="api"
|
|
666
|
+
- collapseable_section_end "injectvars"
|
|
667
|
+
- collapseable_section_start "nodeinstall" "Ensure node version"
|
|
668
|
+
- if [ -f ~/.nvm/nvm.sh ]; then source ~/.nvm/nvm.sh; fi
|
|
669
|
+
- if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi
|
|
670
|
+
- collapseable_section_end "nodeinstall"
|
|
671
|
+
- cd api
|
|
672
|
+
- collapseable_section_start "nodeinstall" "Ensure node version"
|
|
673
|
+
- if [ -f ~/.nvm/nvm.sh ]; then source ~/.nvm/nvm.sh; fi
|
|
674
|
+
- if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi
|
|
675
|
+
- collapseable_section_end "nodeinstall"
|
|
676
|
+
- collapseable_section_start "yarninstall" "Yarn install"
|
|
677
|
+
- yarn install --immutable --inline-builds
|
|
678
|
+
- collapseable_section_end "yarninstall"
|
|
679
|
+
- yarn lint
|
|
680
|
+
cache:
|
|
681
|
+
- key: api-yarn-mr$CI_MERGE_REQUEST_IID
|
|
682
|
+
policy: pull-push
|
|
683
|
+
paths:
|
|
684
|
+
- api/.yarn
|
|
685
|
+
fallback_keys:
|
|
686
|
+
- api-yarn
|
|
687
|
+
- key: api-node-modules-mr$CI_MERGE_REQUEST_IID
|
|
688
|
+
policy: pull-push
|
|
689
|
+
paths:
|
|
690
|
+
- api/node_modules
|
|
691
|
+
fallback_keys:
|
|
692
|
+
- api-node-modules
|
|
693
|
+
rules:
|
|
694
|
+
- when: never
|
|
695
|
+
if: $CI_PIPELINE_SOURCE == "trigger"
|
|
696
|
+
- if: $CI_MERGE_REQUEST_ID
|
|
697
|
+
needs: []
|
|
698
|
+
retry: *a1
|
|
699
|
+
interruptible: true
|
|
700
|
+
'api 🧪 test | review ':
|
|
701
|
+
stage: test
|
|
702
|
+
image: path/to/docker/jobs-testing-chrome:the-version
|
|
703
|
+
variables:
|
|
704
|
+
KUBERNETES_CPU_REQUEST: '0.45'
|
|
705
|
+
KUBERNETES_MEMORY_REQUEST: 1Gi
|
|
706
|
+
KUBERNETES_MEMORY_LIMIT: 4Gi
|
|
707
|
+
script:
|
|
708
|
+
- collapseable_section_start "injectvars" "Injecting variables"
|
|
709
|
+
- export APP_PATH="api"
|
|
710
|
+
- collapseable_section_end "injectvars"
|
|
711
|
+
- collapseable_section_start "nodeinstall" "Ensure node version"
|
|
712
|
+
- if [ -f ~/.nvm/nvm.sh ]; then source ~/.nvm/nvm.sh; fi
|
|
713
|
+
- if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi
|
|
714
|
+
- collapseable_section_end "nodeinstall"
|
|
715
|
+
- cd api
|
|
716
|
+
- collapseable_section_start "nodeinstall" "Ensure node version"
|
|
717
|
+
- if [ -f ~/.nvm/nvm.sh ]; then source ~/.nvm/nvm.sh; fi
|
|
718
|
+
- if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi
|
|
719
|
+
- collapseable_section_end "nodeinstall"
|
|
720
|
+
- collapseable_section_start "yarninstall" "Yarn install"
|
|
721
|
+
- yarn install --immutable --inline-builds
|
|
722
|
+
- collapseable_section_end "yarninstall"
|
|
723
|
+
- yarn test
|
|
724
|
+
cache:
|
|
725
|
+
- key: api-yarn-mr$CI_MERGE_REQUEST_IID
|
|
726
|
+
policy: pull-push
|
|
727
|
+
paths:
|
|
728
|
+
- api/.yarn
|
|
729
|
+
fallback_keys:
|
|
730
|
+
- api-yarn
|
|
731
|
+
- key: api-node-modules-mr$CI_MERGE_REQUEST_IID
|
|
732
|
+
policy: pull-push
|
|
733
|
+
paths:
|
|
734
|
+
- api/node_modules
|
|
735
|
+
fallback_keys:
|
|
736
|
+
- api-node-modules
|
|
737
|
+
rules:
|
|
738
|
+
- when: never
|
|
739
|
+
if: $CI_PIPELINE_SOURCE == "trigger"
|
|
740
|
+
- if: $CI_MERGE_REQUEST_ID
|
|
741
|
+
needs: []
|
|
742
|
+
retry: *a1
|
|
743
|
+
interruptible: true
|
|
643
744
|
'api 🔨 app | review ':
|
|
644
745
|
stage: build
|
|
645
746
|
image: path/to/docker/jobs-default:the-version
|
|
@@ -677,18 +778,22 @@ api 🧪 test:
|
|
|
677
778
|
- if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi
|
|
678
779
|
- collapseable_section_end "nodeinstall"
|
|
679
780
|
- collapseable_section_start "yarninstall" "Yarn install"
|
|
680
|
-
- yarn install --immutable
|
|
781
|
+
- yarn install --immutable --inline-builds
|
|
681
782
|
- collapseable_section_end "yarninstall"
|
|
682
783
|
- yarn build
|
|
683
784
|
cache:
|
|
684
|
-
- key: api-yarn
|
|
785
|
+
- key: api-yarn-mr$CI_MERGE_REQUEST_IID
|
|
685
786
|
policy: pull-push
|
|
686
787
|
paths:
|
|
687
788
|
- api/.yarn
|
|
688
|
-
|
|
789
|
+
fallback_keys:
|
|
790
|
+
- api-yarn
|
|
791
|
+
- key: api-node-modules-mr$CI_MERGE_REQUEST_IID
|
|
689
792
|
policy: pull-push
|
|
690
793
|
paths:
|
|
691
794
|
- api/node_modules
|
|
795
|
+
fallback_keys:
|
|
796
|
+
- api-node-modules
|
|
692
797
|
artifacts:
|
|
693
798
|
paths:
|
|
694
799
|
- api/__build_info.json
|
|
@@ -732,7 +837,8 @@ api 🧪 test:
|
|
|
732
837
|
- export DOCKER_IMAGE="$CI_REGISTRY_IMAGE/$DOCKER_IMAGE_NAME"
|
|
733
838
|
- export DOCKER_IMAGE_TAG="$CI_COMMIT_SHA"
|
|
734
839
|
- |-
|
|
735
|
-
export DOCKER_COPY_AND_INSTALL_APP="
|
|
840
|
+
export DOCKER_COPY_AND_INSTALL_APP="ENV YARN_ENABLE_INLINE_BUILDS=1
|
|
841
|
+
COPY --chown=node:node $APP_DIR .
|
|
736
842
|
RUN yarn plugin import workspace-tools
|
|
737
843
|
RUN yarn workspaces focus --production && yarn rebuild"
|
|
738
844
|
- |-
|
|
@@ -754,10 +860,12 @@ api 🧪 test:
|
|
|
754
860
|
- docker push $DOCKER_CACHE_IMAGE
|
|
755
861
|
- collapseable_section_end "docker-push"
|
|
756
862
|
cache:
|
|
757
|
-
- key: api-yarn
|
|
863
|
+
- key: api-yarn-mr$CI_MERGE_REQUEST_IID
|
|
758
864
|
policy: pull
|
|
759
865
|
paths:
|
|
760
866
|
- api/.yarn
|
|
867
|
+
fallback_keys:
|
|
868
|
+
- api-yarn
|
|
761
869
|
rules:
|
|
762
870
|
- when: never
|
|
763
871
|
if: $CI_PIPELINE_SOURCE == "trigger"
|
|
@@ -945,17 +1053,17 @@ api 🧪 test:
|
|
|
945
1053
|
- when: on_success
|
|
946
1054
|
if: $CI_MERGE_REQUEST_ID
|
|
947
1055
|
needs:
|
|
948
|
-
- job: api 👮 lint
|
|
1056
|
+
- job: 'api 👮 lint | review '
|
|
949
1057
|
artifacts: false
|
|
950
1058
|
- job: 'api 🔨 app | review '
|
|
951
1059
|
artifacts: false
|
|
952
1060
|
- job: 'api 🔨 docker | review '
|
|
953
1061
|
artifacts: false
|
|
954
|
-
- job: api 🧪 test
|
|
1062
|
+
- job: 'api 🧪 test | review '
|
|
955
1063
|
artifacts: false
|
|
956
1064
|
- job: 'api 🧾 sbom | review '
|
|
957
1065
|
artifacts: true
|
|
958
|
-
- job: api 🛡 audit
|
|
1066
|
+
- job: 'api 🛡 audit | review '
|
|
959
1067
|
artifacts: false
|
|
960
1068
|
retry: *a1
|
|
961
1069
|
interruptible: true
|
|
@@ -1101,7 +1209,7 @@ api 🧪 test:
|
|
|
1101
1209
|
- if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi
|
|
1102
1210
|
- collapseable_section_end "nodeinstall"
|
|
1103
1211
|
- collapseable_section_start "yarninstall" "Yarn install"
|
|
1104
|
-
- yarn install --immutable
|
|
1212
|
+
- yarn install --immutable --inline-builds
|
|
1105
1213
|
- collapseable_section_end "yarninstall"
|
|
1106
1214
|
- yarn build
|
|
1107
1215
|
cache:
|
|
@@ -1156,7 +1264,8 @@ api 🧪 test:
|
|
|
1156
1264
|
- export DOCKER_IMAGE="$CI_REGISTRY_IMAGE/$DOCKER_IMAGE_NAME"
|
|
1157
1265
|
- export DOCKER_IMAGE_TAG="$CI_COMMIT_SHA"
|
|
1158
1266
|
- |-
|
|
1159
|
-
export DOCKER_COPY_AND_INSTALL_APP="
|
|
1267
|
+
export DOCKER_COPY_AND_INSTALL_APP="ENV YARN_ENABLE_INLINE_BUILDS=1
|
|
1268
|
+
COPY --chown=node:node $APP_DIR .
|
|
1160
1269
|
RUN yarn plugin import workspace-tools
|
|
1161
1270
|
RUN yarn workspaces focus --production && yarn rebuild"
|
|
1162
1271
|
- |-
|
|
@@ -1517,7 +1626,7 @@ api 🧪 test:
|
|
|
1517
1626
|
- if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi
|
|
1518
1627
|
- collapseable_section_end "nodeinstall"
|
|
1519
1628
|
- collapseable_section_start "yarninstall" "Yarn install"
|
|
1520
|
-
- yarn install --immutable
|
|
1629
|
+
- yarn install --immutable --inline-builds
|
|
1521
1630
|
- collapseable_section_end "yarninstall"
|
|
1522
1631
|
- yarn build
|
|
1523
1632
|
cache:
|
|
@@ -1572,7 +1681,8 @@ api 🧪 test:
|
|
|
1572
1681
|
- export DOCKER_IMAGE="$CI_REGISTRY_IMAGE/$DOCKER_IMAGE_NAME"
|
|
1573
1682
|
- export DOCKER_IMAGE_TAG="$CI_COMMIT_SHA"
|
|
1574
1683
|
- |-
|
|
1575
|
-
export DOCKER_COPY_AND_INSTALL_APP="
|
|
1684
|
+
export DOCKER_COPY_AND_INSTALL_APP="ENV YARN_ENABLE_INLINE_BUILDS=1
|
|
1685
|
+
COPY --chown=node:node $APP_DIR .
|
|
1576
1686
|
RUN yarn plugin import workspace-tools
|
|
1577
1687
|
RUN yarn workspaces focus --production && yarn rebuild"
|
|
1578
1688
|
- |-
|
|
@@ -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
|
|
@@ -253,7 +244,7 @@ api 🧪 test:
|
|
|
253
244
|
- if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi
|
|
254
245
|
- collapseable_section_end "nodeinstall"
|
|
255
246
|
- collapseable_section_start "yarninstall" "Yarn install"
|
|
256
|
-
- yarn install --immutable
|
|
247
|
+
- yarn install --immutable --inline-builds
|
|
257
248
|
- collapseable_section_end "yarninstall"
|
|
258
249
|
- yarn build
|
|
259
250
|
cache:
|
|
@@ -307,7 +298,8 @@ api 🧪 test:
|
|
|
307
298
|
- export DOCKER_CACHE_IMAGE="europe-west6-docker.pkg.dev/google-project-id/catladder-deploy/pan-test-app/caches/api"
|
|
308
299
|
- export DOCKER_IMAGE_TAG="$CI_COMMIT_SHA"
|
|
309
300
|
- |-
|
|
310
|
-
export DOCKER_COPY_AND_INSTALL_APP="
|
|
301
|
+
export DOCKER_COPY_AND_INSTALL_APP="ENV YARN_ENABLE_INLINE_BUILDS=1
|
|
302
|
+
COPY --chown=node:node $APP_DIR .
|
|
311
303
|
RUN yarn plugin import workspace-tools
|
|
312
304
|
RUN yarn workspaces focus --production && yarn rebuild"
|
|
313
305
|
- |-
|
|
@@ -460,17 +452,17 @@ api 🧪 test:
|
|
|
460
452
|
- when: on_success
|
|
461
453
|
if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && $CI_COMMIT_MESSAGE !~ /^chore\\(release\\).*/
|
|
462
454
|
needs:
|
|
463
|
-
- job: api 👮 lint
|
|
455
|
+
- job: 'api 👮 lint | dev '
|
|
464
456
|
artifacts: false
|
|
465
457
|
- job: 'api 🔨 app | dev '
|
|
466
458
|
artifacts: false
|
|
467
459
|
- job: 'api 🔨 docker | dev '
|
|
468
460
|
artifacts: false
|
|
469
|
-
- job: api 🧪 test
|
|
461
|
+
- job: 'api 🧪 test | dev '
|
|
470
462
|
artifacts: false
|
|
471
463
|
- job: 'api 🧾 sbom | dev '
|
|
472
464
|
artifacts: true
|
|
473
|
-
- job: api 🛡 audit
|
|
465
|
+
- job: 'api 🛡 audit | dev '
|
|
474
466
|
artifacts: false
|
|
475
467
|
retry: *a1
|
|
476
468
|
interruptible: true
|
|
@@ -509,6 +501,115 @@ api 🧪 test:
|
|
|
509
501
|
retry: *a1
|
|
510
502
|
interruptible: true
|
|
511
503
|
allow_failure: true
|
|
504
|
+
'api 🛡 audit | review ':
|
|
505
|
+
stage: test
|
|
506
|
+
image: path/to/docker/jobs-default:the-version
|
|
507
|
+
variables:
|
|
508
|
+
KUBERNETES_CPU_REQUEST: '0.45'
|
|
509
|
+
KUBERNETES_MEMORY_REQUEST: 1Gi
|
|
510
|
+
KUBERNETES_MEMORY_LIMIT: 4Gi
|
|
511
|
+
script:
|
|
512
|
+
- collapseable_section_start "injectvars" "Injecting variables"
|
|
513
|
+
- export APP_PATH="api"
|
|
514
|
+
- collapseable_section_end "injectvars"
|
|
515
|
+
- cd api
|
|
516
|
+
- yarn npm audit --environment production
|
|
517
|
+
rules:
|
|
518
|
+
- when: never
|
|
519
|
+
if: $CI_PIPELINE_SOURCE == "trigger"
|
|
520
|
+
- if: $CI_MERGE_REQUEST_ID
|
|
521
|
+
needs: []
|
|
522
|
+
retry: *a1
|
|
523
|
+
interruptible: true
|
|
524
|
+
allow_failure: true
|
|
525
|
+
'api 👮 lint | review ':
|
|
526
|
+
stage: test
|
|
527
|
+
image: path/to/docker/jobs-default:the-version
|
|
528
|
+
variables:
|
|
529
|
+
KUBERNETES_CPU_REQUEST: '0.45'
|
|
530
|
+
KUBERNETES_MEMORY_REQUEST: 1Gi
|
|
531
|
+
KUBERNETES_MEMORY_LIMIT: 4Gi
|
|
532
|
+
script:
|
|
533
|
+
- collapseable_section_start "injectvars" "Injecting variables"
|
|
534
|
+
- export APP_PATH="api"
|
|
535
|
+
- collapseable_section_end "injectvars"
|
|
536
|
+
- collapseable_section_start "nodeinstall" "Ensure node version"
|
|
537
|
+
- if [ -f ~/.nvm/nvm.sh ]; then source ~/.nvm/nvm.sh; fi
|
|
538
|
+
- if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi
|
|
539
|
+
- collapseable_section_end "nodeinstall"
|
|
540
|
+
- cd api
|
|
541
|
+
- collapseable_section_start "nodeinstall" "Ensure node version"
|
|
542
|
+
- if [ -f ~/.nvm/nvm.sh ]; then source ~/.nvm/nvm.sh; fi
|
|
543
|
+
- if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi
|
|
544
|
+
- collapseable_section_end "nodeinstall"
|
|
545
|
+
- collapseable_section_start "yarninstall" "Yarn install"
|
|
546
|
+
- yarn install --immutable --inline-builds
|
|
547
|
+
- collapseable_section_end "yarninstall"
|
|
548
|
+
- yarn lint
|
|
549
|
+
cache:
|
|
550
|
+
- key: api-yarn-mr$CI_MERGE_REQUEST_IID
|
|
551
|
+
policy: pull-push
|
|
552
|
+
paths:
|
|
553
|
+
- api/.yarn
|
|
554
|
+
fallback_keys:
|
|
555
|
+
- api-yarn
|
|
556
|
+
- key: api-node-modules-mr$CI_MERGE_REQUEST_IID
|
|
557
|
+
policy: pull-push
|
|
558
|
+
paths:
|
|
559
|
+
- api/node_modules
|
|
560
|
+
fallback_keys:
|
|
561
|
+
- api-node-modules
|
|
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
|
+
'api 🧪 test | review ':
|
|
570
|
+
stage: test
|
|
571
|
+
image: path/to/docker/jobs-testing-chrome:the-version
|
|
572
|
+
variables:
|
|
573
|
+
KUBERNETES_CPU_REQUEST: '0.45'
|
|
574
|
+
KUBERNETES_MEMORY_REQUEST: 1Gi
|
|
575
|
+
KUBERNETES_MEMORY_LIMIT: 4Gi
|
|
576
|
+
script:
|
|
577
|
+
- collapseable_section_start "injectvars" "Injecting variables"
|
|
578
|
+
- export APP_PATH="api"
|
|
579
|
+
- collapseable_section_end "injectvars"
|
|
580
|
+
- collapseable_section_start "nodeinstall" "Ensure node version"
|
|
581
|
+
- if [ -f ~/.nvm/nvm.sh ]; then source ~/.nvm/nvm.sh; fi
|
|
582
|
+
- if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi
|
|
583
|
+
- collapseable_section_end "nodeinstall"
|
|
584
|
+
- cd api
|
|
585
|
+
- collapseable_section_start "nodeinstall" "Ensure node version"
|
|
586
|
+
- if [ -f ~/.nvm/nvm.sh ]; then source ~/.nvm/nvm.sh; fi
|
|
587
|
+
- if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi
|
|
588
|
+
- collapseable_section_end "nodeinstall"
|
|
589
|
+
- collapseable_section_start "yarninstall" "Yarn install"
|
|
590
|
+
- yarn install --immutable --inline-builds
|
|
591
|
+
- collapseable_section_end "yarninstall"
|
|
592
|
+
- yarn test
|
|
593
|
+
cache:
|
|
594
|
+
- key: api-yarn-mr$CI_MERGE_REQUEST_IID
|
|
595
|
+
policy: pull-push
|
|
596
|
+
paths:
|
|
597
|
+
- api/.yarn
|
|
598
|
+
fallback_keys:
|
|
599
|
+
- api-yarn
|
|
600
|
+
- key: api-node-modules-mr$CI_MERGE_REQUEST_IID
|
|
601
|
+
policy: pull-push
|
|
602
|
+
paths:
|
|
603
|
+
- api/node_modules
|
|
604
|
+
fallback_keys:
|
|
605
|
+
- api-node-modules
|
|
606
|
+
rules:
|
|
607
|
+
- when: never
|
|
608
|
+
if: $CI_PIPELINE_SOURCE == "trigger"
|
|
609
|
+
- if: $CI_MERGE_REQUEST_ID
|
|
610
|
+
needs: []
|
|
611
|
+
retry: *a1
|
|
612
|
+
interruptible: true
|
|
512
613
|
'api 🔨 app | review ':
|
|
513
614
|
stage: build
|
|
514
615
|
image: path/to/docker/jobs-default:the-version
|
|
@@ -545,18 +646,22 @@ api 🧪 test:
|
|
|
545
646
|
- if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi
|
|
546
647
|
- collapseable_section_end "nodeinstall"
|
|
547
648
|
- collapseable_section_start "yarninstall" "Yarn install"
|
|
548
|
-
- yarn install --immutable
|
|
649
|
+
- yarn install --immutable --inline-builds
|
|
549
650
|
- collapseable_section_end "yarninstall"
|
|
550
651
|
- yarn build
|
|
551
652
|
cache:
|
|
552
|
-
- key: api-yarn
|
|
653
|
+
- key: api-yarn-mr$CI_MERGE_REQUEST_IID
|
|
553
654
|
policy: pull-push
|
|
554
655
|
paths:
|
|
555
656
|
- api/.yarn
|
|
556
|
-
|
|
657
|
+
fallback_keys:
|
|
658
|
+
- api-yarn
|
|
659
|
+
- key: api-node-modules-mr$CI_MERGE_REQUEST_IID
|
|
557
660
|
policy: pull-push
|
|
558
661
|
paths:
|
|
559
662
|
- api/node_modules
|
|
663
|
+
fallback_keys:
|
|
664
|
+
- api-node-modules
|
|
560
665
|
artifacts:
|
|
561
666
|
paths:
|
|
562
667
|
- api/__build_info.json
|
|
@@ -599,7 +704,8 @@ api 🧪 test:
|
|
|
599
704
|
- export DOCKER_CACHE_IMAGE="europe-west6-docker.pkg.dev/google-project-id/catladder-deploy/pan-test-app/caches/api"
|
|
600
705
|
- export DOCKER_IMAGE_TAG="$CI_COMMIT_SHA"
|
|
601
706
|
- |-
|
|
602
|
-
export DOCKER_COPY_AND_INSTALL_APP="
|
|
707
|
+
export DOCKER_COPY_AND_INSTALL_APP="ENV YARN_ENABLE_INLINE_BUILDS=1
|
|
708
|
+
COPY --chown=node:node $APP_DIR .
|
|
603
709
|
RUN yarn plugin import workspace-tools
|
|
604
710
|
RUN yarn workspaces focus --production && yarn rebuild"
|
|
605
711
|
- |-
|
|
@@ -622,10 +728,12 @@ api 🧪 test:
|
|
|
622
728
|
- docker push $DOCKER_CACHE_IMAGE
|
|
623
729
|
- collapseable_section_end "docker-push"
|
|
624
730
|
cache:
|
|
625
|
-
- key: api-yarn
|
|
731
|
+
- key: api-yarn-mr$CI_MERGE_REQUEST_IID
|
|
626
732
|
policy: pull
|
|
627
733
|
paths:
|
|
628
734
|
- api/.yarn
|
|
735
|
+
fallback_keys:
|
|
736
|
+
- api-yarn
|
|
629
737
|
rules:
|
|
630
738
|
- when: never
|
|
631
739
|
if: $CI_PIPELINE_SOURCE == "trigger"
|
|
@@ -755,17 +863,17 @@ api 🧪 test:
|
|
|
755
863
|
- when: on_success
|
|
756
864
|
if: $CI_MERGE_REQUEST_ID
|
|
757
865
|
needs:
|
|
758
|
-
- job: api 👮 lint
|
|
866
|
+
- job: 'api 👮 lint | review '
|
|
759
867
|
artifacts: false
|
|
760
868
|
- job: 'api 🔨 app | review '
|
|
761
869
|
artifacts: false
|
|
762
870
|
- job: 'api 🔨 docker | review '
|
|
763
871
|
artifacts: false
|
|
764
|
-
- job: api 🧪 test
|
|
872
|
+
- job: 'api 🧪 test | review '
|
|
765
873
|
artifacts: false
|
|
766
874
|
- job: 'api 🧾 sbom | review '
|
|
767
875
|
artifacts: true
|
|
768
|
-
- job: api 🛡 audit
|
|
876
|
+
- job: 'api 🛡 audit | review '
|
|
769
877
|
artifacts: false
|
|
770
878
|
retry: *a1
|
|
771
879
|
interruptible: true
|
|
@@ -843,7 +951,7 @@ api 🧪 test:
|
|
|
843
951
|
- if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi
|
|
844
952
|
- collapseable_section_end "nodeinstall"
|
|
845
953
|
- collapseable_section_start "yarninstall" "Yarn install"
|
|
846
|
-
- yarn install --immutable
|
|
954
|
+
- yarn install --immutable --inline-builds
|
|
847
955
|
- collapseable_section_end "yarninstall"
|
|
848
956
|
- yarn build
|
|
849
957
|
cache:
|
|
@@ -897,7 +1005,8 @@ api 🧪 test:
|
|
|
897
1005
|
- export DOCKER_CACHE_IMAGE="europe-west6-docker.pkg.dev/google-project-id/catladder-deploy/pan-test-app/caches/api"
|
|
898
1006
|
- export DOCKER_IMAGE_TAG="$CI_COMMIT_SHA"
|
|
899
1007
|
- |-
|
|
900
|
-
export DOCKER_COPY_AND_INSTALL_APP="
|
|
1008
|
+
export DOCKER_COPY_AND_INSTALL_APP="ENV YARN_ENABLE_INLINE_BUILDS=1
|
|
1009
|
+
COPY --chown=node:node $APP_DIR .
|
|
901
1010
|
RUN yarn plugin import workspace-tools
|
|
902
1011
|
RUN yarn workspaces focus --production && yarn rebuild"
|
|
903
1012
|
- |-
|
|
@@ -1128,7 +1237,7 @@ api 🧪 test:
|
|
|
1128
1237
|
- if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi
|
|
1129
1238
|
- collapseable_section_end "nodeinstall"
|
|
1130
1239
|
- collapseable_section_start "yarninstall" "Yarn install"
|
|
1131
|
-
- yarn install --immutable
|
|
1240
|
+
- yarn install --immutable --inline-builds
|
|
1132
1241
|
- collapseable_section_end "yarninstall"
|
|
1133
1242
|
- yarn build
|
|
1134
1243
|
cache:
|
|
@@ -1182,7 +1291,8 @@ api 🧪 test:
|
|
|
1182
1291
|
- export DOCKER_CACHE_IMAGE="europe-west6-docker.pkg.dev/google-project-id/catladder-deploy/pan-test-app/caches/api"
|
|
1183
1292
|
- export DOCKER_IMAGE_TAG="$CI_COMMIT_SHA"
|
|
1184
1293
|
- |-
|
|
1185
|
-
export DOCKER_COPY_AND_INSTALL_APP="
|
|
1294
|
+
export DOCKER_COPY_AND_INSTALL_APP="ENV YARN_ENABLE_INLINE_BUILDS=1
|
|
1295
|
+
COPY --chown=node:node $APP_DIR .
|
|
1186
1296
|
RUN yarn plugin import workspace-tools
|
|
1187
1297
|
RUN yarn workspaces focus --production && yarn rebuild"
|
|
1188
1298
|
- |-
|