@catladder/pipeline 1.157.0 → 1.158.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.
@@ -9,8 +9,8 @@ exports[`matches snapshot 1`] = `
9
9
  "artifacts": {
10
10
  "expire_in": "1 day",
11
11
  "paths": [
12
- "__build_info.json",
13
- "dist",
12
+ "app/__build_info.json",
13
+ "app/dist",
14
14
  ],
15
15
  "reports": {
16
16
  "junit": undefined,
@@ -31,7 +31,7 @@ exports[`matches snapshot 1`] = `
31
31
  "script": [
32
32
  "echo -e "\\e[0Ksection_start:$(date +%s):injectvars[collapsed=true]\\r\\e[0KInjecting variables"",
33
33
  "export ENV_SHORT="dev"",
34
- "export APP_DIR="."",
34
+ "export APP_DIR="app"",
35
35
  "export ENV_TYPE="dev"",
36
36
  "export BUILD_INFO_BUILD_ID="$(git describe --tags 2>/dev/null || git rev-parse HEAD)"",
37
37
  "export BUILD_INFO_BUILD_TIME="$CI_JOB_STARTED_AT"",
@@ -47,12 +47,12 @@ exports[`matches snapshot 1`] = `
47
47
  "export GCLOUD_RUN_canonicalHostSuffix="$CL_dev_app_GCLOUD_RUN_canonicalHostSuffix"",
48
48
  "export _ALL_ENV_VAR_KEYS="[\\"ENV_SHORT\\",\\"APP_DIR\\",\\"ENV_TYPE\\",\\"BUILD_INFO_BUILD_ID\\",\\"BUILD_INFO_BUILD_TIME\\",\\"BUILD_INFO_CURRENT_VERSION\\",\\"HOST\\",\\"ROOT_URL\\",\\"HOST_INTERNAL\\",\\"HOST_CANONICAL\\",\\"ROOT_URL_INTERNAL\\",\\"DEPLOY_CLOUD_RUN_PROJECT_ID\\",\\"DEPLOY_CLOUD_RUN_REGION\\",\\"GCLOUD_DEPLOY_credentialsKey\\",\\"GCLOUD_RUN_canonicalHostSuffix\\"]"",
49
49
  "echo -e "\\e[0Ksection_end:$(date +%s):injectvars\\r\\e[0K"",
50
- "echo '{"id":"$(git describe --tags 2>/dev/null || git rev-parse HEAD)","time":"$CI_JOB_STARTED_AT"}' > ./__build_info.json",
50
+ "echo '{"id":"$(git describe --tags 2>/dev/null || git rev-parse HEAD)","time":"$CI_JOB_STARTED_AT"}' > app/__build_info.json",
51
51
  "echo -e "\\e[0Ksection_start:$(date +%s):nodeinstall[collapsed=true]\\r\\e[0KEnsure node version"",
52
52
  "if [ -f ~/.nvm/nvm.sh ]; then source ~/.nvm/nvm.sh; fi",
53
53
  "if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi",
54
54
  "echo -e "\\e[0Ksection_end:$(date +%s):nodeinstall\\r\\e[0K"",
55
- "cd .",
55
+ "cd app",
56
56
  "mvn package",
57
57
  "cp -r target dist",
58
58
  ],
@@ -78,8 +78,8 @@ exports[`matches snapshot 1`] = `
78
78
  },
79
79
  "script": [
80
80
  "echo -e "\\e[0Ksection_start:$(date +%s):injectvars[collapsed=true]\\r\\e[0KInjecting variables"",
81
- "export APP_DIR="."",
82
- "export DOCKER_BUILD_CONTEXT="."",
81
+ "export APP_DIR="app"",
82
+ "export DOCKER_BUILD_CONTEXT="app"",
83
83
  "export DOCKER_REGISTRY="asia-east1-docker.pkg.dev"",
84
84
  "export DOCKER_IMAGE="asia-east1-docker.pkg.dev/asdf/catladder-deploy/pan-test-app/dev/app"",
85
85
  "export DOCKER_CACHE_IMAGE="asia-east1-docker.pkg.dev/asdf/catladder-deploy/pan-test-app/caches/app"",
@@ -161,7 +161,7 @@ exports[`matches snapshot 1`] = `
161
161
  "script": [
162
162
  "echo -e "\\e[0Ksection_start:$(date +%s):injectvars[collapsed=true]\\r\\e[0KInjecting variables"",
163
163
  "export ENV_SHORT="dev"",
164
- "export APP_DIR="."",
164
+ "export APP_DIR="app"",
165
165
  "export ENV_TYPE="dev"",
166
166
  "export BUILD_INFO_BUILD_ID="$(git describe --tags 2>/dev/null || git rev-parse HEAD)"",
167
167
  "export BUILD_INFO_BUILD_TIME="$CI_JOB_STARTED_AT"",
@@ -192,7 +192,7 @@ exports[`matches snapshot 1`] = `
192
192
  ENV_SHORT: |-
193
193
  dev
194
194
  APP_DIR: |-
195
- .
195
+ app
196
196
  ENV_TYPE: |-
197
197
  dev
198
198
  BUILD_INFO_BUILD_ID: |-
@@ -398,8 +398,8 @@ EOF
398
398
  "artifacts": {
399
399
  "expire_in": "1 day",
400
400
  "paths": [
401
- "__build_info.json",
402
- "dist",
401
+ "app/__build_info.json",
402
+ "app/dist",
403
403
  ],
404
404
  "reports": {
405
405
  "junit": undefined,
@@ -420,7 +420,7 @@ EOF
420
420
  "script": [
421
421
  "echo -e "\\e[0Ksection_start:$(date +%s):injectvars[collapsed=true]\\r\\e[0KInjecting variables"",
422
422
  "export ENV_SHORT="review"",
423
- "export APP_DIR="."",
423
+ "export APP_DIR="app"",
424
424
  "export ENV_TYPE="review"",
425
425
  "export BUILD_INFO_BUILD_ID="$(git describe --tags 2>/dev/null || git rev-parse HEAD)"",
426
426
  "export BUILD_INFO_BUILD_TIME="$CI_JOB_STARTED_AT"",
@@ -436,12 +436,12 @@ EOF
436
436
  "export GCLOUD_RUN_canonicalHostSuffix="$CL_review_app_GCLOUD_RUN_canonicalHostSuffix"",
437
437
  "export _ALL_ENV_VAR_KEYS="[\\"ENV_SHORT\\",\\"APP_DIR\\",\\"ENV_TYPE\\",\\"BUILD_INFO_BUILD_ID\\",\\"BUILD_INFO_BUILD_TIME\\",\\"BUILD_INFO_CURRENT_VERSION\\",\\"HOST\\",\\"ROOT_URL\\",\\"HOST_INTERNAL\\",\\"HOST_CANONICAL\\",\\"ROOT_URL_INTERNAL\\",\\"DEPLOY_CLOUD_RUN_PROJECT_ID\\",\\"DEPLOY_CLOUD_RUN_REGION\\",\\"GCLOUD_DEPLOY_credentialsKey\\",\\"GCLOUD_RUN_canonicalHostSuffix\\"]"",
438
438
  "echo -e "\\e[0Ksection_end:$(date +%s):injectvars\\r\\e[0K"",
439
- "echo '{"id":"$(git describe --tags 2>/dev/null || git rev-parse HEAD)","time":"$CI_JOB_STARTED_AT"}' > ./__build_info.json",
439
+ "echo '{"id":"$(git describe --tags 2>/dev/null || git rev-parse HEAD)","time":"$CI_JOB_STARTED_AT"}' > app/__build_info.json",
440
440
  "echo -e "\\e[0Ksection_start:$(date +%s):nodeinstall[collapsed=true]\\r\\e[0KEnsure node version"",
441
441
  "if [ -f ~/.nvm/nvm.sh ]; then source ~/.nvm/nvm.sh; fi",
442
442
  "if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi",
443
443
  "echo -e "\\e[0Ksection_end:$(date +%s):nodeinstall\\r\\e[0K"",
444
- "cd .",
444
+ "cd app",
445
445
  "mvn package",
446
446
  "cp -r target dist",
447
447
  ],
@@ -467,8 +467,8 @@ EOF
467
467
  },
468
468
  "script": [
469
469
  "echo -e "\\e[0Ksection_start:$(date +%s):injectvars[collapsed=true]\\r\\e[0KInjecting variables"",
470
- "export APP_DIR="."",
471
- "export DOCKER_BUILD_CONTEXT="."",
470
+ "export APP_DIR="app"",
471
+ "export DOCKER_BUILD_CONTEXT="app"",
472
472
  "export DOCKER_REGISTRY="asia-east1-docker.pkg.dev"",
473
473
  "export DOCKER_IMAGE="asia-east1-docker.pkg.dev/asdf/catladder-deploy/pan-test-app/review/app/$([ -n "$CI_MERGE_REQUEST_IID" ] && echo "mr$CI_MERGE_REQUEST_IID" || { [ -n "$CI_COMMIT_REF_SLUG" ] && echo "$CI_COMMIT_REF_SLUG" || echo "unknown"; })"",
474
474
  "export DOCKER_CACHE_IMAGE="asia-east1-docker.pkg.dev/asdf/catladder-deploy/pan-test-app/caches/app"",
@@ -550,7 +550,7 @@ EOF
550
550
  "script": [
551
551
  "echo -e "\\e[0Ksection_start:$(date +%s):injectvars[collapsed=true]\\r\\e[0KInjecting variables"",
552
552
  "export ENV_SHORT="review"",
553
- "export APP_DIR="."",
553
+ "export APP_DIR="app"",
554
554
  "export ENV_TYPE="review"",
555
555
  "export BUILD_INFO_BUILD_ID="$(git describe --tags 2>/dev/null || git rev-parse HEAD)"",
556
556
  "export BUILD_INFO_BUILD_TIME="$CI_JOB_STARTED_AT"",
@@ -581,7 +581,7 @@ EOF
581
581
  ENV_SHORT: |-
582
582
  review
583
583
  APP_DIR: |-
584
- .
584
+ app
585
585
  ENV_TYPE: |-
586
586
  review
587
587
  BUILD_INFO_BUILD_ID: |-
@@ -793,8 +793,8 @@ EOF
793
793
  "artifacts": {
794
794
  "expire_in": "1 day",
795
795
  "paths": [
796
- "__build_info.json",
797
- "dist",
796
+ "app/__build_info.json",
797
+ "app/dist",
798
798
  ],
799
799
  "reports": {
800
800
  "junit": undefined,
@@ -815,7 +815,7 @@ EOF
815
815
  "script": [
816
816
  "echo -e "\\e[0Ksection_start:$(date +%s):injectvars[collapsed=true]\\r\\e[0KInjecting variables"",
817
817
  "export ENV_SHORT="prod"",
818
- "export APP_DIR="."",
818
+ "export APP_DIR="app"",
819
819
  "export ENV_TYPE="prod"",
820
820
  "export BUILD_INFO_BUILD_ID="$(git describe --tags 2>/dev/null || git rev-parse HEAD)"",
821
821
  "export BUILD_INFO_BUILD_TIME="$CI_JOB_STARTED_AT"",
@@ -831,12 +831,12 @@ EOF
831
831
  "export GCLOUD_RUN_canonicalHostSuffix="$CL_prod_app_GCLOUD_RUN_canonicalHostSuffix"",
832
832
  "export _ALL_ENV_VAR_KEYS="[\\"ENV_SHORT\\",\\"APP_DIR\\",\\"ENV_TYPE\\",\\"BUILD_INFO_BUILD_ID\\",\\"BUILD_INFO_BUILD_TIME\\",\\"BUILD_INFO_CURRENT_VERSION\\",\\"HOST\\",\\"ROOT_URL\\",\\"HOST_INTERNAL\\",\\"HOST_CANONICAL\\",\\"ROOT_URL_INTERNAL\\",\\"DEPLOY_CLOUD_RUN_PROJECT_ID\\",\\"DEPLOY_CLOUD_RUN_REGION\\",\\"GCLOUD_DEPLOY_credentialsKey\\",\\"GCLOUD_RUN_canonicalHostSuffix\\"]"",
833
833
  "echo -e "\\e[0Ksection_end:$(date +%s):injectvars\\r\\e[0K"",
834
- "echo '{"id":"$(git describe --tags 2>/dev/null || git rev-parse HEAD)","time":"$CI_JOB_STARTED_AT"}' > ./__build_info.json",
834
+ "echo '{"id":"$(git describe --tags 2>/dev/null || git rev-parse HEAD)","time":"$CI_JOB_STARTED_AT"}' > app/__build_info.json",
835
835
  "echo -e "\\e[0Ksection_start:$(date +%s):nodeinstall[collapsed=true]\\r\\e[0KEnsure node version"",
836
836
  "if [ -f ~/.nvm/nvm.sh ]; then source ~/.nvm/nvm.sh; fi",
837
837
  "if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi",
838
838
  "echo -e "\\e[0Ksection_end:$(date +%s):nodeinstall\\r\\e[0K"",
839
- "cd .",
839
+ "cd app",
840
840
  "mvn package",
841
841
  "cp -r target dist",
842
842
  ],
@@ -851,8 +851,8 @@ EOF
851
851
  "artifacts": {
852
852
  "expire_in": "1 day",
853
853
  "paths": [
854
- "__build_info.json",
855
- "dist",
854
+ "app/__build_info.json",
855
+ "app/dist",
856
856
  ],
857
857
  "reports": {
858
858
  "junit": undefined,
@@ -873,7 +873,7 @@ EOF
873
873
  "script": [
874
874
  "echo -e "\\e[0Ksection_start:$(date +%s):injectvars[collapsed=true]\\r\\e[0KInjecting variables"",
875
875
  "export ENV_SHORT="stage"",
876
- "export APP_DIR="."",
876
+ "export APP_DIR="app"",
877
877
  "export ENV_TYPE="stage"",
878
878
  "export BUILD_INFO_BUILD_ID="$(git describe --tags 2>/dev/null || git rev-parse HEAD)"",
879
879
  "export BUILD_INFO_BUILD_TIME="$CI_JOB_STARTED_AT"",
@@ -889,12 +889,12 @@ EOF
889
889
  "export GCLOUD_RUN_canonicalHostSuffix="$CL_stage_app_GCLOUD_RUN_canonicalHostSuffix"",
890
890
  "export _ALL_ENV_VAR_KEYS="[\\"ENV_SHORT\\",\\"APP_DIR\\",\\"ENV_TYPE\\",\\"BUILD_INFO_BUILD_ID\\",\\"BUILD_INFO_BUILD_TIME\\",\\"BUILD_INFO_CURRENT_VERSION\\",\\"HOST\\",\\"ROOT_URL\\",\\"HOST_INTERNAL\\",\\"HOST_CANONICAL\\",\\"ROOT_URL_INTERNAL\\",\\"DEPLOY_CLOUD_RUN_PROJECT_ID\\",\\"DEPLOY_CLOUD_RUN_REGION\\",\\"GCLOUD_DEPLOY_credentialsKey\\",\\"GCLOUD_RUN_canonicalHostSuffix\\"]"",
891
891
  "echo -e "\\e[0Ksection_end:$(date +%s):injectvars\\r\\e[0K"",
892
- "echo '{"id":"$(git describe --tags 2>/dev/null || git rev-parse HEAD)","time":"$CI_JOB_STARTED_AT"}' > ./__build_info.json",
892
+ "echo '{"id":"$(git describe --tags 2>/dev/null || git rev-parse HEAD)","time":"$CI_JOB_STARTED_AT"}' > app/__build_info.json",
893
893
  "echo -e "\\e[0Ksection_start:$(date +%s):nodeinstall[collapsed=true]\\r\\e[0KEnsure node version"",
894
894
  "if [ -f ~/.nvm/nvm.sh ]; then source ~/.nvm/nvm.sh; fi",
895
895
  "if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi",
896
896
  "echo -e "\\e[0Ksection_end:$(date +%s):nodeinstall\\r\\e[0K"",
897
- "cd .",
897
+ "cd app",
898
898
  "mvn package",
899
899
  "cp -r target dist",
900
900
  ],
@@ -920,8 +920,8 @@ EOF
920
920
  },
921
921
  "script": [
922
922
  "echo -e "\\e[0Ksection_start:$(date +%s):injectvars[collapsed=true]\\r\\e[0KInjecting variables"",
923
- "export APP_DIR="."",
924
- "export DOCKER_BUILD_CONTEXT="."",
923
+ "export APP_DIR="app"",
924
+ "export DOCKER_BUILD_CONTEXT="app"",
925
925
  "export DOCKER_REGISTRY="asia-east1-docker.pkg.dev"",
926
926
  "export DOCKER_IMAGE="asia-east1-docker.pkg.dev/asdf/catladder-deploy/pan-test-app/prod/app"",
927
927
  "export DOCKER_CACHE_IMAGE="asia-east1-docker.pkg.dev/asdf/catladder-deploy/pan-test-app/caches/app"",
@@ -974,8 +974,8 @@ EOF
974
974
  },
975
975
  "script": [
976
976
  "echo -e "\\e[0Ksection_start:$(date +%s):injectvars[collapsed=true]\\r\\e[0KInjecting variables"",
977
- "export APP_DIR="."",
978
- "export DOCKER_BUILD_CONTEXT="."",
977
+ "export APP_DIR="app"",
978
+ "export DOCKER_BUILD_CONTEXT="app"",
979
979
  "export DOCKER_REGISTRY="asia-east1-docker.pkg.dev"",
980
980
  "export DOCKER_IMAGE="asia-east1-docker.pkg.dev/asdf/catladder-deploy/pan-test-app/stage/app"",
981
981
  "export DOCKER_CACHE_IMAGE="asia-east1-docker.pkg.dev/asdf/catladder-deploy/pan-test-app/caches/app"",
@@ -1057,7 +1057,7 @@ EOF
1057
1057
  "script": [
1058
1058
  "echo -e "\\e[0Ksection_start:$(date +%s):injectvars[collapsed=true]\\r\\e[0KInjecting variables"",
1059
1059
  "export ENV_SHORT="prod"",
1060
- "export APP_DIR="."",
1060
+ "export APP_DIR="app"",
1061
1061
  "export ENV_TYPE="prod"",
1062
1062
  "export BUILD_INFO_BUILD_ID="$(git describe --tags 2>/dev/null || git rev-parse HEAD)"",
1063
1063
  "export BUILD_INFO_BUILD_TIME="$CI_JOB_STARTED_AT"",
@@ -1088,7 +1088,7 @@ EOF
1088
1088
  ENV_SHORT: |-
1089
1089
  prod
1090
1090
  APP_DIR: |-
1091
- .
1091
+ app
1092
1092
  ENV_TYPE: |-
1093
1093
  prod
1094
1094
  BUILD_INFO_BUILD_ID: |-
@@ -1182,7 +1182,7 @@ EOF
1182
1182
  "script": [
1183
1183
  "echo -e "\\e[0Ksection_start:$(date +%s):injectvars[collapsed=true]\\r\\e[0KInjecting variables"",
1184
1184
  "export ENV_SHORT="stage"",
1185
- "export APP_DIR="."",
1185
+ "export APP_DIR="app"",
1186
1186
  "export ENV_TYPE="stage"",
1187
1187
  "export BUILD_INFO_BUILD_ID="$(git describe --tags 2>/dev/null || git rev-parse HEAD)"",
1188
1188
  "export BUILD_INFO_BUILD_TIME="$CI_JOB_STARTED_AT"",
@@ -1213,7 +1213,7 @@ EOF
1213
1213
  ENV_SHORT: |-
1214
1214
  stage
1215
1215
  APP_DIR: |-
1216
- .
1216
+ app
1217
1217
  ENV_TYPE: |-
1218
1218
  stage
1219
1219
  BUILD_INFO_BUILD_ID: |-
@@ -6,10 +6,13 @@ const config: Config = {
6
6
  customerName: "pan",
7
7
  components: {
8
8
  app: {
9
- dir: ".",
9
+ dir: "app",
10
10
  build: {
11
11
  type: "custom",
12
- docker: { type: "custom" },
12
+ docker: {
13
+ type: "custom",
14
+ buildContextLocation: "component", // default is root
15
+ },
13
16
  jobImage: "maven:3-eclipse-temurin-11",
14
17
  buildCommand: ["mvn package", "cp -r target dist"],
15
18
  sbom: {
package/package.json CHANGED
@@ -52,7 +52,7 @@
52
52
  }
53
53
  ],
54
54
  "license": "MIT",
55
- "version": "1.157.0",
55
+ "version": "1.158.0",
56
56
  "scripts": {
57
57
  "build:tsc": "yarn tsc",
58
58
  "build": "yarn build:compile && yarn build:inline-variables && yarn build:bundle",
@@ -174,7 +174,9 @@ type BuildConfigDockerCustom = {
174
174
  type: "custom";
175
175
 
176
176
  /**
177
- * where to run the docker build, defaults to the root of the repo
177
+ * where to run the docker build, defaults to the root of the repo.
178
+ *
179
+ * Depending on your Dockerfile you may want to change it to "component"
178
180
  */
179
181
  buildContextLocation?: "root" | "component";
180
182
  };