Skip to content

Commit

Permalink
Merge branch 'main' into B-21583-gbloc-AK-moves
Browse files Browse the repository at this point in the history
  • Loading branch information
pambecker authored Jan 17, 2025
2 parents ec1649c + adc98a3 commit b05c1f0
Show file tree
Hide file tree
Showing 115 changed files with 873 additions and 410 deletions.
4 changes: 2 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -891,7 +891,7 @@ commands:
export FEATURE_FLAG_VALIDATION_CODE_REQUIRED=false
export FEATURE_FLAG_MOVE_LOCK=false
export FEATURE_FLAG_OKTA_DODID_INPUT=false
export FEATURE_FLAG_HEADQUARTERS_ROLE=false
export FEATURE_FLAG_HEADQUARTERS_ROLE=true
export FEATURE_FLAG_GSR_ROLE=false
export FEATURE_FLAG_SAFETY_MOVE=false
export FEATURE_FLAG_MANAGE_SUPPORTING_DOCS=false
Expand Down Expand Up @@ -936,7 +936,7 @@ commands:
FEATURE_FLAG_VALIDATION_CODE_REQUIRED: 'false'
FEATURE_FLAG_MOVE_LOCK: 'false'
FEATURE_FLAG_OKTA_DODID_INPUT: 'false'
FEATURE_FLAG_HEADQUARTERS_ROLE: 'false'
FEATURE_FLAG_HEADQUARTERS_ROLE: 'true'
FEATURE_FLAG_GSR_ROLE: 'false'
FEATURE_FLAG_SAFETY_MOVE: 'false'
FEATURE_FLAG_MANAGE_SUPPORTING_DOCS: 'false'
Expand Down
48 changes: 37 additions & 11 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ variables:
CLIENT_IGNORE_BRANCH: &client_ignore_branch placeholder_branch_name
SERVER_IGNORE_BRANCH: &server_ignore_branch placeholder_branch_name

#RUNNER_TAG: &runner_tag milmove
RUNNER_TAG: &runner_tag milmove
DOCKER_RUNNER_TAG: &docker_runner_tag eks_cluster_runner

Expand Down Expand Up @@ -75,31 +74,31 @@ stages:
- |
if [[ "$DP3_ENV" == "exp" || "$DP3_ENV" == "loadtest" || "$DP3_ENV" == "demo" ]]; then
export ENV=$(echo ${DP3_ENV} | tr '[:lower:]' '[:upper:]');
export TLS_CERT=$(eval echo \$${ENV^^}_DP3_CERT);
export TLS_KEY=$(eval echo \$${ENV^^}_DP3_KEY);
export TLS_CA=$(eval echo \$${ENV^^}_DP3_CA);
export TLS_CERT=$(eval echo \$${ENV}_DP3_CERT);
export TLS_KEY=$(eval echo \$${ENV}_DP3_KEY);
export TLS_CA=$(eval echo \$${ENV}_DP3_CA);
fi
.setup_aws_vars_dp3: &setup_aws_vars_dp3
- |
if [[ "$DP3_ENV" == "exp" || "$DP3_ENV" == "loadtest" || "$DP3_ENV" == "demo" ]]; then
export ENV=$(echo ${DP3_ENV} | tr '[:lower:]' '[:upper:]');
export AWS_DEFAULT_REGION=$(eval echo \$${ENV^^}_REGION);
export AWS_ACCOUNT_ID=$(eval echo \$${ENV^^}_ACCOUNT_ID);
export AWS_ACCESS_KEY_ID=$(eval echo \$${ENV^^}_ACCESS_KEY_ID);
export AWS_SECRET_ACCESS_KEY=$(eval echo \$${ENV^^}_SECRET_ACCESS_KEY);
export AWS_DEFAULT_REGION=$(eval echo \$${ENV}_REGION);
export AWS_ACCOUNT_ID=$(eval echo \$${ENV}_ACCOUNT_ID);
export AWS_ACCESS_KEY_ID=$(eval echo \$${ENV}_ACCESS_KEY_ID);
export AWS_SECRET_ACCESS_KEY=$(eval echo \$${ENV}_SECRET_ACCESS_KEY);
fi
.setup_release_dp3: &setup_release_dp3
- |
if [[ "$DP3_ENV" == "exp" || "$DP3_ENV" == "loadtest" || "$DP3_ENV" == "demo" ]]; then
export ENV=$(echo ${DP3_ENV} | tr '[:lower:]' '[:upper:]');
export AWS_REGION=$(eval echo \$${ENV}_REGION);
export AWS_DEFAULT_REGION=$(eval echo \$${ENV}_REGION);
export AWS_ACCOUNT_ID=$(eval echo \$${ENV}_ACCOUNT_ID);
export ECR_REPOSITORY_URI=$(echo ${AWS_ACCOUNT_ID}.dkr.ecr.${AWS_REGION}.amazonaws.com)
export ECR_REPOSITORY_URI=$(echo ${AWS_ACCOUNT_ID}.dkr.ecr.${AWS_DEFAULT_REGION}.amazonaws.com)
export APP_DOCKER_FILE=Dockerfile.dp3
export TASK_DOCKER_FILE=Dockerfile.tasks_dp3
export APP_ENVIRONMENT=$ENV
export APP_ENVIRONMENT=$DP3_ENV
fi
.setup_aws_vars_stg: &setup_aws_vars_stg
Expand Down Expand Up @@ -185,6 +184,7 @@ stages:
- yarn.lock
paths:
- .cache/yarn
policy: pull-push

