move files and delete script #14
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |
# 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." |