Skip to content

Commit

Permalink
Merge branch 'develop' into dependabot/gradle/develop/org.flywaydb.fl…
Browse files Browse the repository at this point in the history
…yway-10.2.0
  • Loading branch information
chengjie8 authored Dec 13, 2023
2 parents 970c91d + c964eba commit a75a319
Show file tree
Hide file tree
Showing 66 changed files with 994 additions and 254 deletions.
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
**/integrationTest
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/vro-request.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
name: VRO request
description: Request a service or functionality from VRO
title: "[Request]: "
labels: ["request", "triage"]
labels: ["request", "VRO-team"]
projects: ["department-of-veterans-affairs/871"]
assignees:
- dianagriffin
- meganhicks
body:
- type: markdown
attributes:
Expand Down
14 changes: 1 addition & 13 deletions .github/workflows/ee-ep-merge-end-to-end.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
workflow_call:

env:
COMPOSE_PROFILES: 'bip'
COMPOSE_PROFILES: 'bip,bgs'
VRO_DEV_SECRETS_FOLDER: "${{ github.workspace }}/.cache/abd-vro-dev-secrets"

jobs:
Expand Down Expand Up @@ -62,18 +62,6 @@ jobs:
# Quit after 60 seconds
retries: 30

# Temporary step added to avoid condition where bipApiExchange is not yet created.
- name: 'Create bipApiExchange exchange'
uses: indiesdev/[email protected]
with:
url: 'http://localhost:15672/api/exchanges/%2f/bipApiExchange'
method: 'PUT'
basic-auth-token: '${{env.RABBITMQ_BASIC_AUTH}}'
body: '{"type":"direct", "durable":true, "auto_delete":true}'
accept: 201, 204
retries: 3
log-response: true

- name: "Run Employee Experience Integration Tests"
run: |
./gradlew :domain-ee:ee-ep-merge-app:integrationTest
Expand Down
78 changes: 9 additions & 69 deletions .github/workflows/svc-bgs-api-integration-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,16 @@ on:

env:
COMPOSE_PROFILES: 'bgs'
CORRELATION_ID: '1234'

jobs:
integration-test:
runs-on: ubuntu-latest
steps:
- name: 'Setup Ruby'
uses: ruby/[email protected]
with:
ruby-version: '3.2.2'

- name: 'Checkout source code'
uses: actions/checkout@v3

Expand Down Expand Up @@ -58,76 +62,12 @@ jobs:
retries: 30

- name: 'Check for healthy BGS container'
run: timeout 180s sh -c 'until docker ps | grep ".*svc-bgs-api.*" | grep -q healthy; do echo "Waiting for container to be healthy..."; sleep 2; done'

- name: 'Create add-note-response queue'
uses: indiesdev/[email protected]
with:
url: 'http://localhost:15672/api/queues/%2f/add-note-response'
method: 'PUT'
basic-auth-token: '${{env.RABBITMQ_BASIC_AUTH}}'
body: '{"durable":true, "auto_delete":true}'
accept: 201, 204
retries: 3
log-response: true

- name: 'Create binding for add-note-response queue to bgs-api exchange'
uses: indiesdev/[email protected]
with:
url: 'http://localhost:15672/api/bindings/%2f/e/bgs-api/q/add-note-response'
method: 'POST'
basic-auth-token: '${{env.RABBITMQ_BASIC_AUTH}}'
body: '{"routing_key":"add-note-response","arguments":{}}'
accept: 201, 204
retries: 3
log-response: true

- name: 'Send message to RabbitMQ on bgs-api exchange routed to add-note queue'
uses: indiesdev/[email protected]
with:
url: 'http://localhost:15672/api/exchanges/%2F/bgs-api/publish'
method: 'POST'
basic-auth-token: '${{env.RABBITMQ_BASIC_AUTH}}'
body: '{"properties": {"delivery_mode": 1,"reply_to": "add-note-response","correlation_id": "${{env.CORRELATION_ID}}"},"routing_key": "add-note","payload": "{\\\"veteranNote\\\":\\\"test\\\",\\\"veteranParticipantId\\\":111}","payload_encoding": "string"}'
accept: 200
retries: 3
log-response: true

- name: 'Sleep to give svc-bgs-api time to process and put response in add-note-response queue'
run: sleep 5
shell: bash

- name: 'Get message from RabbitMQ add-note-response queue'
id: 'addNoteResponse'
uses: indiesdev/[email protected]
with:
url: 'http://localhost:15672/api/queues/%2f/add-note-response/get'
method: 'POST'
basic-auth-token: '${{env.RABBITMQ_BASIC_AUTH}}'
headers: '{"accept":"application/json","content-type":"application/json"}'
body: '{"count":1,"ackmode":"ack_requeue_true","encoding":"auto"}'
accept: 200
retries: 3
log-response: true
run: timeout 60s sh -c 'until docker ps | grep ".*svc-bgs-api.*" | grep -q healthy; do echo "Waiting for container to be healthy..."; sleep 2; done'

