Skip to content

Commit

Permalink
Merge branch 'B-21977' into B-21977-INT3
Browse files Browse the repository at this point in the history
  • Loading branch information
ajlusk committed Jan 17, 2025
2 parents c25596c + cb4cfaa commit 0c90fde
Show file tree
Hide file tree
Showing 4 changed files with 55 additions and 21 deletions.
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
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ COPY swagger/* /swagger/
COPY build /build
COPY public/static/react-file-viewer /public/static/react-file-viewer

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

ENTRYPOINT ["/bin/milmove"]
Expand Down
5 changes: 1 addition & 4 deletions Dockerfile.dp3
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
FROM debian:stable AS build-env

## Give full perms to tmp for the server to have a read/write location
RUN mkdir -p /tmp && chmod 777 /tmp

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

Expand Down Expand Up @@ -35,7 +32,7 @@ COPY swagger/* /swagger/
COPY build /build
COPY public/static/react-file-viewer /public/static/react-file-viewer

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

ENTRYPOINT ["/bin/milmove"]
Expand Down
21 changes: 16 additions & 5 deletions src/components/Office/AddOrdersForm/AddOrdersForm.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -196,9 +196,10 @@ const AddOrdersForm = ({
handleOrderTypeChange(e);
}}
isDisabled={isSafetyMoveSelected || isBluebarkMoveSelected}
hint="Required"
/>
<DatePickerInput name="issueDate" label="Orders date" required />
<DatePickerInput name="reportByDate" label="Report by date" required />
<DatePickerInput name="issueDate" label="Orders date" required hint="Required" />
<DatePickerInput name="reportByDate" label="Report by date" required hint="Required" />

<DutyLocationInput
label="Current duty location"
Expand All @@ -210,6 +211,7 @@ const AddOrdersForm = ({
}}
metaOverride={originMeta}
required
hint="Required"
/>
{currentDutyLocation.provides_services_counseling && (
<div>
Expand Down Expand Up @@ -259,6 +261,7 @@ const AddOrdersForm = ({
displayAddress={false}
placeholder="Enter a city or ZIP"
metaOverride={newDutyMeta}
hint="Required"
onDutyLocationChange={(e) => {
setNewDutyLocation(e);
}}
Expand All @@ -269,6 +272,7 @@ const AddOrdersForm = ({
name="newDutyLocation"
label="New duty location"
required
hint="Required"
metaOverride={newDutyMeta}
onDutyLocationChange={(e) => {
setNewDutyLocation(e);
Expand All @@ -277,7 +281,7 @@ const AddOrdersForm = ({
)}

<FormGroup>
<Label>Are dependents included in the orders?</Label>
<Label hint="Required">Are dependents included in the orders?</Label>
<div>
<Field
as={Radio}
Expand Down Expand Up @@ -312,7 +316,7 @@ const AddOrdersForm = ({

{showAccompaniedTourField && (
<FormGroup>
<Label>Is this an accompanied tour?</Label>
<Label hint="Required">Is this an accompanied tour?</Label>
<div>
<div className={styles.radioWithToolTip}>
<Field
Expand Down Expand Up @@ -386,7 +390,14 @@ const AddOrdersForm = ({
</FormGroup>
)}

<DropdownInput label="Pay grade" name="grade" id="grade" required options={payGradeOptions} />
<DropdownInput
label="Pay grade"
name="grade"
id="grade"
required
options={payGradeOptions}
hint="Required"
/>
</SectionWrapper>

<div className={formStyles.formActions}>
Expand Down

0 comments on commit 0c90fde

Please sign in to comment.