Skip to content

Commit

Permalink
test files
Browse files Browse the repository at this point in the history
  • Loading branch information
josiahzimmerman-caci committed Mar 4, 2025
1 parent b7f54aa commit 0dfed8b
Show file tree
Hide file tree
Showing 2 changed files with 66 additions and 36 deletions.
39 changes: 22 additions & 17 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,12 @@ variables:
DOCKER_RUNNER_TAG: &docker_runner_tag eks_cluster_runner


postgres: &postgres postgres:16.4
postgres: &postgres harbor.csde.caci.com/docker.io/library/postgres:16.4
#postgres: &postgres postgres:16.4
redis: &redis redis:5.0.6
redis: &redis harbor.csde.caci.com/docker.io/library/redis:5.0.6

stages:
- pre_pre_checks
- pre_checks
- build
- test
Expand Down Expand Up @@ -311,10 +312,11 @@ stages:
export LOGIN_GOV_CALLBACK_PORT=4000
export LOGIN_GOV_CALLBACK_PROTOCOL=http
make db_dev_create
bin/milmove migrate
mkdir -p build
touch build/index.html
bin/milmove serve 2>&1 | tee server.log &
# bin/milmove migrate
# mkdir -p build
# touch build/index.html
# bin/milmove serve 2>&1 | tee server.log &

.e2e_tests_playwright: &e2e_tests_playwright
- |
Expand Down Expand Up @@ -1067,7 +1069,7 @@ integration_tests:


integration_test_mtls:
stage: pre_checks
stage: pre_pre_checks
interruptible: true
cache:
- <<: *yarn_cache
Expand All @@ -1076,12 +1078,14 @@ integration_test_mtls:
- $Gitlab_Runner_Tag
image: $DOCKER_APP_IMAGE
services:
- name: registry.csde.caci.com/milmove/mymove:e2e-localbuild
alias: milmovelocal,officelocal,adminlocal,primelocal
- name: $postgres
- name: $redis
- name: registry.csde.caci.com/milmove/mymove:e2e-4049cd0a
alias: milmovemicroservice,milmovelocal,officelocal,adminlocal,primelocal
command: ["--port","4000","--verbose"]
# command: ["--verbose","node", "server.js"]
variables:
CI_DEBUG_SERVICES: "true"
# FF_NETWORK_PER_BUILD: "true"
PLAYWRIGHT_MY_URL: http://milmovelocal:4000
PLAYWRIGHT_ADMIN_URL: http://adminlocal:4000
PLAYWRIGHT_OFFICE_URL: http://officelocal:4000
Expand Down Expand Up @@ -1166,7 +1170,7 @@ integration_test_mtls:


