Skip to content

Dt 613 conformance framework add ci cd pipeline #17

Dt 613 conformance framework add ci cd pipeline

Dt 613 conformance framework add ci cd pipeline #17

Workflow file for this run

name: Conformance-Gateway CI
on:
workflow_dispatch:
push:
branches:
- dev
pull_request:
branches: [ "dev" ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
path: Conformance-Gateway
submodules: recursive
- name: Set up Java JDK
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: 17
cache: 'maven'
- name: Build Conformance-Gateway
run: |
cd Conformance-Gateway
find . -name "pom.xml" -exec mvn install -U -B -DskipTests -f '{}' \;
- name: Run the app
run: |
ls
cd Conformance-Gateway && docker-compose -f docker-compose.yml up -d -V --build
- name: Fetch Backend Status
run: |
sleep 10
status=$(curl -s http://localhost:8080/actuator/health | jq -r '.status')
retries=12
while [[ "$status" != "UP" ]] && [[ $retries -gt 0 ]]; do
echo "Status is '$status' - waiting 5 secs ($retries retries left)"
sleep 5
retries=$((retries - 1))
status=$(curl -s http://localhost:8080/actuator/health | jq -r '.status')
done
echo "Final status is '$status'"
if [[ "$status" != "UP" ]]; then
curl -v http://localhost:8080/actuator/health || :
exit 1
fi
echo "::set-output name=STATUS::$status"
id: healthcheck
- name: Confirm microservice status
if: ${{ steps.healthcheck.outputs.STATUS == 'UP' }}
run: |
echo "The Conformance-Gateway service is UP."