-
Notifications
You must be signed in to change notification settings - Fork 0
66 lines (55 loc) · 2.1 KB
/
microservices.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
62
63
64
65
66
name: DCSA-UI-Support MASTER CI
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
path: DCSA-UI-Support
submodules: recursive
- name: Set up Java JDK
uses: actions/setup-java@v2
with:
distribution: 'temurin'
java-version: 17
cache: 'maven'
- name: maven-settings-xml-action
uses: whelk-io/maven-settings-xml-action@v12
with:
repositories: '[{ "id": "github", "name": "DCSA Backend repo", "url": "https://maven.pkg.github.com/dcsaorg/DCSA-Core", "releases": { "enabled": "true" }, "snapshots": { "enabled": "true" } }]'
servers: '[{ "id": "github", "username": "${{ secrets.DCSA_USER }}", "password": "${{ secrets.DCSA_PACKAGES_PAT }}" }]'
- name: Build UI-Support
run: cd DCSA-UI-Support && mvn clean -U -B package -Ddcsa.artifacttype=-SNAPSHOT
- name: Build and run the microservices
run: cd DCSA-UI-Support && docker-compose -f docker-compose.yml up -d -V --build
- name: Fetch Backend Status
run: |
sleep 10
url=http://localhost:9091/ui-support/v1/actuator/health
status=$(curl -s "${url}" | 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 "${url}" | jq -r '.status')
done
echo "Final status is '$status'"
if [[ "$status" != "UP" ]]; then
curl -v "${url}" || :
docker ps || :
docker logs dcsa-ui-support_dcsa-ui-support_1 || :
exit 1
fi
echo "::set-output name=STATUS::$status"
id: healthcheck
- name: Run Integration Tests
run: |
cd DCSA-UI-Support && java -jar ui-support-integration-tests/target/dcsa-ui-support-integration-tests-with-dependencies.jar