HTTP_ADMIN_SERVER_NAME: adminlocal
HTTP_MY_SERVER_NAME: milmovemicroservice
HTTP_MY_SERVER_NAME: milmovelocal
HTTP_OFFICE_SERVER_NAME: officelocal
HTTP_ORDERS_SERVER_NAME: orderslocal
HTTP_PRIME_SERVER_NAME: primelocal
Expand All @@ -1182,15 +1186,16 @@ integration_test_mtls:
# - compile_app_server
before_script:
- *setup_milmove_env
# - *setup_env_intergration_mtls
- *setup_env_intergration_mtls
script:
# - echo "TODO Add steps"
# - echo "integration_test_mtls"
# - echo "Waiting for server to start"
# - dockerize -wait http://milmovelocal:4000 -timeout 5m
- sed 's,^,export ,' /builds/milmove/mymove/config/env/review.app.env > server_env
- source server_env
- until $(curl --output /dev/null --silent --head --fail http://milmovemicroservice:4000); do printf '.'; sleep 1; done
# - until $(curl --output /dev/null --silent --head --fail http://milmovelocal:4000); do printf '.'; sleep 1; done
# - curl http://milmovelocal:4000
- echo "Running E2E mTLS tests"
- ./scripts/run-e2e-mtls-test
artifacts:
Expand All @@ -1216,7 +1221,7 @@ integration_test_admin:
- name: $postgres
- name: $redis
- name: registry.csde.caci.com/milmove/mymove:e2e-a743f4c9
alias: milmovemicroservice,milmovelocal,officelocal,adminlocal,primelocal
alias: milmovelocal,officelocal,adminlocal,primelocal
entrypoint: ["/bin/milmove"]
command: ["serve","--port","4000","--verbose"]
variables:
Expand Down Expand Up @@ -1286,7 +1291,7 @@ integration_test_my:
- name: $postgres
- name: $redis
- name: registry.csde.caci.com/milmove/mymove:e2e-a743f4c9
alias: milmovemicroservice,milmovelocal,officelocal,adminlocal,primelocal
alias: milmovelocal,officelocal,adminlocal,primelocal
entrypoint: ["/bin/milmove"]
command: ["serve","--port","4000","--verbose"]
variables:
Expand Down Expand Up @@ -1357,7 +1362,7 @@ integration_test_office:
- name: $postgres
- name: $redis
- name: registry.csde.caci.com/milmove/mymove:e2e-a743f4c9
alias: milmovemicroservice,milmovelocal,officelocal,adminlocal,primelocal
alias: milmovelocal,officelocal,adminlocal,primelocal
entrypoint: ["/bin/milmove"]
command: ["serve","--port","4000","--verbose"]
variables:
Expand Down Expand Up @@ -1426,7 +1431,7 @@ integration_test_e2e_generic:
- name: $postgres
- name: $redis
- name: registry.csde.caci.com/milmove/mymove:e2e-a743f4c9
alias: milmovemicroservice,milmovelocal,officelocal,adminlocal,primelocal
alias: milmovelocal,officelocal,adminlocal,primelocal
entrypoint: ["/bin/milmove"]
command: ["serve","--port","4000","--verbose"]
variables:
Expand Down
63 changes: 44 additions & 19 deletions Dockerfile_gitlabtests_dp3
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,17 @@

# COPY bin/milmove /bin/milmove

# # Demo Environment certs
# COPY config/tls/api.demo.dp3.us.chain.der.p7b /config/tls/api.demo.dp3.us.chain.der.p7b
# COPY config/tls/api.demo.dp3.us.crt /config/tls/api.demo.dp3.us.crt
# # # Demo Environment certs
# # COPY config/tls/api.demo.dp3.us.chain.der.p7b /config/tls/api.demo.dp3.us.chain.der.p7b
# # COPY config/tls/api.demo.dp3.us.crt /config/tls/api.demo.dp3.us.crt

# # Loadtesting Environment Certs
# COPY config/tls/api.loadtest.dp3.us.chain.der.p7b /config/tls/api.loadtest.dp3.us.chain.der.p7b
# COPY config/tls/api.loadtest.dp3.us.crt /config/tls/api.loadtest.dp3.us.crt
# # # Loadtesting Environment Certs
# # COPY config/tls/api.loadtest.dp3.us.chain.der.p7b /config/tls/api.loadtest.dp3.us.chain.der.p7b
# # COPY config/tls/api.loadtest.dp3.us.crt /config/tls/api.loadtest.dp3.us.crt

# # Exp Environment Certs
# COPY config/tls/api.exp.dp3.us.chain.der.p7b /config/tls/api.exp.dp3.us.chain.der.p7b
# COPY config/tls/api.exp.dp3.us.crt /config/tls/api.exp.dp3.us.crt
# # # Exp Environment Certs
# # COPY config/tls/api.exp.dp3.us.chain.der.p7b /config/tls/api.exp.dp3.us.chain.der.p7b
# # COPY config/tls/api.exp.dp3.us.crt /config/tls/api.exp.dp3.us.crt

# COPY swagger/* /swagger/
# COPY public/static/react-file-viewer /public/static/react-file-viewer
Expand All @@ -33,17 +33,42 @@

# EXPOSE 4000

# Use an official base image, in this case, Node.js
FROM node@sha256:a182b9b37154a3e11e5c1d15145470ceb22069646d0b7390de226da2548aa2a7
FROM alpine:3.20.3

# Set the working directory inside the container
WORKDIR /app
# hadolint ignore=DL3017
RUN apk upgrade --no-cache busybox

# Copy application files
COPY server.js /app
COPY config/tls/dod-wcf-root-ca-1.pem /usr/local/share/ca-certificates/dod-wcf-root-ca-1.pem.crt
COPY config/tls/dod-wcf-intermediate-ca-1.pem /usr/local/share/ca-certificates/dod-wcf-intermediate-ca-1.pem.crt

# Expose port 4000 to the outside world
EXPOSE 4000
COPY bin/rds-ca-rsa4096-g1.pem /bin/rds-ca-rsa4096-g1.pem
COPY bin/rds-ca-2019-root.pem /bin/rds-ca-2019-root.pem
COPY bin/milmove /bin/milmove
COPY bin/generate-test-data /bin/generate-test-data
COPY bin/prime-api-client /bin/prime-api-client

# Command to run the application
CMD ["node", "server.js"]
COPY migrations/app/schema /migrate/schema
COPY migrations/app/secure /migrate/secure
COPY migrations/app/migrations_manifest.txt /migrate/migrations_manifest.txt

COPY build /build
COPY config /config
COPY swagger /swagger
COPY pkg/testdatagen/testdata /pkg/testdatagen/testdata
COPY scripts /scripts
COPY public/static/react-file-viewer /public/static/react-file-viewer

# Install tools needed in container
# hadolint ignore=DL3018
RUN apk update && apk add ca-certificates --no-cache && apk add jq bash --no-cache
RUN update-ca-certificates

WORKDIR /

USER nobody

ENTRYPOINT ["/bin/milmove"]

CMD ["serve", "--logging-level=debug"]

EXPOSE 4000

0 comments on commit 0dfed8b

Please sign in to comment.