-
Notifications
You must be signed in to change notification settings - Fork 0
61 lines (55 loc) · 1.7 KB
/
master.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
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."