.go_cache: &go_cache
key:
Expand All @@ -193,6 +193,7 @@ stages:
paths:
- $GOPATH/pkg/mod
- /builds/milmove/mymove/bin
policy: pull-push

.setup_generic_app_env_variables: &setup_generic_app_env_variables
- |
Expand Down Expand Up @@ -423,6 +424,7 @@ build_storybook:
- anti_virus
cache:
- <<: *yarn_cache
policy: pull
before_script:
- *setup_milmove_env
- *install_yarn
Expand Down Expand Up @@ -464,6 +466,7 @@ compile_app_client:
image: $DOCKER_APP_IMAGE
cache:
- <<: *yarn_cache
policy: pull
variables:
KUBERNETES_CPU_REQUEST: "6"
KUBERNETES_MEMORY_REQUEST: "8Gi"
Expand Down Expand Up @@ -495,7 +498,9 @@ compile_app_server:
image: $DOCKER_APP_IMAGE
cache:
- <<: *go_cache
policy: pull
- <<: *yarn_cache
policy: pull
variables:
KUBERNETES_CPU_REQUEST: "6"
KUBERNETES_MEMORY_REQUEST: "6Gi"
Expand Down Expand Up @@ -541,7 +546,9 @@ pre_test:
image: $DOCKER_APP_IMAGE
cache:
- <<: *go_cache
policy: pull
- <<: *yarn_cache
policy: pull
needs:
- pre_deps_golang
- pre_deps_yarn
Expand Down Expand Up @@ -584,6 +591,7 @@ pre_test:
- echo "Run spectral linter on all files"
- ./scripts/ensure-spectral-lint /tmp/spectral_baseline spectral
- ./scripts/pre-commit-go-mod || exit 0
allow_failure: true
after_script:
- *announce_failure
rules:
Expand Down Expand Up @@ -646,6 +654,7 @@ server_test:
# - go install gotest.tools/gotestsum@latest
# - go mod tidy
#- bin/gotestsum --junitfile server_test_report.xml --format server_test
allow_failure: true
artifacts:
paths:
- /builds/milmove/mymove/bin/gotestsum
Expand Down Expand Up @@ -675,6 +684,7 @@ server_test_coverage:
./scripts/ensure-go-test-coverage \
tmp/baseline-go-coverage/go-coverage.txt \
tmp/test-results/gotest/app/go-coverage.txt
allow_failure: true
after_script:
- *announce_failure
rules:
Expand All @@ -700,6 +710,7 @@ client_test:
- pre_deps_yarn
cache:
- <<: *yarn_cache
policy: pull
before_script:
- *setup_milmove_env
- *install_yarn
Expand Down Expand Up @@ -788,6 +799,7 @@ integration_test_devseed:
export MOVE_MIL_DOD_TLS_CERT=$(cat config/tls/devlocal-https.pem)
export MOVE_MIL_DOD_TLS_KEY=$(cat config/tls/devlocal-https.key)
- make db_dev_fresh
allow_failure: true
after_script:
- *announce_failure
rules:
Expand All @@ -811,6 +823,7 @@ integration_tests:
script:
- echo "TODO Add steps"
- echo "integration_tests"
allow_failure: true
after_script:
- *announce_failure
rules:
Expand All @@ -828,6 +841,7 @@ integration_test_mtls:
script:
- echo "TODO Add steps"
- echo "integration_test_mtls"
allow_failure: true
after_script:
- *announce_failure
rules:
Expand Down Expand Up @@ -866,6 +880,7 @@ integration_test_my:
script:
- echo "TODO Add steps"
- echo "integration_test_my"
allow_failure: true
after_script:
- *announce_failure
rules:
Expand All @@ -885,6 +900,7 @@ integration_test_office:
script:
- echo "TODO Add steps"
- echo "integration_test_office"
allow_failure: true
after_script:
- *announce_failure
rules:
Expand Down Expand Up @@ -968,6 +984,9 @@ push_otel_collector_image_dp3:
tags:
- $RUNNER_TAG
environment: DP3_ENV
before_script:
- *setup_aws_vars_dp3
- *setup_release_dp3
image:
name: $DOCKER_BASE_IMAGE
entrypoint: [""]
Expand Down Expand Up @@ -1001,6 +1020,7 @@ deploy_migrations_dp3:
name: $DOCKER_APP_IMAGE
entrypoint: [""]
needs:
- push_otel_collector_image_dp3
- build_push_migrations_dp3
- compile_app_server
- compile_app_client
Expand Down Expand Up @@ -1030,10 +1050,12 @@ deploy_tasks_dp3:
name: $DOCKER_APP_IMAGE
entrypoint: [""]
needs:
- deploy_migrations_dp3
- build_push_tasks_dp3
- compile_app_server
- compile_app_client
before_script:
- *setup_aws_vars_dp3
- *setup_release_dp3
script:
- echo "Getting Digest from AWS"
Expand Down Expand Up @@ -1250,6 +1272,7 @@ deploy_migrations_stg:
name: $DOCKER_APP_IMAGE
entrypoint: [""]
needs:
- push_otel_collector_image_stg
- build_push_migrations_stg
- compile_app_server
- compile_app_client
Expand Down Expand Up @@ -1280,6 +1303,7 @@ deploy_tasks_stg:
name: $DOCKER_APP_IMAGE
entrypoint: [""]
needs:
- deploy_migrations_stg
- build_push_tasks_stg
- compile_app_server
- compile_app_client
Expand Down Expand Up @@ -1517,6 +1541,7 @@ deploy_migrations_prd:
name: $DOCKER_APP_IMAGE
entrypoint: [""]
needs:
- push_otel_collector_image_prd
- build_push_migrations_prd
- compile_app_server
- compile_app_client
Expand Down Expand Up @@ -1547,6 +1572,7 @@ deploy_tasks_prd:
name: $DOCKER_APP_IMAGE
entrypoint: [""]
needs:
- deploy_migrations_prd
- build_push_tasks_prd
- compile_app_server
- compile_app_client
Expand Down
3 changes: 3 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ COPY swagger/* /swagger/
COPY build /build
COPY public/static/react-file-viewer /public/static/react-file-viewer

# Mount mutable tmp for app packages like pdfcpu
VOLUME ["/tmp"]

ENTRYPOINT ["/bin/milmove"]

CMD ["serve", "--logging-level=debug"]
Expand Down
5 changes: 5 additions & 0 deletions Dockerfile.dp3
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
FROM debian:stable AS build-env

# hadolint ignore=DL3007
FROM gcr.io/distroless/base-debian11@sha256:ac69aa622ea5dcbca0803ca877d47d069f51bd4282d5c96977e0390d7d256455

Expand All @@ -22,6 +24,9 @@ COPY swagger/* /swagger/
COPY build /build
COPY public/static/react-file-viewer /public/static/react-file-viewer

# Mount mutable tmp for app packages like pdfcpu
VOLUME ["/tmp"]

ENTRYPOINT ["/bin/milmove"]

CMD ["serve", "--logging-level=debug"]
Expand Down
8 changes: 4 additions & 4 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ require (
github.com/lib/pq v1.10.9
github.com/markbates/goth v1.79.0
github.com/namsral/flag v1.7.4-pre
github.com/pdfcpu/pdfcpu v0.6.0
github.com/pdfcpu/pdfcpu v0.9.1
github.com/pkg/errors v0.9.1
github.com/pkg/sftp v1.13.7
github.com/pterm/pterm v0.12.79
Expand Down Expand Up @@ -222,7 +222,7 @@ require (
github.com/mailru/easyjson v0.7.7 // indirect
github.com/mattn/go-colorable v0.1.13 // indirect
github.com/mattn/go-isatty v0.0.20 // indirect
github.com/mattn/go-runewidth v0.0.15 // indirect
github.com/mattn/go-runewidth v0.0.16 // indirect
github.com/mattn/go-shellwords v1.0.12 // indirect
github.com/mattn/go-sqlite3 v2.0.3+incompatible // indirect
github.com/microcosm-cc/bluemonday v1.0.23 // indirect
Expand All @@ -237,7 +237,7 @@ require (
github.com/pelletier/go-toml/v2 v2.1.0 // indirect
github.com/peterbourgon/diskv/v3 v3.0.1 // indirect
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
github.com/rivo/uniseg v0.4.4 // indirect
github.com/rivo/uniseg v0.4.7 // indirect
github.com/rogpeppe/fastuuid v1.2.0 // indirect
github.com/rogpeppe/go-internal v1.12.0 // indirect
github.com/rs/zerolog v1.29.0 // indirect
Expand All @@ -259,7 +259,7 @@ require (
go.opentelemetry.io/proto/otlp v1.3.1 // indirect
go.uber.org/multierr v1.11.0 // indirect
golang.org/x/exp v0.0.0-20230905200255-921286631fa9
golang.org/x/image v0.18.0 // indirect
golang.org/x/image v0.21.0 // indirect
golang.org/x/mod v0.20.0 // indirect
golang.org/x/sync v0.10.0 // indirect
golang.org/x/sys v0.28.0 // indirect
Expand Down
16 changes: 8 additions & 8 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -473,8 +473,8 @@ github.com/mattn/go-isatty v0.0.19/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D
github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY=
github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y=
github.com/mattn/go-runewidth v0.0.13/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w=
github.com/mattn/go-runewidth v0.0.15 h1:UNAjwbU9l54TA3KzvqLGxwWjHmMgBUVhBiTjelZgg3U=
github.com/mattn/go-runewidth v0.0.15/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w=
github.com/mattn/go-runewidth v0.0.16 h1:E5ScNMtiwvlvB5paMFdw9p4kSQzbXFikJ5SQO6TULQc=
github.com/mattn/go-runewidth v0.0.16/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w=
github.com/mattn/go-shellwords v1.0.12 h1:M2zGm7EW6UQJvDeQxo4T51eKPurbeFbe8WtebGE2xrk=
github.com/mattn/go-shellwords v1.0.12/go.mod h1:EZzvwXDESEeg03EKmM+RmDnNOPKG4lLtQsUlTZDWQ8Y=
github.com/mattn/go-sqlite3 v1.14.6/go.mod h1:NyWgC/yNuGj7Q9rpYnZvas74GogHl5/Z4A/KQRfk6bU=
Expand Down Expand Up @@ -511,8 +511,8 @@ github.com/opentracing/opentracing-go v1.2.0 h1:uEJPy/1a5RIPAJ0Ov+OIO8OxWu77jEv+
github.com/opentracing/opentracing-go v1.2.0/go.mod h1:GxEUsuufX4nBwe+T+Wl9TAgYrxe9dPLANfrWvHYVTgc=
github.com/patrickmn/go-cache v0.0.0-20180815053127-5633e0862627 h1:pSCLCl6joCFRnjpeojzOpEYs4q7Vditq8fySFG5ap3Y=
github.com/patrickmn/go-cache v0.0.0-20180815053127-5633e0862627/go.mod h1:3Qf8kWWT7OJRJbdiICTKqZju1ZixQ/KpMGzzAfe6+WQ=
github.com/pdfcpu/pdfcpu v0.6.0 h1:z4kARP5bcWa39TTYMcN/kjBnm7MvhTWjXgeYmkdAGMI=
github.com/pdfcpu/pdfcpu v0.6.0/go.mod h1:kmpD0rk8YnZj0l3qSeGBlAB+XszHUgNv//ORH/E7EYo=
github.com/pdfcpu/pdfcpu v0.9.1 h1:q8/KlBdHjkE7ZJU4ofhKG5Rjf7M6L324CVM6BMDySao=
github.com/pdfcpu/pdfcpu v0.9.1/go.mod h1:fVfOloBzs2+W2VJCCbq60XIxc3yJHAZ0Gahv1oO0gyI=
github.com/pelletier/go-toml/v2 v2.1.0 h1:FnwAJ4oYMvbT/34k9zzHuZNrhlz48GB3/s6at6/MHO4=
github.com/pelletier/go-toml/v2 v2.1.0/go.mod h1:tJU2Z3ZkXwnxa4DPO899bsyIoywizdUvyaeZurnPPDc=
github.com/peterbourgon/diskv/v3 v3.0.1 h1:x06SQA46+PKIUftmEujdwSEpIx8kR+M9eLYsUxeYveU=
Expand Down Expand Up @@ -547,8 +547,8 @@ github.com/richardlehane/msoleps v1.0.3/go.mod h1:BWev5JBpU9Ko2WAgmZEuiz4/u3ZYTK
github.com/rickar/cal/v2 v2.1.13 h1:FENBPXxDPyL1OWGf9ZdpWGcEiGoSjt0UZED8VOxvK0c=
github.com/rickar/cal/v2 v2.1.13/go.mod h1:/fdlMcx7GjPlIBibMzOM9gMvDBsrK+mOtRXdTzUqV/A=
github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc=
github.com/rivo/uniseg v0.4.4 h1:8TfxU8dW6PdqD27gjM8MVNuicgxIjxpm4K7x4jp8sis=
github.com/rivo/uniseg v0.4.4/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88=
github.com/rivo/uniseg v0.4.7 h1:WUdvkW8uEhrYfLC4ZzdpI2ztxP1I582+49Oc5Mq64VQ=
github.com/rivo/uniseg v0.4.7/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88=
github.com/rogpeppe/fastuuid v1.2.0 h1:Ppwyp6VYCF1nvBTXL3trRso7mXMlRrw9ooo375wvi2s=
github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ=
github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4=
Expand Down Expand Up @@ -730,8 +730,8 @@ golang.org/x/exp v0.0.0-20230905200255-921286631fa9 h1:GoHiUyI/Tp2nVkLI2mCxVkOjs
golang.org/x/exp v0.0.0-20230905200255-921286631fa9/go.mod h1:S2oDrQGGwySpoQPVqRShND87VCbxmc6bL1Yd2oYrm6k=
golang.org/x/image v0.0.0-20190910094157-69e4b8554b2a/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0=
golang.org/x/image v0.0.0-20191009234506-e7c1f5e7dbb8/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0=
golang.org/x/image v0.18.0 h1:jGzIakQa/ZXI1I0Fxvaa9W7yP25TqT6cHIHn+6CqvSQ=
golang.org/x/image v0.18.0/go.mod h1:4yyo5vMFQjVjUcVk4jEQcU9MGy/rulF5WvUILseCM2E=
golang.org/x/image v0.21.0 h1:c5qV36ajHpdj4Qi0GnE0jUc/yuo33OLFaa0d+crTD5s=
golang.org/x/image v0.21.0/go.mod h1:vUbsLavqK/W303ZroQQVKQ+Af3Yl6Uz1Ppu5J/cLz78=
golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU=
golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
Expand Down
1 change: 1 addition & 0 deletions migrations/app/migrations_manifest.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1071,4 +1071,5 @@
20250103130619_revert_data_change_for_gbloc_for_ak.up.sql
20250103142533_update_postal_codes_and_gblocs_for_ak.up.sql
20250103180420_update_pricing_proc_to_use_local_price_variable.up.sql
20250110001339_update_nts_release_enum_name.up.sql
20250110214012_homesafeconnect_cert.up.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
-- Rename the existing enum value 'HHG_OUTOF_NTS_DOMESTIC' to 'HHG_OUTOF_NTS'
DO $$
BEGIN
IF EXISTS (
SELECT 1
FROM pg_type t
JOIN pg_enum e ON t.oid = e.enumtypid
WHERE t.typname = 'mto_shipment_type'
AND e.enumlabel = 'HHG_OUTOF_NTS_DOMESTIC'
) THEN
ALTER TYPE mto_shipment_type
RENAME VALUE 'HHG_OUTOF_NTS_DOMESTIC' TO 'HHG_OUTOF_NTS';
END IF;
END $$;

-- Update column comments to include all current shipment types
COMMENT ON COLUMN mto_shipments.shipment_type IS 'The type of shipment. The list includes:
1. Personally procured move (PPM)
2. Household goods move (HHG)
3. Non-temporary storage (HHG_INTO_NTS)
4. Non-temporary storage-release (HHG_OUTOF_NTS)
5. Mobile home (MOBILE_HOME)
6. Boat haul away (BOAT_HAUL_AWAY)
7. Boat tow away (BOAT_TOW_AWAY)
8. Unaccompanied baggage (UNACCOMPANIED_BAGGAGE)';
Loading

0 comments on commit b05c1f0

Please sign in to comment.