# Validate response Tests
- name: 'Validate response in payload of message from RabbitMQ add-note-response queue'
- name: 'Run integration tests'
run: |
# Validate Response:
CHECKS_FAILED=false
echo "Checking correlation_id..."
echo "correlation_id: ${{ fromJson(steps.addNoteResponse.outputs.response).data[0].properties.correlation_id }}"
if [ "${{ fromJson(steps.addNoteResponse.outputs.response).data[0].properties.correlation_id }}" != "${{env.CORRELATION_ID}}" ]; then
echo "Unexpected correlation_id: Expected ${{env.CORRELATION_ID}}. Found ${{ fromJson(steps.addNoteResponse.outputs.response).data[0].properties.correlation_id }}"
CHECKS_FAILED=true
fi
echo "Skip checking payload until bgs-api is connected..."
if $CHECKS_FAILED; then
echo "Some checks failed."
exit 10
fi
./gradlew :svc-bgs-api:bundleInstall
./gradlew :svc-bgs-api:integrationTest
- name: 'Clean shutdown of all containers'
if: always()
Expand Down
16 changes: 4 additions & 12 deletions .github/workflows/update-deployment-platform.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,21 +30,13 @@ on:
rabbitmq:
description: 'RabbitMQ image tag'
required: true
default: 3
type: choice
options:
- latest
- 3
- (disable)
default: 'latest'
type: string
redis:
description: 'Redis image tag'
required: true
default: 7
type: choice
options:
- latest
- 7
- (disable)
default: 'latest'
type: string

# Allow other workflows to call this one
workflow_call:
Expand Down
12 changes: 3 additions & 9 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ buildscript {

plugins {
id 'local.std.base-project-conventions'
id 'pl.allegro.tech.build.axion-release' version '1.16.0'
id 'pl.allegro.tech.build.axion-release' version '1.16.1'

// Set versions for these plugins (but don't apply) so we don't have to repeat the versions in subprojects
id "org.springframework.boot" version "${spring_boot_version}" apply false
Expand Down Expand Up @@ -101,15 +101,7 @@ scmVersion {
localOnly = true
useHighestVersion = true

def postgresDockerfileContent=file("${project.rootDir}/postgres/Dockerfile").getText()
def matcher = (postgresDockerfileContent =~ /FROM postgres:(.+)/)
def postgresBaseImageVersion = matcher.getCount() > 0 ? matcher[0][1] : "latest"
Map<String, Object> platformHelmValues = new org.yaml.snakeyaml.Yaml().load(file("${project.rootDir}/helm/platform/values.yaml").text)
def helmChartAppVersions = [
// These rarely change
'postgres' : postgresBaseImageVersion, // extracted from Dockerfile
'redis' : (String) platformHelmValues.get("redis-chart").get("imageTag"),
'rabbitmq' : (String) platformHelmValues.get("rabbitmq-chart").get("imageTag"),

// These change often (i.e., with each release)
// A null value will result in the currentVersion being used
Expand All @@ -118,6 +110,8 @@ scmVersion {
'vro-app' : null,
'svc-bgs-api': null,
'svc-lighthouse-api': null,
'redis' : null,
'rabbitmq' : null,
// Once stable, set a version and move to previous section
'domain-cc' : null,
'domain-ee' : null,
Expand Down
2 changes: 1 addition & 1 deletion db-init/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM flyway/flyway:10.1-alpine
FROM flyway/flyway:10.2-alpine

# hadolint ignore=DL3018
RUN apk update && apk upgrade && apk --no-cache add libcrypto3 libssl3 openssl postgresql-client && rm -rf /var/cache/apk/*
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
ALTER TABLE "bie_contention_event"
ADD COLUMN "date_added" TIMESTAMP,
ADD COLUMN "date_completed" TIMESTAMP,
ADD COLUMN "date_updated" TIMESTAMP,
ADD COLUMN "actor_station" VARCHAR(255),
ADD COLUMN "automation_indicator" boolean,
ADD COLUMN "benefit_claim_type_code" VARCHAR(255),
ADD COLUMN "contention_status_type_code" VARCHAR(255),
ADD COLUMN "current_lifecycle_status" VARCHAR(255),
ADD COLUMN "clmnt_txt" VARCHAR(255),
ADD COLUMN "details" VARCHAR(255),
ADD COLUMN "event_time" TIMESTAMP,
ADD COLUMN "journal_status_type_code" VARCHAR(255),
ADD COLUMN "veteran_participant_id" VARCHAR(255),
ADD COLUMN "event_details" JSON;
Loading

0 comments on commit a75a319

Please sign in to comment.