@catladder/pipeline 1.123.1 → 1.124.1
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/buildJob.js +1 -1
- package/dist/build/docker.d.ts +26 -6
- package/dist/build/docker.js +53 -8
- package/dist/build/node/buildJob.js +1 -1
- package/dist/build/node/meteor.js +1 -1
- package/dist/build/rails/build.js +12 -3
- package/dist/bundles/catladder-gitlab/index.js +3 -3
- package/dist/constants.js +1 -1
- package/dist/deploy/cloudRun/artifactsRegistry.d.ts +7 -4
- package/dist/deploy/cloudRun/artifactsRegistry.js +30 -23
- package/dist/deploy/cloudRun/deployJob.js +1 -1
- package/dist/deploy/dockerTag/deployJob.js +32 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/examples/__snapshots__/cloud-run-memory-limit.ts.snap +72 -76
- package/examples/__snapshots__/cloud-run-no-cpu-throttling.ts.snap +72 -76
- package/examples/__snapshots__/cloud-run-non-public.ts.snap +72 -76
- package/examples/__snapshots__/cloud-run-with-sql-reuse-db.ts.snap +144 -152
- package/examples/__snapshots__/cloud-run-with-sql.ts.snap +144 -152
- package/examples/__snapshots__/custom-build-job-with-tests.ts.snap +72 -76
- package/examples/__snapshots__/custom-build-job.ts.snap +72 -76
- package/examples/__snapshots__/custom-deploy.ts.snap +40 -28
- package/examples/__snapshots__/custom-sbom-java.ts.snap +72 -76
- package/examples/__snapshots__/kubernetes-application-customization.ts.snap +40 -28
- package/examples/__snapshots__/kubernetes-with-cloud-sql-legacy.ts.snap +40 -28
- package/examples/__snapshots__/kubernetes-with-cloud-sql.ts.snap +40 -28
- package/examples/__snapshots__/kubernetes-with-jobs.ts.snap +80 -56
- package/examples/__snapshots__/kubernetes-with-mongodb.ts.snap +40 -28
- package/examples/__snapshots__/meteor-kubernetes.ts.snap +40 -28
- package/examples/__snapshots__/native-app.ts.snap +72 -76
- package/examples/__snapshots__/node-build-with-custom-image.ts.snap +72 -76
- package/examples/__snapshots__/rails-k8s-with-worker.ts.snap +56 -52
- package/package.json +1 -1
- package/src/build/custom/buildJob.ts +1 -0
- package/src/build/docker.ts +56 -16
- package/src/build/node/buildJob.ts +1 -0
- package/src/build/node/meteor.ts +1 -1
- package/src/build/rails/build.ts +2 -2
- package/src/deploy/cloudRun/artifactsRegistry.ts +35 -32
- package/src/deploy/cloudRun/deployJob.ts +1 -8
- package/src/deploy/dockerTag/deployJob.ts +1 -1
|
@@ -176,15 +176,14 @@ jobs:
|
|
|
176
176
|
"DOCKERFILE_ADDITIONS": undefined,
|
|
177
177
|
"DOCKERFILE_ADDITIONS_END": undefined,
|
|
178
178
|
"DOCKER_BUILDKIT": "1",
|
|
179
|
-
"DOCKER_CACHE_IMAGE": "$
|
|
179
|
+
"DOCKER_CACHE_IMAGE": "$CI_REGISTRY_IMAGE/caches/app",
|
|
180
180
|
"DOCKER_DIR": ".",
|
|
181
181
|
"DOCKER_DRIVER": "overlay2",
|
|
182
182
|
"DOCKER_HOST": "tcp://0.0.0.0:2375",
|
|
183
|
-
"DOCKER_IMAGE": "$
|
|
183
|
+
"DOCKER_IMAGE": "$CI_REGISTRY_IMAGE/$DOCKER_IMAGE_NAME",
|
|
184
184
|
"DOCKER_IMAGE_NAME": "dev/app",
|
|
185
185
|
"DOCKER_IMAGE_TAG": "$CI_COMMIT_SHA",
|
|
186
186
|
"DOCKER_REGISTRY": "$CI_REGISTRY",
|
|
187
|
-
"DOCKER_REGISTRY_IMAGE_PATH": "$CI_REGISTRY_IMAGE",
|
|
188
187
|
"DOCKER_TLS_CERTDIR": "",
|
|
189
188
|
"KUBERNETES_CPU_LIMIT": "1",
|
|
190
189
|
"KUBERNETES_CPU_REQUEST": "0.5",
|
|
@@ -255,12 +254,11 @@ jobs:
|
|
|
255
254
|
"BUILD_INFO_CURRENT_VERSION": "3.2.1",
|
|
256
255
|
"BUILD_INFO_ID": "some-id",
|
|
257
256
|
"COMPONENT_NAME": "app",
|
|
258
|
-
"DOCKER_CACHE_IMAGE": "$
|
|
259
|
-
"DOCKER_IMAGE": "$
|
|
257
|
+
"DOCKER_CACHE_IMAGE": "$CI_REGISTRY_IMAGE/caches/app",
|
|
258
|
+
"DOCKER_IMAGE": "$CI_REGISTRY_IMAGE/$DOCKER_IMAGE_NAME",
|
|
260
259
|
"DOCKER_IMAGE_NAME": "dev/app",
|
|
261
260
|
"DOCKER_IMAGE_TAG": "$CI_COMMIT_SHA",
|
|
262
261
|
"DOCKER_REGISTRY": "$CI_REGISTRY",
|
|
263
|
-
"DOCKER_REGISTRY_IMAGE_PATH": "$CI_REGISTRY_IMAGE",
|
|
264
262
|
"ENV_SHORT": "dev",
|
|
265
263
|
"ENV_TYPE": "dev",
|
|
266
264
|
"HELM_ARGS": "",
|
|
@@ -765,15 +763,14 @@ jobs:
|
|
|
765
763
|
"DOCKERFILE_ADDITIONS": undefined,
|
|
766
764
|
"DOCKERFILE_ADDITIONS_END": undefined,
|
|
767
765
|
"DOCKER_BUILDKIT": "1",
|
|
768
|
-
"DOCKER_CACHE_IMAGE": "$
|
|
766
|
+
"DOCKER_CACHE_IMAGE": "$CI_REGISTRY_IMAGE/caches/app",
|
|
769
767
|
"DOCKER_DIR": ".",
|
|
770
768
|
"DOCKER_DRIVER": "overlay2",
|
|
771
769
|
"DOCKER_HOST": "tcp://0.0.0.0:2375",
|
|
772
|
-
"DOCKER_IMAGE": "$
|
|
770
|
+
"DOCKER_IMAGE": "$CI_REGISTRY_IMAGE/$DOCKER_IMAGE_NAME",
|
|
773
771
|
"DOCKER_IMAGE_NAME": "review/app",
|
|
774
772
|
"DOCKER_IMAGE_TAG": "$CI_COMMIT_SHA",
|
|
775
773
|
"DOCKER_REGISTRY": "$CI_REGISTRY",
|
|
776
|
-
"DOCKER_REGISTRY_IMAGE_PATH": "$CI_REGISTRY_IMAGE",
|
|
777
774
|
"DOCKER_TLS_CERTDIR": "",
|
|
778
775
|
"KUBERNETES_CPU_LIMIT": "1",
|
|
779
776
|
"KUBERNETES_CPU_REQUEST": "0.5",
|
|
@@ -844,12 +841,11 @@ jobs:
|
|
|
844
841
|
"BUILD_INFO_CURRENT_VERSION": "3.2.1",
|
|
845
842
|
"BUILD_INFO_ID": "some-id",
|
|
846
843
|
"COMPONENT_NAME": "app",
|
|
847
|
-
"DOCKER_CACHE_IMAGE": "$
|
|
848
|
-
"DOCKER_IMAGE": "$
|
|
844
|
+
"DOCKER_CACHE_IMAGE": "$CI_REGISTRY_IMAGE/caches/app",
|
|
845
|
+
"DOCKER_IMAGE": "$CI_REGISTRY_IMAGE/$DOCKER_IMAGE_NAME",
|
|
849
846
|
"DOCKER_IMAGE_NAME": "review/app",
|
|
850
847
|
"DOCKER_IMAGE_TAG": "$CI_COMMIT_SHA",
|
|
851
848
|
"DOCKER_REGISTRY": "$CI_REGISTRY",
|
|
852
|
-
"DOCKER_REGISTRY_IMAGE_PATH": "$CI_REGISTRY_IMAGE",
|
|
853
849
|
"ENV_SHORT": "review",
|
|
854
850
|
"ENV_TYPE": "review",
|
|
855
851
|
"HELM_ARGS": "",
|
|
@@ -1433,15 +1429,14 @@ jobs:
|
|
|
1433
1429
|
"DOCKERFILE_ADDITIONS": undefined,
|
|
1434
1430
|
"DOCKERFILE_ADDITIONS_END": undefined,
|
|
1435
1431
|
"DOCKER_BUILDKIT": "1",
|
|
1436
|
-
"DOCKER_CACHE_IMAGE": "$
|
|
1432
|
+
"DOCKER_CACHE_IMAGE": "$CI_REGISTRY_IMAGE/caches/app",
|
|
1437
1433
|
"DOCKER_DIR": ".",
|
|
1438
1434
|
"DOCKER_DRIVER": "overlay2",
|
|
1439
1435
|
"DOCKER_HOST": "tcp://0.0.0.0:2375",
|
|
1440
|
-
"DOCKER_IMAGE": "$
|
|
1436
|
+
"DOCKER_IMAGE": "$CI_REGISTRY_IMAGE/$DOCKER_IMAGE_NAME",
|
|
1441
1437
|
"DOCKER_IMAGE_NAME": "prod/app",
|
|
1442
1438
|
"DOCKER_IMAGE_TAG": "$CI_COMMIT_SHA",
|
|
1443
1439
|
"DOCKER_REGISTRY": "$CI_REGISTRY",
|
|
1444
|
-
"DOCKER_REGISTRY_IMAGE_PATH": "$CI_REGISTRY_IMAGE",
|
|
1445
1440
|
"DOCKER_TLS_CERTDIR": "",
|
|
1446
1441
|
"KUBERNETES_CPU_LIMIT": "1",
|
|
1447
1442
|
"KUBERNETES_CPU_REQUEST": "0.5",
|
|
@@ -1482,15 +1477,14 @@ jobs:
|
|
|
1482
1477
|
"DOCKERFILE_ADDITIONS": undefined,
|
|
1483
1478
|
"DOCKERFILE_ADDITIONS_END": undefined,
|
|
1484
1479
|
"DOCKER_BUILDKIT": "1",
|
|
1485
|
-
"DOCKER_CACHE_IMAGE": "$
|
|
1480
|
+
"DOCKER_CACHE_IMAGE": "$CI_REGISTRY_IMAGE/caches/app",
|
|
1486
1481
|
"DOCKER_DIR": ".",
|
|
1487
1482
|
"DOCKER_DRIVER": "overlay2",
|
|
1488
1483
|
"DOCKER_HOST": "tcp://0.0.0.0:2375",
|
|
1489
|
-
"DOCKER_IMAGE": "$
|
|
1484
|
+
"DOCKER_IMAGE": "$CI_REGISTRY_IMAGE/$DOCKER_IMAGE_NAME",
|
|
1490
1485
|
"DOCKER_IMAGE_NAME": "stage/app",
|
|
1491
1486
|
"DOCKER_IMAGE_TAG": "$CI_COMMIT_SHA",
|
|
1492
1487
|
"DOCKER_REGISTRY": "$CI_REGISTRY",
|
|
1493
|
-
"DOCKER_REGISTRY_IMAGE_PATH": "$CI_REGISTRY_IMAGE",
|
|
1494
1488
|
"DOCKER_TLS_CERTDIR": "",
|
|
1495
1489
|
"KUBERNETES_CPU_LIMIT": "1",
|
|
1496
1490
|
"KUBERNETES_CPU_REQUEST": "0.5",
|
|
@@ -1549,12 +1543,11 @@ jobs:
|
|
|
1549
1543
|
"BUILD_INFO_CURRENT_VERSION": "3.2.1",
|
|
1550
1544
|
"BUILD_INFO_ID": "some-id",
|
|
1551
1545
|
"COMPONENT_NAME": "app",
|
|
1552
|
-
"DOCKER_CACHE_IMAGE": "$
|
|
1553
|
-
"DOCKER_IMAGE": "$
|
|
1546
|
+
"DOCKER_CACHE_IMAGE": "$CI_REGISTRY_IMAGE/caches/app",
|
|
1547
|
+
"DOCKER_IMAGE": "$CI_REGISTRY_IMAGE/$DOCKER_IMAGE_NAME",
|
|
1554
1548
|
"DOCKER_IMAGE_NAME": "prod/app",
|
|
1555
1549
|
"DOCKER_IMAGE_TAG": "$CI_COMMIT_SHA",
|
|
1556
1550
|
"DOCKER_REGISTRY": "$CI_REGISTRY",
|
|
1557
|
-
"DOCKER_REGISTRY_IMAGE_PATH": "$CI_REGISTRY_IMAGE",
|
|
1558
1551
|
"ENV_SHORT": "prod",
|
|
1559
1552
|
"ENV_TYPE": "prod",
|
|
1560
1553
|
"HELM_ARGS": "",
|
|
@@ -1675,12 +1668,11 @@ jobs:
|
|
|
1675
1668
|
"BUILD_INFO_CURRENT_VERSION": "3.2.1",
|
|
1676
1669
|
"BUILD_INFO_ID": "some-id",
|
|
1677
1670
|
"COMPONENT_NAME": "app",
|
|
1678
|
-
"DOCKER_CACHE_IMAGE": "$
|
|
1679
|
-
"DOCKER_IMAGE": "$
|
|
1671
|
+
"DOCKER_CACHE_IMAGE": "$CI_REGISTRY_IMAGE/caches/app",
|
|
1672
|
+
"DOCKER_IMAGE": "$CI_REGISTRY_IMAGE/$DOCKER_IMAGE_NAME",
|
|
1680
1673
|
"DOCKER_IMAGE_NAME": "stage/app",
|
|
1681
1674
|
"DOCKER_IMAGE_TAG": "$CI_COMMIT_SHA",
|
|
1682
1675
|
"DOCKER_REGISTRY": "$CI_REGISTRY",
|
|
1683
|
-
"DOCKER_REGISTRY_IMAGE_PATH": "$CI_REGISTRY_IMAGE",
|
|
1684
1676
|
"ENV_SHORT": "stage",
|
|
1685
1677
|
"ENV_TYPE": "stage",
|
|
1686
1678
|
"HELM_ARGS": "",
|
|
@@ -2252,12 +2244,17 @@ jobs:
|
|
|
2252
2244
|
],
|
|
2253
2245
|
},
|
|
2254
2246
|
"script": [
|
|
2247
|
+
"echo -e "\\e[0Ksection_start:$(date +%s):docker-login[collapsed=true]\\r\\e[0KDocker Login"",
|
|
2255
2248
|
"docker login --username gitlab-ci-token --password $CI_JOB_TOKEN $CI_REGISTRY",
|
|
2256
|
-
"
|
|
2249
|
+
"echo -e "\\e[0Ksection_end:$(date +%s):docker-login\\r\\e[0K"",
|
|
2250
|
+
"echo -e "\\e[0Ksection_start:$(date +%s):docker-build[collapsed=true]\\r\\e[0KDocker build"",
|
|
2257
2251
|
"docker build --network host --cache-from $DOCKER_CACHE_IMAGE --tag $DOCKER_IMAGE:$DOCKER_IMAGE_TAG -f $APP_DIR/Dockerfile . --build-arg BUILDKIT_INLINE_CACHE=1",
|
|
2252
|
+
"echo -e "\\e[0Ksection_end:$(date +%s):docker-build\\r\\e[0K"",
|
|
2253
|
+
"echo -e "\\e[0Ksection_start:$(date +%s):docker-push[collapsed=true]\\r\\e[0KDocker push and tag"",
|
|
2258
2254
|
"docker push $DOCKER_IMAGE:$DOCKER_IMAGE_TAG",
|
|
2259
2255
|
"docker tag $DOCKER_IMAGE:$DOCKER_IMAGE_TAG $DOCKER_CACHE_IMAGE",
|
|
2260
2256
|
"docker push $DOCKER_CACHE_IMAGE",
|
|
2257
|
+
"echo -e "\\e[0Ksection_end:$(date +%s):docker-push\\r\\e[0K"",
|
|
2261
2258
|
],
|
|
2262
2259
|
"services": [
|
|
2263
2260
|
{
|
|
@@ -2273,15 +2270,14 @@ jobs:
|
|
|
2273
2270
|
"DOCKERFILE_ADDITIONS": undefined,
|
|
2274
2271
|
"DOCKERFILE_ADDITIONS_END": undefined,
|
|
2275
2272
|
"DOCKER_BUILDKIT": "1",
|
|
2276
|
-
"DOCKER_CACHE_IMAGE": "$
|
|
2273
|
+
"DOCKER_CACHE_IMAGE": "$CI_REGISTRY_IMAGE/caches/app",
|
|
2277
2274
|
"DOCKER_DIR": ".",
|
|
2278
2275
|
"DOCKER_DRIVER": "overlay2",
|
|
2279
2276
|
"DOCKER_HOST": "tcp://0.0.0.0:2375",
|
|
2280
|
-
"DOCKER_IMAGE": "$
|
|
2277
|
+
"DOCKER_IMAGE": "$CI_REGISTRY_IMAGE/$DOCKER_IMAGE_NAME",
|
|
2281
2278
|
"DOCKER_IMAGE_NAME": "dev/app",
|
|
2282
2279
|
"DOCKER_IMAGE_TAG": "$CI_COMMIT_SHA",
|
|
2283
2280
|
"DOCKER_REGISTRY": "$CI_REGISTRY",
|
|
2284
|
-
"DOCKER_REGISTRY_IMAGE_PATH": "$CI_REGISTRY_IMAGE",
|
|
2285
2281
|
"DOCKER_TLS_CERTDIR": "",
|
|
2286
2282
|
"KUBERNETES_CPU_LIMIT": "1",
|
|
2287
2283
|
"KUBERNETES_CPU_REQUEST": "0.5",
|
|
@@ -2352,12 +2348,11 @@ jobs:
|
|
|
2352
2348
|
"BUILD_INFO_CURRENT_VERSION": "3.2.1",
|
|
2353
2349
|
"BUILD_INFO_ID": "some-id",
|
|
2354
2350
|
"COMPONENT_NAME": "app",
|
|
2355
|
-
"DOCKER_CACHE_IMAGE": "$
|
|
2356
|
-
"DOCKER_IMAGE": "$
|
|
2351
|
+
"DOCKER_CACHE_IMAGE": "$CI_REGISTRY_IMAGE/caches/app",
|
|
2352
|
+
"DOCKER_IMAGE": "$CI_REGISTRY_IMAGE/$DOCKER_IMAGE_NAME",
|
|
2357
2353
|
"DOCKER_IMAGE_NAME": "dev/app",
|
|
2358
2354
|
"DOCKER_IMAGE_TAG": "$CI_COMMIT_SHA",
|
|
2359
2355
|
"DOCKER_REGISTRY": "$CI_REGISTRY",
|
|
2360
|
-
"DOCKER_REGISTRY_IMAGE_PATH": "$CI_REGISTRY_IMAGE",
|
|
2361
2356
|
"ENV_SHORT": "dev",
|
|
2362
2357
|
"ENV_TYPE": "dev",
|
|
2363
2358
|
"HELM_ARGS": "",
|
|
@@ -2841,12 +2836,17 @@ jobs:
|
|
|
2841
2836
|
],
|
|
2842
2837
|
},
|
|
2843
2838
|
"script": [
|
|
2839
|
+
"echo -e "\\e[0Ksection_start:$(date +%s):docker-login[collapsed=true]\\r\\e[0KDocker Login"",
|
|
2844
2840
|
"docker login --username gitlab-ci-token --password $CI_JOB_TOKEN $CI_REGISTRY",
|
|
2845
|
-
"
|
|
2841
|
+
"echo -e "\\e[0Ksection_end:$(date +%s):docker-login\\r\\e[0K"",
|
|
2842
|
+
"echo -e "\\e[0Ksection_start:$(date +%s):docker-build[collapsed=true]\\r\\e[0KDocker build"",
|
|
2846
2843
|
"docker build --network host --cache-from $DOCKER_CACHE_IMAGE --tag $DOCKER_IMAGE:$DOCKER_IMAGE_TAG -f $APP_DIR/Dockerfile . --build-arg BUILDKIT_INLINE_CACHE=1",
|
|
2844
|
+
"echo -e "\\e[0Ksection_end:$(date +%s):docker-build\\r\\e[0K"",
|
|
2845
|
+
"echo -e "\\e[0Ksection_start:$(date +%s):docker-push[collapsed=true]\\r\\e[0KDocker push and tag"",
|
|
2847
2846
|
"docker push $DOCKER_IMAGE:$DOCKER_IMAGE_TAG",
|
|
2848
2847
|
"docker tag $DOCKER_IMAGE:$DOCKER_IMAGE_TAG $DOCKER_CACHE_IMAGE",
|
|
2849
2848
|
"docker push $DOCKER_CACHE_IMAGE",
|
|
2849
|
+
"echo -e "\\e[0Ksection_end:$(date +%s):docker-push\\r\\e[0K"",
|
|
2850
2850
|
],
|
|
2851
2851
|
"services": [
|
|
2852
2852
|
{
|
|
@@ -2862,15 +2862,14 @@ jobs:
|
|
|
2862
2862
|
"DOCKERFILE_ADDITIONS": undefined,
|
|
2863
2863
|
"DOCKERFILE_ADDITIONS_END": undefined,
|
|
2864
2864
|
"DOCKER_BUILDKIT": "1",
|
|
2865
|
-
"DOCKER_CACHE_IMAGE": "$
|
|
2865
|
+
"DOCKER_CACHE_IMAGE": "$CI_REGISTRY_IMAGE/caches/app",
|
|
2866
2866
|
"DOCKER_DIR": ".",
|
|
2867
2867
|
"DOCKER_DRIVER": "overlay2",
|
|
2868
2868
|
"DOCKER_HOST": "tcp://0.0.0.0:2375",
|
|
2869
|
-
"DOCKER_IMAGE": "$
|
|
2869
|
+
"DOCKER_IMAGE": "$CI_REGISTRY_IMAGE/$DOCKER_IMAGE_NAME",
|
|
2870
2870
|
"DOCKER_IMAGE_NAME": "review/app",
|
|
2871
2871
|
"DOCKER_IMAGE_TAG": "$CI_COMMIT_SHA",
|
|
2872
2872
|
"DOCKER_REGISTRY": "$CI_REGISTRY",
|
|
2873
|
-
"DOCKER_REGISTRY_IMAGE_PATH": "$CI_REGISTRY_IMAGE",
|
|
2874
2873
|
"DOCKER_TLS_CERTDIR": "",
|
|
2875
2874
|
"KUBERNETES_CPU_LIMIT": "1",
|
|
2876
2875
|
"KUBERNETES_CPU_REQUEST": "0.5",
|
|
@@ -2941,12 +2940,11 @@ jobs:
|
|
|
2941
2940
|
"BUILD_INFO_CURRENT_VERSION": "3.2.1",
|
|
2942
2941
|
"BUILD_INFO_ID": "some-id",
|
|
2943
2942
|
"COMPONENT_NAME": "app",
|
|
2944
|
-
"DOCKER_CACHE_IMAGE": "$
|
|
2945
|
-
"DOCKER_IMAGE": "$
|
|
2943
|
+
"DOCKER_CACHE_IMAGE": "$CI_REGISTRY_IMAGE/caches/app",
|
|
2944
|
+
"DOCKER_IMAGE": "$CI_REGISTRY_IMAGE/$DOCKER_IMAGE_NAME",
|
|
2946
2945
|
"DOCKER_IMAGE_NAME": "review/app",
|
|
2947
2946
|
"DOCKER_IMAGE_TAG": "$CI_COMMIT_SHA",
|
|
2948
2947
|
"DOCKER_REGISTRY": "$CI_REGISTRY",
|
|
2949
|
-
"DOCKER_REGISTRY_IMAGE_PATH": "$CI_REGISTRY_IMAGE",
|
|
2950
2948
|
"ENV_SHORT": "review",
|
|
2951
2949
|
"ENV_TYPE": "review",
|
|
2952
2950
|
"HELM_ARGS": "",
|
|
@@ -3509,12 +3507,17 @@ jobs:
|
|
|
3509
3507
|
],
|
|
3510
3508
|
},
|
|
3511
3509
|
"script": [
|
|
3510
|
+
"echo -e "\\e[0Ksection_start:$(date +%s):docker-login[collapsed=true]\\r\\e[0KDocker Login"",
|
|
3512
3511
|
"docker login --username gitlab-ci-token --password $CI_JOB_TOKEN $CI_REGISTRY",
|
|
3513
|
-
"
|
|
3512
|
+
"echo -e "\\e[0Ksection_end:$(date +%s):docker-login\\r\\e[0K"",
|
|
3513
|
+
"echo -e "\\e[0Ksection_start:$(date +%s):docker-build[collapsed=true]\\r\\e[0KDocker build"",
|
|
3514
3514
|
"docker build --network host --cache-from $DOCKER_CACHE_IMAGE --tag $DOCKER_IMAGE:$DOCKER_IMAGE_TAG -f $APP_DIR/Dockerfile . --build-arg BUILDKIT_INLINE_CACHE=1",
|
|
3515
|
+
"echo -e "\\e[0Ksection_end:$(date +%s):docker-build\\r\\e[0K"",
|
|
3516
|
+
"echo -e "\\e[0Ksection_start:$(date +%s):docker-push[collapsed=true]\\r\\e[0KDocker push and tag"",
|
|
3515
3517
|
"docker push $DOCKER_IMAGE:$DOCKER_IMAGE_TAG",
|
|
3516
3518
|
"docker tag $DOCKER_IMAGE:$DOCKER_IMAGE_TAG $DOCKER_CACHE_IMAGE",
|
|
3517
3519
|
"docker push $DOCKER_CACHE_IMAGE",
|
|
3520
|
+
"echo -e "\\e[0Ksection_end:$(date +%s):docker-push\\r\\e[0K"",
|
|
3518
3521
|
],
|
|
3519
3522
|
"services": [
|
|
3520
3523
|
{
|
|
@@ -3530,15 +3533,14 @@ jobs:
|
|
|
3530
3533
|
"DOCKERFILE_ADDITIONS": undefined,
|
|
3531
3534
|
"DOCKERFILE_ADDITIONS_END": undefined,
|
|
3532
3535
|
"DOCKER_BUILDKIT": "1",
|
|
3533
|
-
"DOCKER_CACHE_IMAGE": "$
|
|
3536
|
+
"DOCKER_CACHE_IMAGE": "$CI_REGISTRY_IMAGE/caches/app",
|
|
3534
3537
|
"DOCKER_DIR": ".",
|
|
3535
3538
|
"DOCKER_DRIVER": "overlay2",
|
|
3536
3539
|
"DOCKER_HOST": "tcp://0.0.0.0:2375",
|
|
3537
|
-
"DOCKER_IMAGE": "$
|
|
3540
|
+
"DOCKER_IMAGE": "$CI_REGISTRY_IMAGE/$DOCKER_IMAGE_NAME",
|
|
3538
3541
|
"DOCKER_IMAGE_NAME": "prod/app",
|
|
3539
3542
|
"DOCKER_IMAGE_TAG": "$CI_COMMIT_SHA",
|
|
3540
3543
|
"DOCKER_REGISTRY": "$CI_REGISTRY",
|
|
3541
|
-
"DOCKER_REGISTRY_IMAGE_PATH": "$CI_REGISTRY_IMAGE",
|
|
3542
3544
|
"DOCKER_TLS_CERTDIR": "",
|
|
3543
3545
|
"KUBERNETES_CPU_LIMIT": "1",
|
|
3544
3546
|
"KUBERNETES_CPU_REQUEST": "0.5",
|
|
@@ -3558,12 +3560,17 @@ jobs:
|
|
|
3558
3560
|
],
|
|
3559
3561
|
},
|
|
3560
3562
|
"script": [
|
|
3563
|
+
"echo -e "\\e[0Ksection_start:$(date +%s):docker-login[collapsed=true]\\r\\e[0KDocker Login"",
|
|
3561
3564
|
"docker login --username gitlab-ci-token --password $CI_JOB_TOKEN $CI_REGISTRY",
|
|
3562
|
-
"
|
|
3565
|
+
"echo -e "\\e[0Ksection_end:$(date +%s):docker-login\\r\\e[0K"",
|
|
3566
|
+
"echo -e "\\e[0Ksection_start:$(date +%s):docker-build[collapsed=true]\\r\\e[0KDocker build"",
|
|
3563
3567
|
"docker build --network host --cache-from $DOCKER_CACHE_IMAGE --tag $DOCKER_IMAGE:$DOCKER_IMAGE_TAG -f $APP_DIR/Dockerfile . --build-arg BUILDKIT_INLINE_CACHE=1",
|
|
3568
|
+
"echo -e "\\e[0Ksection_end:$(date +%s):docker-build\\r\\e[0K"",
|
|
3569
|
+
"echo -e "\\e[0Ksection_start:$(date +%s):docker-push[collapsed=true]\\r\\e[0KDocker push and tag"",
|
|
3564
3570
|
"docker push $DOCKER_IMAGE:$DOCKER_IMAGE_TAG",
|
|
3565
3571
|
"docker tag $DOCKER_IMAGE:$DOCKER_IMAGE_TAG $DOCKER_CACHE_IMAGE",
|
|
3566
3572
|
"docker push $DOCKER_CACHE_IMAGE",
|
|
3573
|
+
"echo -e "\\e[0Ksection_end:$(date +%s):docker-push\\r\\e[0K"",
|
|
3567
3574
|
],
|
|
3568
3575
|
"services": [
|
|
3569
3576
|
{
|
|
@@ -3579,15 +3586,14 @@ jobs:
|
|
|
3579
3586
|
"DOCKERFILE_ADDITIONS": undefined,
|
|
3580
3587
|
"DOCKERFILE_ADDITIONS_END": undefined,
|
|
3581
3588
|
"DOCKER_BUILDKIT": "1",
|
|
3582
|
-
"DOCKER_CACHE_IMAGE": "$
|
|
3589
|
+
"DOCKER_CACHE_IMAGE": "$CI_REGISTRY_IMAGE/caches/app",
|
|
3583
3590
|
"DOCKER_DIR": ".",
|
|
3584
3591
|
"DOCKER_DRIVER": "overlay2",
|
|
3585
3592
|
"DOCKER_HOST": "tcp://0.0.0.0:2375",
|
|
3586
|
-
"DOCKER_IMAGE": "$
|
|
3593
|
+
"DOCKER_IMAGE": "$CI_REGISTRY_IMAGE/$DOCKER_IMAGE_NAME",
|
|
3587
3594
|
"DOCKER_IMAGE_NAME": "stage/app",
|
|
3588
3595
|
"DOCKER_IMAGE_TAG": "$CI_COMMIT_SHA",
|
|
3589
3596
|
"DOCKER_REGISTRY": "$CI_REGISTRY",
|
|
3590
|
-
"DOCKER_REGISTRY_IMAGE_PATH": "$CI_REGISTRY_IMAGE",
|
|
3591
3597
|
"DOCKER_TLS_CERTDIR": "",
|
|
3592
3598
|
"KUBERNETES_CPU_LIMIT": "1",
|
|
3593
3599
|
"KUBERNETES_CPU_REQUEST": "0.5",
|
|
@@ -3646,12 +3652,11 @@ jobs:
|
|
|
3646
3652
|
"BUILD_INFO_CURRENT_VERSION": "3.2.1",
|
|
3647
3653
|
"BUILD_INFO_ID": "some-id",
|
|
3648
3654
|
"COMPONENT_NAME": "app",
|
|
3649
|
-
"DOCKER_CACHE_IMAGE": "$
|
|
3650
|
-
"DOCKER_IMAGE": "$
|
|
3655
|
+
"DOCKER_CACHE_IMAGE": "$CI_REGISTRY_IMAGE/caches/app",
|
|
3656
|
+
"DOCKER_IMAGE": "$CI_REGISTRY_IMAGE/$DOCKER_IMAGE_NAME",
|
|
3651
3657
|
"DOCKER_IMAGE_NAME": "prod/app",
|
|
3652
3658
|
"DOCKER_IMAGE_TAG": "$CI_COMMIT_SHA",
|
|
3653
3659
|
"DOCKER_REGISTRY": "$CI_REGISTRY",
|
|
3654
|
-
"DOCKER_REGISTRY_IMAGE_PATH": "$CI_REGISTRY_IMAGE",
|
|
3655
3660
|
"ENV_SHORT": "prod",
|
|
3656
3661
|
"ENV_TYPE": "prod",
|
|
3657
3662
|
"HELM_ARGS": "",
|
|
@@ -3772,12 +3777,11 @@ jobs:
|
|
|
3772
3777
|
"BUILD_INFO_CURRENT_VERSION": "3.2.1",
|
|
3773
3778
|
"BUILD_INFO_ID": "some-id",
|
|
3774
3779
|
"COMPONENT_NAME": "app",
|
|
3775
|
-
"DOCKER_CACHE_IMAGE": "$
|
|
3776
|
-
"DOCKER_IMAGE": "$
|
|
3780
|
+
"DOCKER_CACHE_IMAGE": "$CI_REGISTRY_IMAGE/caches/app",
|
|
3781
|
+
"DOCKER_IMAGE": "$CI_REGISTRY_IMAGE/$DOCKER_IMAGE_NAME",
|
|
3777
3782
|
"DOCKER_IMAGE_NAME": "stage/app",
|
|
3778
3783
|
"DOCKER_IMAGE_TAG": "$CI_COMMIT_SHA",
|
|
3779
3784
|
"DOCKER_REGISTRY": "$CI_REGISTRY",
|
|
3780
|
-
"DOCKER_REGISTRY_IMAGE_PATH": "$CI_REGISTRY_IMAGE",
|
|
3781
3785
|
"ENV_SHORT": "stage",
|
|
3782
3786
|
"ENV_TYPE": "stage",
|
|
3783
3787
|
"HELM_ARGS": "",
|
package/package.json
CHANGED
package/src/build/docker.ts
CHANGED
|
@@ -5,6 +5,13 @@ import type { Context } from "../types";
|
|
|
5
5
|
import type { CatladderJob } from "../types/jobs";
|
|
6
6
|
import { existsSync } from "fs";
|
|
7
7
|
import path from "path";
|
|
8
|
+
import { collapseableSection } from "../utils/gitlab";
|
|
9
|
+
import {
|
|
10
|
+
getArtifactsRegistryBuildCacheImage,
|
|
11
|
+
getArtifactsRegistryHost,
|
|
12
|
+
getArtifactsRegistryImageName,
|
|
13
|
+
} from "../deploy/cloudRun/artifactsRegistry";
|
|
14
|
+
import { gcloudServiceAccountLoginCommands } from "../deploy/cloudRun/utils/gcloudServiceAccountLoginCommands";
|
|
8
15
|
|
|
9
16
|
const DOCKER_RUNNER_BUILD_VARIABLES = {
|
|
10
17
|
KUBERNETES_CPU_REQUEST: "0.5",
|
|
@@ -15,13 +22,24 @@ const DOCKER_RUNNER_BUILD_VARIABLES = {
|
|
|
15
22
|
|
|
16
23
|
export const getDockerImageVariables = (context: Context) => {
|
|
17
24
|
return {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
+
...(isOfDeployType(context.componentConfig.deploy, "google-cloudrun")
|
|
26
|
+
? {
|
|
27
|
+
DOCKER_REGISTRY: getArtifactsRegistryHost(context),
|
|
28
|
+
DOCKER_IMAGE: getArtifactsRegistryImageName(context),
|
|
29
|
+
DOCKER_CACHE_IMAGE: getArtifactsRegistryBuildCacheImage(context),
|
|
30
|
+
}
|
|
31
|
+
: // gitlab registry:
|
|
32
|
+
{
|
|
33
|
+
DOCKER_REGISTRY: "$CI_REGISTRY",
|
|
34
|
+
|
|
35
|
+
DOCKER_CACHE_IMAGE:
|
|
36
|
+
"$CI_REGISTRY_IMAGE/caches/" + context.componentName,
|
|
37
|
+
// ONLY USED IN KUBERNETES
|
|
38
|
+
DOCKER_IMAGE_NAME:
|
|
39
|
+
context.environment.shortName + "/" + context.componentName,
|
|
40
|
+
DOCKER_IMAGE: "$CI_REGISTRY_IMAGE/$DOCKER_IMAGE_NAME",
|
|
41
|
+
}),
|
|
42
|
+
|
|
25
43
|
DOCKER_IMAGE_TAG: "$CI_COMMIT_SHA",
|
|
26
44
|
};
|
|
27
45
|
};
|
|
@@ -93,18 +111,40 @@ export const createDockerBuildJobBase = (
|
|
|
93
111
|
);
|
|
94
112
|
};
|
|
95
113
|
|
|
96
|
-
export const gitlabDockerLogin =
|
|
97
|
-
"
|
|
114
|
+
export const gitlabDockerLogin = (context: Context) =>
|
|
115
|
+
isOfDeployType(context.componentConfig.deploy, "google-cloudrun")
|
|
116
|
+
? [
|
|
117
|
+
...gcloudServiceAccountLoginCommands(context),
|
|
118
|
+
`gcloud auth configure-docker ${getArtifactsRegistryHost(context)}`,
|
|
119
|
+
]
|
|
120
|
+
: [
|
|
121
|
+
"docker login --username gitlab-ci-token --password $CI_JOB_TOKEN $CI_REGISTRY",
|
|
122
|
+
];
|
|
98
123
|
|
|
99
|
-
export const getDockerBuildDefaultScript = (
|
|
124
|
+
export const getDockerBuildDefaultScript = (
|
|
125
|
+
context: Context,
|
|
126
|
+
ensureDockerFileScript?: string
|
|
127
|
+
) =>
|
|
100
128
|
[
|
|
101
129
|
ensureDockerFileScript,
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
130
|
+
...collapseableSection(
|
|
131
|
+
"docker-login",
|
|
132
|
+
"Docker Login"
|
|
133
|
+
)(gitlabDockerLogin(context)),
|
|
134
|
+
...collapseableSection(
|
|
135
|
+
"docker-build",
|
|
136
|
+
"Docker build"
|
|
137
|
+
)([
|
|
138
|
+
"docker build --network host --cache-from $DOCKER_CACHE_IMAGE --tag $DOCKER_IMAGE:$DOCKER_IMAGE_TAG -f $APP_DIR/Dockerfile . --build-arg BUILDKIT_INLINE_CACHE=1", //BUILDKIT_INLINE_CACHE, see https://testdriven.io/blog/faster-ci-builds-with-docker-cache/
|
|
139
|
+
]),
|
|
140
|
+
...collapseableSection(
|
|
141
|
+
"docker-push",
|
|
142
|
+
"Docker push and tag"
|
|
143
|
+
)([
|
|
144
|
+
"docker push $DOCKER_IMAGE:$DOCKER_IMAGE_TAG",
|
|
145
|
+
"docker tag $DOCKER_IMAGE:$DOCKER_IMAGE_TAG $DOCKER_CACHE_IMAGE",
|
|
146
|
+
"docker push $DOCKER_CACHE_IMAGE",
|
|
147
|
+
]),
|
|
108
148
|
].filter(Boolean);
|
|
109
149
|
|
|
110
150
|
export const hasDockerfile = (context: Context) =>
|
|
@@ -60,6 +60,7 @@ export const createNodeBuildJobs = (context: Context): CatladderJob[] => {
|
|
|
60
60
|
|
|
61
61
|
dockerBuild: {
|
|
62
62
|
script: getDockerBuildDefaultScript(
|
|
63
|
+
context,
|
|
63
64
|
buildConfig.type === "node-static" || buildConfig.type === "storybook"
|
|
64
65
|
? "ensureNginxDockerfile"
|
|
65
66
|
: "ensureNodeDockerfile"
|
package/src/build/node/meteor.ts
CHANGED
|
@@ -64,7 +64,7 @@ export const createMeteorBuildJobs = (context: Context): CatladderJob[] => {
|
|
|
64
64
|
}
|
|
65
65
|
: undefined,
|
|
66
66
|
dockerBuild: {
|
|
67
|
-
script: getDockerBuildDefaultScript("ensureMeteorDockerfile"),
|
|
67
|
+
script: getDockerBuildDefaultScript(context, "ensureMeteorDockerfile"),
|
|
68
68
|
variables: {
|
|
69
69
|
METEOR_INSTALL_SCRIPTS: buildConfig.installScripts ? "true" : "",
|
|
70
70
|
},
|
package/src/build/rails/build.ts
CHANGED
|
@@ -19,7 +19,7 @@ export const createRailsBuildJobs = (context: Context): CatladderJob[] => {
|
|
|
19
19
|
return createBuildJobs(context, {
|
|
20
20
|
appBuild: undefined,
|
|
21
21
|
dockerBuild: {
|
|
22
|
-
script: getDockerBuildDefaultScript(),
|
|
22
|
+
script: getDockerBuildDefaultScript(context),
|
|
23
23
|
variables: {},
|
|
24
24
|
},
|
|
25
25
|
});
|
|
@@ -39,7 +39,7 @@ export const createRailsBuildJobs = (context: Context): CatladderJob[] => {
|
|
|
39
39
|
},
|
|
40
40
|
// custom script
|
|
41
41
|
script: [
|
|
42
|
-
gitlabDockerLogin,
|
|
42
|
+
...gitlabDockerLogin(context),
|
|
43
43
|
`docker pull $DOCKER_CACHE_IMAGE || true`,
|
|
44
44
|
`wget --output-document=- https://github.com/buildpacks/pack/releases/download/v${cnbConf?.packVersion}/pack-v${cnbConf?.packVersion}-linux.tgz | tar -zx --directory /usr/local/bin pack`,
|
|
45
45
|
`chmod +x /usr/local/bin/pack`,
|
|
@@ -1,9 +1,33 @@
|
|
|
1
|
-
import { gitlabDockerLogin } from "../../build/docker";
|
|
2
1
|
import type { Context } from "../../types/context";
|
|
3
2
|
import { allowFailureInScripts } from "../../utils/gitlab";
|
|
4
3
|
import { isOfDeployType } from "../types";
|
|
5
4
|
import { removeFirstLinesFromCommandOutput } from "./utils/removeFirstLinesFromCommandOutput";
|
|
6
5
|
|
|
6
|
+
export const getArtifactsRegistryHost = ({
|
|
7
|
+
componentConfig: { deploy },
|
|
8
|
+
}: Context) => {
|
|
9
|
+
if (!isOfDeployType(deploy, "google-cloudrun")) {
|
|
10
|
+
// should not happen
|
|
11
|
+
throw new Error("deploy config is wrong");
|
|
12
|
+
}
|
|
13
|
+
return `${deploy.region}-docker.pkg.dev`;
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
export const getArtifactsRegistryDockerUrl = (context: Context) => {
|
|
17
|
+
const deployConfig = context.componentConfig.deploy;
|
|
18
|
+
|
|
19
|
+
if (!isOfDeployType(deployConfig, "google-cloudrun")) {
|
|
20
|
+
// should not happen
|
|
21
|
+
throw new Error("deploy config is wrong");
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
const fullAppName = `${context.fullConfig.customerName}-${context.fullConfig.appName}`;
|
|
25
|
+
|
|
26
|
+
return `${getArtifactsRegistryHost(context)}/${
|
|
27
|
+
deployConfig.projectId
|
|
28
|
+
}/catladder-deploy/${fullAppName}`;
|
|
29
|
+
};
|
|
30
|
+
|
|
7
31
|
/**
|
|
8
32
|
*
|
|
9
33
|
* lecacyReviewImageName is only temporary. In old versions the images had no reviewslug in review apps, which makes cleanup harder. We delete all those images now, but need the path
|
|
@@ -12,19 +36,11 @@ export const getArtifactsRegistryImageName = (
|
|
|
12
36
|
context: Context,
|
|
13
37
|
lecacyReviewImageName = false
|
|
14
38
|
) => {
|
|
15
|
-
const deployConfig = context.componentConfig.deploy;
|
|
16
|
-
|
|
17
|
-
if (!isOfDeployType(deployConfig, "google-cloudrun")) {
|
|
18
|
-
// should not happen
|
|
19
|
-
throw new Error("deploy config is wrong");
|
|
20
|
-
}
|
|
21
|
-
|
|
22
39
|
if (lecacyReviewImageName && context.environment.envType !== "review") {
|
|
23
40
|
throw new Error("lecacyReviewImageName is only allowed for review app");
|
|
24
41
|
}
|
|
25
|
-
const fullAppName = `${context.fullConfig.customerName}-${context.fullConfig.appName}`;
|
|
26
42
|
|
|
27
|
-
const dockerUrl =
|
|
43
|
+
const dockerUrl = getArtifactsRegistryDockerUrl(context);
|
|
28
44
|
const gcloudImagePath = [
|
|
29
45
|
dockerUrl,
|
|
30
46
|
context.environment.shortName,
|
|
@@ -37,31 +53,16 @@ export const getArtifactsRegistryImageName = (
|
|
|
37
53
|
return gcloudImagePath.join("/");
|
|
38
54
|
};
|
|
39
55
|
|
|
56
|
+
export const getArtifactsRegistryBuildCacheImage = (context: Context) => {
|
|
57
|
+
const dockerUrl = getArtifactsRegistryDockerUrl(context);
|
|
58
|
+
// does not include env, so that after merge, you might get more cache hits (review-->dev)
|
|
59
|
+
const gcloudImagePath = [dockerUrl, "caches", context.componentName];
|
|
60
|
+
return gcloudImagePath.join("/");
|
|
61
|
+
};
|
|
62
|
+
|
|
40
63
|
export const getArtifactsRegistryImage = (context: Context) =>
|
|
41
64
|
`${getArtifactsRegistryImageName(context)}:$DOCKER_IMAGE_TAG`;
|
|
42
65
|
|
|
43
|
-
/**
|
|
44
|
-
* commands to pull the image from the default registry and pushes it to google artifact registry. We might build and push directly to google artifact registry in the future
|
|
45
|
-
*/
|
|
46
|
-
export const getPushToArtifactsRegistryCommands = (context: Context) => {
|
|
47
|
-
const deployConfig = context.componentConfig.deploy;
|
|
48
|
-
|
|
49
|
-
if (!isOfDeployType(deployConfig, "google-cloudrun")) {
|
|
50
|
-
// should not happen
|
|
51
|
-
throw new Error("deploy config is wrong");
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
const fullImageName = getArtifactsRegistryImageName(context);
|
|
55
|
-
|
|
56
|
-
return [
|
|
57
|
-
gitlabDockerLogin,
|
|
58
|
-
`gcloud auth configure-docker ${deployConfig.region}-docker.pkg.dev`,
|
|
59
|
-
`docker pull $DOCKER_IMAGE:$DOCKER_IMAGE_TAG`,
|
|
60
|
-
`docker tag $DOCKER_IMAGE:$DOCKER_IMAGE_TAG ${fullImageName}:$DOCKER_IMAGE_TAG`,
|
|
61
|
-
`docker push ${fullImageName}:$DOCKER_IMAGE_TAG`,
|
|
62
|
-
];
|
|
63
|
-
};
|
|
64
|
-
|
|
65
66
|
const getDeleteImageCommands = (fullImageName: string, keepNewest = 0) => {
|
|
66
67
|
if (keepNewest === 0) {
|
|
67
68
|
// no need to list tags, we delete the whole thing
|
|
@@ -101,9 +102,11 @@ export const getDeleteUnusedImagesCommands = (context: Context, keep = 0) => {
|
|
|
101
102
|
}
|
|
102
103
|
|
|
103
104
|
const fullImageName = getArtifactsRegistryImageName(context);
|
|
105
|
+
const buildCacheImageName = getArtifactsRegistryBuildCacheImage(context);
|
|
104
106
|
|
|
105
107
|
return [
|
|
106
108
|
...getDeleteImageCommands(fullImageName, keep),
|
|
109
|
+
...getDeleteImageCommands(buildCacheImageName, 1),
|
|
107
110
|
// because a recent version of catladder had no review-slug in the image name, we have to delete those as well
|
|
108
111
|
// we can later remove this line in some months
|
|
109
112
|
|
|
@@ -26,10 +26,7 @@ import {
|
|
|
26
26
|
} from "./utils/database";
|
|
27
27
|
import { gcloudServiceAccountLoginCommands } from "./utils/gcloudServiceAccountLoginCommands";
|
|
28
28
|
import { getCloudRunJobName } from "./utils/jobName";
|
|
29
|
-
import {
|
|
30
|
-
getArtifactsRegistryImage,
|
|
31
|
-
getPushToArtifactsRegistryCommands,
|
|
32
|
-
} from "./artifactsRegistry";
|
|
29
|
+
import { getArtifactsRegistryImage } from "./artifactsRegistry";
|
|
33
30
|
import { getServiceName } from "./utils/getServiceName";
|
|
34
31
|
import { getRemoveOldRevisionsAndImagesCommand } from "./cleanup";
|
|
35
32
|
|
|
@@ -219,10 +216,6 @@ export const createGoogleCloudRunDeployJobs = (
|
|
|
219
216
|
...gcloudServiceAccountLoginCommands(context),
|
|
220
217
|
...setExtraVarsScripts(deployConfig),
|
|
221
218
|
]),
|
|
222
|
-
...collapseableSection(
|
|
223
|
-
"pushToArtifactRegistry",
|
|
224
|
-
"Pushing image to artifacts registry"
|
|
225
|
-
)(getPushToArtifactsRegistryCommands(context)),
|
|
226
219
|
...collapseableSection(
|
|
227
220
|
"deploy",
|
|
228
221
|
"Deploy to cloud run"
|
|
@@ -19,7 +19,7 @@ export const createDockerTagDeployJobs = (context: Context): CatladderJob[] => {
|
|
|
19
19
|
deploy: {
|
|
20
20
|
...getDockerJobBaseProps(context),
|
|
21
21
|
script: [
|
|
22
|
-
gitlabDockerLogin,
|
|
22
|
+
...gitlabDockerLogin(context),
|
|
23
23
|
`docker pull $DOCKER_IMAGE:$DOCKER_IMAGE_TAG`,
|
|
24
24
|
`docker tag $DOCKER_IMAGE:$DOCKER_IMAGE_TAG $DOCKER_IMAGE:${tag}`,
|
|
25
25
|
`docker push $DOCKER_IMAGE:${tag}`,
|