Skip to content

see files

see files #9

Workflow file for this run

name: Conformance-Gateway CI
on:
workflow_dispatch:
push:
branches:
- dev
- DT-613-Conformance-framework-add-CI-CD-pipeline
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 && mvn clean -U -B package -DskipTests
- name: Run the app
run: |
ls
cd Conformance-Gateway/spring-boot && 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."